1 #ifndef _CMD_H_ 2 #define _CMD_H_ 1 3 4 5 6 /* Maximum length for a single command */ 7 #define CMD_MAX_LENGTH 2048 8 /* Maximum number of tokens per command */ 9 #define CMD_MAX_TOKENS 64 10 11 /* Parse an input string */ 12 void cmd_parse(char *input); 13 14 typedef void (*xcommand_t)(void); 15 16 /* Warning: these commands are NOT REENTRANT. Do not attempt to thread them! */ 17 void cmd_tokenize(char *string); 18 int cmd_argc(void); 19 char *cmd_argv(int w); 20 21 #endif /* _CMD_H_ */ 22