44#define CMDOPT_EXISTS 0b00000001
45#define CMDOPT_OPTIONAL 0b00000010
46#define CMDOPT_TAKESARG 0b00000100
47#define CMDOPT_MAYTAKEARG 0b00001000
49#define CMDAPP_MODE_MULTIFLAG 0b00000000
50#define CMDAPP_MODE_SHORTARG 0b00000001
51#define CMDAPP_MODE_SILENT 0b00000000
52#define CMDAPP_MODE_PRINT 0b00000010
53#define _CMDAPP_MODE_EXIT 0b10000000
56#define cmdopt_exists(opt) ((opt).flags & CMDOPT_EXISTS)
58#define cmdopt_is_optional(opt) ((opt).flags | CMDOPT_OPTIONAL)
96#define cmdapp_should_exit(app) ((app)->_mode & _CMDAPP_MODE_EXIT)
107 cmdopt_t** conflicts,
const char* description,
void cmdapp_set(cmdapp_t *app, char shorto, const char *longo, uint8_t flags, cmdopt_t **conflicts, const char *description, const char *argtype, cmdopt_t *option)
void cmdapp_enable_procedure(cmdapp_t *app, cmdapp_procedure_t proc, void *user_data)
void cmdapp_print_version(cmdapp_t *app)
void cmdapp_print_help(cmdapp_t *app)
cmdargs_t * cmdapp_getargs(cmdapp_t *app)
int cmdapp_run(cmdapp_t *app)
void(* cmdapp_procedure_t)(void *data, cmdopt_t *option, const char *arg)
void cmdapp_error(cmdapp_t *app, const char *fmt,...)
void cmdapp_destroy(cmdapp_t *app)
void cmdapp_init(cmdapp_t *app, int argc, char **argv, cmdapp_mode_t mode, const cmdapp_info_t *info)
cmdopt_internal_t ** _start