diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2009-05-07 23:44:17 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-09 11:28:53 +0400 |
commit | 2f4b97f91071f5060bf2da482cf8b0d70486d808 (patch) | |
tree | fabe7f74fafa1410676c5d15cac2de3fa93ef1ef /parse-options.h | |
parent | 5a0e4a2a326966aabb566164a7571291e34adabd (diff) |
parseopt: add OPT_NEGBIT
Add OPTION_NEGBIT and OPT_NEGBIT, mirroring OPTION_BIT and OPT_BIT.
OPT_NEGBIT can be used together with OPT_BIT to define two options
that cancel each other out.
Note: this patch removes the reminder from the test script because
it adds a test for --no-or4 and there already was one for --or4.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r-- | parse-options.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/parse-options.h b/parse-options.h index b54eec128bc..f1e2452f697 100644 --- a/parse-options.h +++ b/parse-options.h @@ -8,6 +8,7 @@ enum parse_opt_type { OPTION_GROUP, /* options with no arguments */ OPTION_BIT, + OPTION_NEGBIT, OPTION_BOOLEAN, /* _INCR would have been a better name */ OPTION_SET_INT, OPTION_SET_PTR, @@ -93,6 +94,7 @@ struct option { #define OPT_ARGUMENT(l, h) { OPTION_ARGUMENT, 0, (l), NULL, NULL, (h) } #define OPT_GROUP(h) { OPTION_GROUP, 0, NULL, NULL, NULL, (h) } #define OPT_BIT(s, l, v, h, b) { OPTION_BIT, (s), (l), (v), NULL, (h), 0, NULL, (b) } +#define OPT_NEGBIT(s, l, v, h, b) { OPTION_NEGBIT, (s), (l), (v), NULL, (h), 0, NULL, (b) } #define OPT_BOOLEAN(s, l, v, h) { OPTION_BOOLEAN, (s), (l), (v), NULL, (h) } #define OPT_SET_INT(s, l, v, h, i) { OPTION_SET_INT, (s), (l), (v), NULL, (h), 0, NULL, (i) } #define OPT_SET_PTR(s, l, v, h, p) { OPTION_SET_PTR, (s), (l), (v), NULL, (h), 0, NULL, (p) } |