]>
Commit | Line | Data |
---|---|---|
7fe9b0b7 | 1 | #ifndef CMDPARSER_H__ |
2 | #define CMDPARSER_H__ | |
3 | ||
4 | typedef struct command_s | |
5 | { | |
6 | const char * Name; | |
7 | int (*Parse)(const char *Cmd); | |
8 | int Offline; | |
9 | const char * Help; | |
10 | } command_t; | |
11 | ||
12 | // command_t array are expected to be NULL terminated | |
13 | ||
14 | // Print help for each command in the command array | |
15 | void CmdsHelp(const command_t Commands[]); | |
16 | // Parse a command line | |
17 | void CmdsParse(const command_t Commands[], const char *Cmd); | |
18 | ||
393c3ef9 | 19 | #endif |