mirror of
https://gitlab.com/klmp200/LO27.git
synced 2024-11-05 10:28:03 +00:00
added some untested fx
This commit is contained in:
parent
f74cd2808a
commit
3dac9bc5f4
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user