Skip to content

Commit 4c49dd0

Browse files
committed
Merge branch 'nd/diff-parseopt'
Compilation fix. * nd/diff-parseopt: parseopt: move definition of enum parse_opt_result up
2 parents d8b1ce7 + 19800bd commit 4c49dd0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

parse-options.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ enum parse_opt_option_flags {
4646
PARSE_OPT_COMP_ARG = 1024
4747
};
4848

49+
enum parse_opt_result {
50+
PARSE_OPT_COMPLETE = -3,
51+
PARSE_OPT_HELP = -2,
52+
PARSE_OPT_ERROR = -1, /* must be the same as error() */
53+
PARSE_OPT_DONE = 0, /* fixed so that "return 0" works */
54+
PARSE_OPT_NON_OPTION,
55+
PARSE_OPT_UNKNOWN
56+
};
57+
4958
struct option;
5059
typedef int parse_opt_cb(const struct option *, const char *arg, int unset);
5160

@@ -241,15 +250,6 @@ const char *optname(const struct option *opt, int flags);
241250

242251
/*----- incremental advanced APIs -----*/
243252

244-
enum parse_opt_result {
245-
PARSE_OPT_COMPLETE = -3,
246-
PARSE_OPT_HELP = -2,
247-
PARSE_OPT_ERROR = -1, /* must be the same as error() */
248-
PARSE_OPT_DONE = 0, /* fixed so that "return 0" works */
249-
PARSE_OPT_NON_OPTION,
250-
PARSE_OPT_UNKNOWN
251-
};
252-
253253
/*
254254
* It's okay for the caller to consume argv/argc in the usual way.
255255
* Other fields of that structure are private to parse-options and should not

0 commit comments

Comments
 (0)