1234567891011121314151617 |
- #ifndef COMMAND_H_
- #define COMMAND_H_
-
- #include "state.h"
-
- struct CmdList {
- struct CmdList* next;
- char cmdName[MAX_CMD_NAME_LENGTH];
- void (*func)(struct State*);
- };
-
- void initCmds( struct CmdList** cmds );
- void prependCmd( struct CmdList** cmds, char* s, void (*func)(struct State*) );
- void endCmds( struct CmdList** cmds );
- int tryCallCmds( struct CmdList* cmds, char* s, struct State* state );
-
- #endif // COMMAND_H_
|