1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-11-16 02:03:18 +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){ int SetPositionIndex(cellElement* elem,int Col,int Row){
if (elem != NULL){
cellElement * elem = NULL; elem->colIndex = Col;
elem = (cellElement*) malloc(sizeof(cellElement)); elem->rowIndex = Row;
} else {
if (elem == NULL){
return -1; return -1;
} }
return 1;
}
printf("---insertNextCol---\n"); int SetNextCol(cellElement* tree,cellElement* elem){
elem->value = true;
elem->nextCol = NULL;
elem->nextRow = NULL;
if (tree->nextCol == NULL){ if (tree->nextCol == NULL){
tree->nextCol = elem; tree->nextCol = elem;
}else{ }else{
@ -54,11 +50,35 @@ int AddNextCol(cellElement* tree){
return 1; 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){ int AddNextRow(cellElement* tree){
cellElement * elem = NULL; cellElement * elem = NULL;
elem = (cellElement*) malloc(sizeof(cellElement)); elem = CreateCellElem();
if (elem == NULL){ if (elem == NULL){
return -1; return -1;
@ -66,15 +86,7 @@ int AddNextRow(cellElement* tree){
printf("---insertNextRow---\n"); printf("---insertNextRow---\n");
elem->value = true; return(SetNextRow(tree,elem));
elem->nextRow = NULL;
elem->nextCol = NULL;
if (tree->nextRow == NULL){
tree->nextRow = elem;
}else{
return -2;
}
return 1;
} }
void removeNextCol(cellElement* tree){ void removeNextCol(cellElement* tree){