X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=parse-options.h;h=bc317e7512af7a1cc86641a651ae5415d28e71c4;hb=b773fc34a0425790db7fe7c6a2d02d742ff41081;hp=33c683cb5459f8da0e165e3d270a53a985227071;hpb=ff43ec3e2d2f71482fe17ba9ba5f4e8074cc54ee;p=git.git diff --git a/parse-options.h b/parse-options.h index 33c683cb5..bc317e751 100644 --- a/parse-options.h +++ b/parse-options.h @@ -20,6 +20,7 @@ enum parse_opt_type { enum parse_opt_flags { PARSE_OPT_KEEP_DASHDASH = 1, PARSE_OPT_STOP_AT_NON_OPTION = 2, + PARSE_OPT_KEEP_ARGV0 = 4, }; enum parse_opt_option_flags { @@ -27,6 +28,7 @@ enum parse_opt_option_flags { PARSE_OPT_NOARG = 2, PARSE_OPT_NONEG = 4, PARSE_OPT_HIDDEN = 8, + PARSE_OPT_LASTARG_DEFAULT = 16, }; struct option; @@ -119,6 +121,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;