- Committing first working version of new AMOR settings module
This commit is contained in:
20
fourtable.c
20
fourtable.c
@ -32,17 +32,6 @@ void DeleteFourCircleTable(int handle){
|
||||
LLDdelete(handle);
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
static void clearTable(int handle){
|
||||
int status;
|
||||
|
||||
status = LLDnodePtr2First(handle);
|
||||
while(status == 1) {
|
||||
LLDnodeDelete(handle);
|
||||
status = LLDnodePtr2Next(handle);
|
||||
}
|
||||
LLDnodeDelete(handle);
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
static void printList(int handle, SConnection *pCon){
|
||||
FourTableEntry entry;
|
||||
char pBueffel[132];
|
||||
@ -179,9 +168,12 @@ static void delEntry(int handle, int index){
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
int HandleFourCircleCommands(int handle, SConnection *pCon,
|
||||
int HandleFourCircleCommands(int *table, SConnection *pCon,
|
||||
int argc, char *argv[], int *err){
|
||||
int handle;
|
||||
|
||||
*err = 1;
|
||||
handle = *table;
|
||||
|
||||
/*
|
||||
test if this is for us
|
||||
@ -204,7 +196,9 @@ int HandleFourCircleCommands(int handle, SConnection *pCon,
|
||||
*err = 0;
|
||||
return 1;
|
||||
}
|
||||
clearTable(handle);
|
||||
LLDdelete(handle);
|
||||
handle = LLDcreate(sizeof(FourTableEntry));
|
||||
*table = handle;
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
} else if (strcmp(argv[2],"list") == 0){
|
||||
|
Reference in New Issue
Block a user