1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-12-23 03:01:08 +00:00

added some untested fx

This commit is contained in:
Naej 2016-12-11 03:09:57 +01:00
parent f74cd2808a
commit 3dac9bc5f4

View File

@ -31,21 +31,17 @@ bool is_leaf(cellElement* tree){
}
}
int AddNextCol(cellElement* tree){
cellElement * elem = NULL;
elem = (cellElement*) malloc(sizeof(cellElement));
if (elem == NULL){
int SetPositionIndex(cellElement* elem,int Col,int Row){
if (elem != NULL){
elem->colIndex = Col;
elem->rowIndex = Row;
} else {
return -1;
}
return 1;
}
printf("---insertNextCol---\n");
elem->value = true;
elem->nextCol = NULL;
elem->nextRow = NULL;
int SetNextCol(cellElement* tree,cellElement* elem){
if (tree->nextCol == NULL){
tree->nextCol = elem;
}else{
@ -54,11 +50,35 @@ int AddNextCol(cellElement* tree){
return 1;
}
int SetNextRow(cellElement* tree,cellElement* elem){
if (tree->nextRow == NULL){
tree->nextRow = elem;
}else{
return -2;
}
return 1;
}
int AddNextCol(cellElement* tree){
cellElement * elem = NULL;
elem = CreateCellElem();
if (elem == NULL){
return -1;
}
printf("---insertNextCol---\n");
return(SetNextCol(tree,elem));
}
int AddNextRow(cellElement* tree){
cellElement * elem = NULL;
elem = (cellElement*) malloc(sizeof(cellElement));
elem = CreateCellElem();
if (elem == NULL){
return -1;
@ -66,15 +86,7 @@ int AddNextRow(cellElement* tree){
printf("---insertNextRow---\n");
elem->value = true;
elem->nextRow = NULL;
elem->nextCol = NULL;
if (tree->nextRow == NULL){
tree->nextRow = elem;
}else{
return -2;
}
return 1;
return(SetNextRow(tree,elem));
}
void removeNextCol(cellElement* tree){