- make shutdown more proper (releasing all memory)
- fixed memory leak (releaseing args when error in command) - introduced startup commands - modified status file writing (avoid potential corrupted files)
This commit is contained in:
@ -30,6 +30,7 @@ typedef struct __Clist {
|
||||
void *pData;
|
||||
struct __Clist *pNext;
|
||||
struct __Clist *pPrevious;
|
||||
int startupOnly;
|
||||
} CommandList;
|
||||
|
||||
typedef struct __SINTER
|
||||
@ -63,6 +64,12 @@ typedef struct __SINTER
|
||||
int RemoveCommand(SicsInterp *pInterp, char *pName);
|
||||
/* kills the command name from the interpreter pInterp
|
||||
*/
|
||||
/*-------------------------------------------------------------------------*/
|
||||
int AddCommandWithFlag(SicsInterp *pInterp, char *pName, ObjectFunc pFunc,
|
||||
KillFunc pKFunc, void *pData, int startupFlag);
|
||||
int AddIniCmd(char *pName, ObjectFunc pFunc); /* command will be deleted after startup */
|
||||
int AddCmd(char *pName, ObjectFunc pFunc); /* syntactic sugar for AddCommand without data */
|
||||
void RemoveStartupCommands(void); /* called after startup to delete startup commands */
|
||||
/*-------------------------------------------------------------------------*/
|
||||
int InterpExecute(SicsInterp *self,pSConnection pCon,char *pCommand);
|
||||
|
||||
|
Reference in New Issue
Block a user