summaryrefslogtreecommitdiff
path: root/parse-options.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-03-24 08:20:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-24 13:21:23 (GMT)
commit31fba9d3b4d37518be3261af430f81af375de16e (patch)
treeb7d08bb3f250a8e1bd9140fac86ffed5933e8e3b /parse-options.h
parentd877418390168c9696fd46d5e78ca3362f26f74c (diff)
downloadgit-31fba9d3b4d37518be3261af430f81af375de16e.zip
git-31fba9d3b4d37518be3261af430f81af375de16e.tar.gz
git-31fba9d3b4d37518be3261af430f81af375de16e.tar.bz2
diff-parseopt: convert --[src|dst]-prefix
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r--parse-options.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse-options.h b/parse-options.h
index 7d83e29..c95cbe2 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -136,6 +136,7 @@ struct option {
#define OPT_BOOL_F(s, l, v, h, f) OPT_SET_INT_F(s, l, v, h, 1, f)
#define OPT_CALLBACK_F(s, l, v, a, h, f, cb) \
{ OPTION_CALLBACK, (s), (l), (v), (a), (h), (f), (cb) }
+#define OPT_STRING_F(s, l, v, a, h, f) { OPTION_STRING, (s), (l), (v), (a), (h), (f) }
#define OPT_END() { OPTION_END }
#define OPT_ARGUMENT(l, h) { OPTION_ARGUMENT, 0, (l), NULL, NULL, \
@@ -157,7 +158,7 @@ struct option {
#define OPT_INTEGER(s, l, v, h) { OPTION_INTEGER, (s), (l), (v), N_("n"), (h) }
#define OPT_MAGNITUDE(s, l, v, h) { OPTION_MAGNITUDE, (s), (l), (v), \
N_("n"), (h), PARSE_OPT_NONEG }
-#define OPT_STRING(s, l, v, a, h) { OPTION_STRING, (s), (l), (v), (a), (h) }
+#define OPT_STRING(s, l, v, a, h) OPT_STRING_F(s, l, v, a, h, 0)
#define OPT_STRING_LIST(s, l, v, a, h) \
{ OPTION_CALLBACK, (s), (l), (v), (a), \
(h), 0, &parse_opt_string_list }