summaryrefslogtreecommitdiffstats
path: root/lib/utils/parse_options.h
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2010-10-05 13:38:44 +0200
committerNikola Pajkovsky <npajkovs@redhat.com>2010-10-05 13:38:44 +0200
commit4f54992eac73d4400b07ff1978accbf118f7e8bd (patch)
tree087162941da7acbd7bee0898326c14c57f1026df /lib/utils/parse_options.h
parent6d49343abb0f90fdb2dd88ca639038cc7302c3dc (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.h2
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,