]> asedeno.scripts.mit.edu Git - git.git/blobdiff - parse-options.h
parse-opt: fake short strings for callers to believe in.
[git.git] / parse-options.h
index f66ca352dc050bd65fdc15a7dd763b69cdec92df..aeed627e9757df03df94a2c93bbd8112f4bb9a2c 100644 (file)
@@ -119,6 +119,11 @@ enum {
        PARSE_OPT_UNKNOWN,
 };
 
+/*
+ * It's okay for the caller to consume argv/argc in the usual way.
+ * Other fields of that structure are private to parse-options and should not
+ * be modified in any way.
+ */
 struct parse_opt_ctx_t {
        const char **argv;
        const char **out;
@@ -133,6 +138,10 @@ extern int parse_options_usage(const char * const *usagestr,
 extern void parse_options_start(struct parse_opt_ctx_t *ctx,
                                int argc, const char **argv, int flags);
 
+extern int parse_options_step(struct parse_opt_ctx_t *ctx,
+                             const struct option *options,
+                             const char * const usagestr[]);
+
 extern int parse_options_end(struct parse_opt_ctx_t *ctx);