4 /* Define a new option with a long name (--long_name), a short
5 one character name (-c), a descriptive text, the argument type, and a
6 pointer to where the argument value will be stored. For an option of
7 type LTTV_OPT_NONE, the argument is a boolean value set to true when the
8 option is present. The option hook is called if non NULL. */
10 typedef enum _LttvOptionType
11 {LTTV_OPT_NONE
, LTTV_OPT_STRING
, LTTV_OPT_INT
, LTTV_OPT_LONG
}
14 typedef void (*LttvOptionHook
)(void *hook_data
);
16 void lttv_option_add(const char *long_name
, const char char_name
,
17 const char *description
, const char *arg_description
,
18 const LttvOptionType t
, void *p
,
19 const LttvOptionHook h
, void *hook_data
);
22 /* Remove an option */
24 void lttv_option_remove(const char *long_name
);
27 /* Parse command line options. It is possible to add options (through the
28 hooks being called) while the parsing is done. The new options will be
29 used for subsequent command line arguments. */
31 void lttv_option_parse(int argc
, char **argv
);
33 void lttv_option_show_help(void);
This page took 0.02883 seconds and 4 git commands to generate.