parse-opt: create parse_options_step.

For now it's unable to stop at unknown options, this commit merely
reorganize some code around.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Pierre Habouzit
2008-06-23 22:38:58 +02:00
committed by Junio C Hamano
parent ee68b87a62
commit ff43ec3e2d
2 changed files with 69 additions and 52 deletions

View File

@ -133,6 +133,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);