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>
diff --git a/parse-options.h b/parse-options.h
index 72027f3..f66ca35 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -113,6 +113,12 @@
 
 /*----- 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 @@
 	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);