1 /* esl_subcmd : utilities for commandline programs that take subcommands 2 * 3 * See also: 4 * esl_getopts : command line argument parsing 5 */ 6 #ifndef eslSUBCMD_INCLUDED 7 #define eslSUBCMD_INCLUDED 8 #include "esl_config.h" 9 10 #include "esl_getopts.h" 11 12 typedef struct esl_subcmd_s { 13 int (*func)(const char *topcmd, const struct esl_subcmd_s *sub, int argc, char **argv); 14 char *subcmd; 15 int nargs; 16 char *usage; 17 char *description; 18 } ESL_SUBCMD; 19 20 extern ESL_GETOPTS *esl_subcmd_CreateDefaultApp(const char *topcmd, const ESL_SUBCMD *sub, const ESL_OPTIONS *suboptions, int argc, char **argv); 21 22 23 #endif /*eslSUBCMD_INCLUDED*/ 24