summaryrefslogtreecommitdiffstats
path: root/lib/utils/parse_options.h
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2010-10-05 11:22:58 +0200
committerNikola Pajkovsky <npajkovs@redhat.com>2010-10-05 11:24:02 +0200
commit6d49343abb0f90fdb2dd88ca639038cc7302c3dc (patch)
tree2318ebf5f07a4c007eea56fd4414e67c177d7754 /lib/utils/parse_options.h
parentaacc4082c747557a04627b304fce07ca7cdae8b2 (diff)
parse_options.c: add argument help
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'lib/utils/parse_options.h')
-rw-r--r--lib/utils/parse_options.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/utils/parse_options.h b/lib/utils/parse_options.h
index fe76a7f3..c9d849f7 100644
--- a/lib/utils/parse_options.h
+++ b/lib/utils/parse_options.h
@@ -18,12 +18,20 @@ struct options {
int short_name;
const char *long_name;
void *value;
+ const char *argh;
const char *help;
};
+/*
+ * s - short_name
+ * l - long_name
+ * v - value
+ * a - argh argument help
+ * h - help
+ */
#define OPT_END() { OPTION_END }
-#define OPT_BOOL(s, l, v, h) { OPTION_BOOL, (s), (l), (v), (h) }
-#define OPT_STRING(s, l, v, h) { OPTION_STRING, (s), (l), (v), (h) }
+#define OPT_BOOL(s, l, v, h) { OPTION_BOOL, (s), (l), (v), NULL, (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,
const char * const usage[]);