added doc

This commit is contained in:
Naej 2016-12-11 00:33:02 +01:00
parent c2fbc32f16
commit 79c1f12169
4 changed files with 46 additions and 9 deletions

View File

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

View File

@ -39,17 +39,57 @@ struct cellElement {
};
typedef struct cellElement cellElement;
/*---CreateCellElem---
*Allocates a cellElement and returns it
*
*@return : pointer on the allocated cellElement
*
*/
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);
/*---AddNextRow---
*Allocates a cellElement and sets it as the NextRow of the tree
*
*@tree : an allocated cellElement
*
*/
int AddNextRow(cellElement* tree);
void removeNextCol(cellElement* list);
void removeNextRow(cellElement* list);
/*---removeNextCol---
*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);
/*---FreeCellElem---
*Allocates a cellElement and returns it
*
*@return : pointer on the allocated cellElement
*
*/
void FreeCellElement(cellElement* element);
#endif

View File

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

1
main.c
View File

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