summaryrefslogtreecommitdiffstats
path: root/util/argconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/argconfig.h')
-rw-r--r--util/argconfig.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/util/argconfig.h b/util/argconfig.h
index 3147277..a11334b 100644
--- a/util/argconfig.h
+++ b/util/argconfig.h
@@ -38,7 +38,7 @@
#include <stdarg.h>
enum argconfig_types {
- CFG_NONE,
+ CFG_FLAG,
CFG_STRING,
CFG_INT,
CFG_SIZE,
@@ -65,7 +65,7 @@ enum argconfig_types {
#define OPT_END() { NULL }
#define OPT_FLAG(l, s, v, d) \
- {l, s, NULL, CFG_NONE, v, no_argument, d}
+ {l, s, NULL, CFG_FLAG, v, no_argument, d}
#define OPT_SUFFIX(l, s, v, d) \
{l, s, "IONUM", CFG_LONG_SUFFIX, v, required_argument, d}
@@ -91,12 +91,16 @@ enum argconfig_types {
#define OPT_SHRT(l, s, v, d) \
{l, s, "NUM", CFG_SHORT, v, required_argument, d}
+#define OPT_INCR(l, s, v, d) \
+ {l, s, "NUM", CFG_INCREMENT, v, no_argument, d}
+
#define OPT_STRING(l, s, m, v, d) \
{l, s, m, CFG_STRING, v, required_argument, d}
#define OPT_FMT(l, s, v, d) OPT_STRING(l, s, "FMT", v, d)
#define OPT_FILE(l, s, v, d) OPT_STRING(l, s, "FILE", v, d)
#define OPT_LIST(l, s, v, d) OPT_STRING(l, s, "LIST", v, d)
+#define OPT_STR(l, s, v, d) OPT_STRING(l, s, "STRING", v, d)
struct argconfig_commandline_options {
const char *option;