X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=s51%2Fs51.h;fp=s51%2Fs51.h;h=f4dcce66d259b6ea20159daaddea9fa1acb879eb;hp=eab61452ad49e108e713d471b848199e1724294c;hb=6c2a65c743a4ffae96ed27dbc38c1bf9242ed1df;hpb=ea366058aa467a8a7caf17e7014758f3741ea7f7 diff --git a/s51/s51.h b/s51/s51.h index eab61452..f4dcce66 100644 --- a/s51/s51.h +++ b/s51/s51.h @@ -27,12 +27,32 @@ enum command_result { command_success, command_debug, command_syntax, command_interrupt, command_error, }; +struct command_function { + char *name; + char *alias; + enum command_result (*func)(int argc, char **argv); + char *usage; + char *help; +}; + +struct command_function * +command_string_to_function(struct command_function *functions, char *name); + +enum command_result +command_function_help(struct command_function *functions, int argc, char **argv); + +void +command_syntax_error(int argc, char **argv); + enum command_result command_quit (int argc, char **argv); enum command_result command_help (int argc, char **argv); +enum command_result +command_stop (int argc, char **argv); + enum command_result command_di (int argc, char **argv); @@ -81,6 +101,9 @@ command_reset (int argc, char **argv); enum command_result command_status (int argc, char **argv); +enum command_result +command_info (int argc, char **argv); + enum command_result cc_wait(void);