Go to the source code of this file.
Functions | |
static void | need_argument (const tw_optdef *def) |
static int | is_empty (const tw_optdef *def) |
void | tw_opt_add (const tw_optdef *options) |
static void | show_help (void) |
void | tw_opt_settings (FILE *outfile) |
void | tw_opt_print (void) |
static void | apply_opt (const tw_optdef *def, const char *value) |
static void | match_opt (const char *arg) |
void | tw_opt_parse (int *argc_p, char ***argv_p) |
Variables | |
static const char * | program |
static const tw_optdef * | all_groups [10] |
static const tw_optdef * | opt_groups [10] |
static unsigned int | opt_index = 0 |
static const tw_optdef | basic [] |
|
static |
Definition at line 287 of file tw-opts.c.
References need_argument(), show_help(), tw_error(), tw_ismaster(), TW_LOC, tw_net_stop(), tw_warning(), TWOPTTYPE_CHAR, TWOPTTYPE_DOUBLE, TWOPTTYPE_FLAG, TWOPTTYPE_SHOWHELP, TWOPTTYPE_STIME, TWOPTTYPE_UINT, TWOPTTYPE_ULONG, TWOPTTYPE_ULONGLONG, tw_optdef::type, and tw_optdef::value.
Referenced by match_opt().
|
static |
Definition at line 416 of file tw-opts.c.
References TWOPTTYPE_GROUP, and tw_optdef::type.
Referenced by tw_opt_add(), and tw_opt_parse().
|
static |
Definition at line 378 of file tw-opts.c.
References all_groups, apply_opt(), tw_optdef::name, program, tw_ismaster(), tw_net_stop(), TWOPTTYPE_GROUP, and tw_optdef::type.
Referenced by tw_opt_parse().
|
static |
Definition at line 276 of file tw-opts.c.
References tw_optdef::name, program, tw_ismaster(), and tw_net_stop().
Referenced by apply_opt().
|
static |
Definition at line 24 of file tw-opts.c.
References all_groups, tw_optdef::help, tw_optdef::name, program, TWOPTTYPE_CHAR, TWOPTTYPE_DOUBLE, TWOPTTYPE_FLAG, TWOPTTYPE_GROUP, TWOPTTYPE_STIME, TWOPTTYPE_UINT, TWOPTTYPE_ULONG, TWOPTTYPE_ULONGLONG, tw_optdef::type, and tw_optdef::value.
Referenced by apply_opt().
void tw_opt_add | ( | const tw_optdef * | options | ) |
Add an opt group
Definition at line 14 of file tw-opts.c.
References is_empty(), opt_index, and tw_optdef::type.
Referenced by main(), and tw_init().
void tw_opt_parse | ( | int * | argc, |
char *** | argv | ||
) |
Remove options from the command line arguments.
Definition at line 427 of file tw-opts.c.
References ARRAY_SIZE, basic, is_empty(), match_opt(), program, tw_error(), and TW_LOC.
Referenced by tw_init().
void tw_opt_print | ( | void | ) |
Pretty-print the option descriptions (for –help)
Definition at line 215 of file tw-opts.c.
References all_groups, g_tw_csv, tw_optdef::name, tw_ismaster(), TWOPTTYPE_CHAR, TWOPTTYPE_DOUBLE, TWOPTTYPE_FLAG, TWOPTTYPE_GROUP, TWOPTTYPE_STIME, TWOPTTYPE_UINT, TWOPTTYPE_ULONG, TWOPTTYPE_ULONGLONG, tw_optdef::type, and tw_optdef::value.
void tw_opt_settings | ( | FILE * | f | ) |
Pretty-print the option descriptions and current values
Definition at line 138 of file tw-opts.c.
References all_groups, tw_optdef::help, tw_optdef::name, TWOPTTYPE_CHAR, TWOPTTYPE_DOUBLE, TWOPTTYPE_FLAG, TWOPTTYPE_GROUP, TWOPTTYPE_STIME, TWOPTTYPE_UINT, TWOPTTYPE_ULONG, TWOPTTYPE_ULONGLONG, tw_optdef::type, and tw_optdef::value.
Referenced by io_store_checkpoint().
|
static |
Definition at line 5 of file tw-opts.c.
Referenced by match_opt(), show_help(), tw_opt_print(), and tw_opt_settings().
|
static |
Definition at line 411 of file tw-opts.c.
Referenced by tw_opt_parse().
|
static |
Definition at line 11 of file tw-opts.c.
Referenced by tw_opt_add().
|
static |
Definition at line 4 of file tw-opts.c.
Referenced by match_opt(), need_argument(), show_help(), and tw_opt_parse().