00001 #if !defined(_COMMAND_H_) 00002 #define _COMMAND_H_ 00003 00004 #include "mystream.h" 00005 00006 typedef struct { 00007 char *name; 00008 int argc; 00009 int need_rest; 00010 void (*handler)(mystream_t *mystream, char **, char *); 00011 } command_t; 00012 00013 int dispatch(mystream_t *mystream, char *buf, int n_commands, command_t commands[]); 00014 00015 #endif /* _COMMAND_H_ */