diff options
author | Pierre Habouzit <madcoder@debian.org> | 2008-06-23 23:59:37 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-01 01:51:12 +0400 |
commit | 7e7bbcb4b35cbb4bbb5e65cf057c84b16dbd3d39 (patch) | |
tree | ecaf8d36e04e44317936634c0eabdc714f07fc50 /parse-options.h | |
parent | 112db553b0db4c4f2b39e5e3e433b2102be10085 (diff) |
parse-opt: have parse_options_{start,end}.
Make the struct optparse_t public under the better name parse_opt_ctx_t.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r-- | parse-options.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/parse-options.h b/parse-options.h index 4ee443dafe1..72027f3c66e 100644 --- a/parse-options.h +++ b/parse-options.h @@ -111,6 +111,22 @@ extern int parse_options(int argc, const char **argv, extern NORETURN void usage_with_options(const char * const *usagestr, const struct option *options); +/*----- incremantal advanced APIs -----*/ + +struct parse_opt_ctx_t { + const char **argv; + const char **out; + int argc, cpidx; + const char *opt; + int flags; +}; + +extern void parse_options_start(struct parse_opt_ctx_t *ctx, + int argc, const char **argv, int flags); + +extern int parse_options_end(struct parse_opt_ctx_t *ctx); + + /*----- some often used options -----*/ extern int parse_opt_abbrev_cb(const struct option *, const char *, int); extern int parse_opt_approxidate_cb(const struct option *, const char *, int); |