Résultat du TP en C sur Forth
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

command.h 430B

1234567891011121314151617
  1. #ifndef COMMAND_H_
  2. #define COMMAND_H_
  3. #include "state.h"
  4. struct CmdList {
  5. struct CmdList* next;
  6. char cmdName[MAX_CMD_NAME_LENGTH];
  7. void (*func)(struct State*);
  8. };
  9. void initCmds( struct CmdList** cmds );
  10. void prependCmd( struct CmdList** cmds, char* s, void (*func)(struct State*) );
  11. void endCmds( struct CmdList** cmds );
  12. int tryCallCmds( struct CmdList* cmds, char* s, struct State* state );
  13. #endif // COMMAND_H_