diff options
| author | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-10-05 13:38:44 +0200 |
|---|---|---|
| committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-10-05 13:38:44 +0200 |
| commit | 4f54992eac73d4400b07ff1978accbf118f7e8bd (patch) | |
| tree | 087162941da7acbd7bee0898326c14c57f1026df /lib/utils/parse_options.h | |
| parent | 6d49343abb0f90fdb2dd88ca639038cc7302c3dc (diff) | |
add INTEGER option
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'lib/utils/parse_options.h')
| -rw-r--r-- | lib/utils/parse_options.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/utils/parse_options.h b/lib/utils/parse_options.h index c9d849f7..29101925 100644 --- a/lib/utils/parse_options.h +++ b/lib/utils/parse_options.h @@ -10,6 +10,7 @@ extern "C" { enum parse_opt_type { OPTION_BOOL, OPTION_STRING, + OPTION_INTEGER, OPTION_END, }; @@ -31,6 +32,7 @@ struct options { */ #define OPT_END() { OPTION_END } #define OPT_BOOL(s, l, v, h) { OPTION_BOOL, (s), (l), (v), NULL, (h) } +#define OPT_INTEGER(s, l, v, h) { OPTION_INTEGER, (s), (l), (v), "n", (h) } #define OPT_STRING(s, l, v, a, h) { OPTION_STRING, (s), (l), (v), (a), (h) } void parse_opts(int argc, char **argv, const struct options *opt, |
