aboutsummaryrefslogtreecommitdiffstats
path: root/common/argparse.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common/argparse.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/argparse.h b/common/argparse.h
index a36218fc8..29c7b6252 100644
--- a/common/argparse.h
+++ b/common/argparse.h
@@ -94,7 +94,10 @@ typedef struct
#define ARGPARSE_TYPE_ULONG 4 /* Takes an unsigned long argument. */
#define ARGPARSE_OPT_OPTIONAL (1<<3) /* Argument is optional. */
#define ARGPARSE_OPT_PREFIX (1<<4) /* Allow 0x etc. prefixed values. */
-#define ARGPARSE_OPT_COMMAND (1<<8) /* The argument is a command. */
+#define ARGPARSE_OPT_IGNORE (1<<6) /* Ignore command or option. */
+#define ARGPARSE_OPT_COMMAND (1<<7) /* The argument is a command. */
+
+#define ARGPARSE_TYPE_MASK 7 /* Mask for the type values (internal). */
/* A set of macros to make option definitions easier to read. */
#define ARGPARSE_x(s,l,t,f,d) \
@@ -161,6 +164,8 @@ typedef struct
#define ARGPARSE_c(s,l,d) \
{ (s), (l), (ARGPARSE_TYPE_NONE | ARGPARSE_OPT_COMMAND), (d) }
+#define ARGPARSE_ignore(s,l) \
+ { (s), (l), (ARGPARSE_OPT_IGNORE), "@" }
#define ARGPARSE_group(s,d) \
{ (s), NULL, 0, (d) }