X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=parse-options.h;h=05eb09b878fd94cfcc549622a35a0b897fa56cb9;hb=6fcb384869720ed2e9ea7de1938e44c54e56a75a;hp=d1b12fe979b34ac9bbf2ff637934b96f3878a53d;hpb=5480861c24b6f5830c2301ae2f50e21ef3cdeaf2;p=git.git diff --git a/parse-options.h b/parse-options.h index d1b12fe97..05eb09b87 100644 --- a/parse-options.h +++ b/parse-options.h @@ -130,6 +130,9 @@ struct option { (h), PARSE_OPT_NOARG, NULL, (p) } #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) } +#define OPT_STRING_LIST(s, l, v, a, h) \ + { OPTION_CALLBACK, (s), (l), (v), (a), \ + (h), 0, &parse_opt_string_list } #define OPT_UYN(s, l, v, h) { OPTION_CALLBACK, (s), (l), (v), NULL, \ (h), PARSE_OPT_NOARG, &parse_opt_tertiary } #define OPT_DATE(s, l, v, h) \ @@ -204,6 +207,7 @@ extern int parse_opt_color_flag_cb(const struct option *, const char *, int); extern int parse_opt_verbosity_cb(const struct option *, const char *, int); extern int parse_opt_with_commit(const struct option *, const char *, int); extern int parse_opt_tertiary(const struct option *, const char *, int); +extern int parse_opt_string_list(const struct option *, const char *, int); #define OPT__VERBOSE(var, h) OPT_BOOLEAN('v', "verbose", (var), (h)) #define OPT__QUIET(var, h) OPT_BOOLEAN('q', "quiet", (var), (h))