summaryrefslogtreecommitdiff
path: root/parse-options.h
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2008-06-23 22:28:04 +0200
committerJunio C Hamano <gitster@pobox.com>2008-06-30 14:51:12 -0700
commitee68b87a62a245fca46374fe5132aec58d802baa (patch)
tree8b60b279e33ce71dc13b4d4a979518d4b42889b5 /parse-options.h
parent7e7bbcb4b35cbb4bbb5e65cf057c84b16dbd3d39 (diff)
downloadgit-ee68b87a62a245fca46374fe5132aec58d802baa.tar.gz
parse-opt: Export a non NORETURN usage dumper.
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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/parse-options.h b/parse-options.h
index 72027f3c66..f66ca352dc 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -113,6 +113,12 @@ extern NORETURN void usage_with_options(const char * const *usagestr,
/*----- incremantal advanced APIs -----*/
+enum {
+ PARSE_OPT_HELP = -1,
+ PARSE_OPT_DONE,
+ PARSE_OPT_UNKNOWN,
+};
+
struct parse_opt_ctx_t {
const char **argv;
const char **out;
@@ -121,6 +127,9 @@ struct parse_opt_ctx_t {
int flags;
};
+extern int parse_options_usage(const char * const *usagestr,
+ const struct option *opts);
+
extern void parse_options_start(struct parse_opt_ctx_t *ctx,
int argc, const char **argv, int flags);