1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-11-05 14:48:03 +00:00

Merge branch 'NaejBranch' into 'master'

added doc

See merge request !6
This commit is contained in:
Antoine Bartuccio 2016-12-11 00:42:57 +00:00
commit 53c05a0ca5
4 changed files with 46 additions and 9 deletions

View File

@ -23,11 +23,6 @@ cellElement * CreateCellElem(){
return elem; return elem;
} }
void freeCellElem(cellElement * elem){
free(elem);
elem = NULL;
}
int AddNextCol(cellElement* tree){ int AddNextCol(cellElement* tree){
cellElement * elem = NULL; cellElement * elem = NULL;
@ -117,4 +112,5 @@ void FreeCellElement(cellElement* element) {
if (element != NULL){ if (element != NULL){
free(element); free(element);
} }
element = NULL;
} }

View File

@ -39,17 +39,57 @@ struct cellElement {
}; };
typedef struct cellElement cellElement; typedef struct cellElement cellElement;
/*---CreateCellElem---
*Allocates a cellElement and returns it
*
*@return : pointer on the allocated cellElement
*
*/
cellElement * CreateCellElem(); cellElement * CreateCellElem();
void freeCellElem(cellElement * elem);
/*---AddNextCol---
*Allocates a cellElement and sets it as the NextCol of the tree
*
*@tree : an allocated cellElement
*
*/
int AddNextCol(cellElement* tree); int AddNextCol(cellElement* tree);
/*---AddNextRow---
*Allocates a cellElement and sets it as the NextRow of the tree
*
*@tree : an allocated cellElement
*
*/
int AddNextRow(cellElement* tree); int AddNextRow(cellElement* tree);
void removeNextCol(cellElement* list); /*---removeNextCol---
void removeNextRow(cellElement* list); *Free the nextCol cellElement of the tree
*
*@tree : an allocated cellElement
*
*/
void removeNextCol(cellElement* tree);
/*---removeNextRow---
*Free the nextRow cellElement of the tree
*
*@tree : an allocated cellElement
*
*/
void removeNextRow(cellElement* tree);
void recursivePrint(cellElement * tree); void recursivePrint(cellElement * tree);
/*---FreeCellElem---
*Allocates a cellElement and returns it
*
*@return : pointer on the allocated cellElement
*
*/
void FreeCellElement(cellElement* element); void FreeCellElement(cellElement* element);
#endif #endif

View File

@ -2,7 +2,7 @@ CC=gcc
CFLAGS=-Wall -Werror -pedantic -fpic -g CFLAGS=-Wall -Werror -pedantic -fpic -g
LIBSDIR=-L/usr/lib -L./Libs LIBSDIR=-L/usr/lib -L../Libs
INCLUDEDIR=-I/usr/include -I. INCLUDEDIR=-I/usr/include -I.
#Library variables #Library variables

1
main.c
View File

@ -12,6 +12,7 @@
#include <list.h> #include <list.h>
int main(int argc, char **argv){ int main(int argc, char **argv){
cellElement * tree = NULL; cellElement * tree = NULL;
tree = CreateCellElem(); tree = CreateCellElem();
tree->colIndex = 1; tree->colIndex = 1;