Re: [PATCH 07/25] parse-options: make some arguments optional, add callbacks.
- From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
- Date
- Oct 16, 2007, 16:38 UTC
- Message-ID
- <4714E90C.80305@lsrfire.ath.cx>
- In-Reply-To
- <20071016084510.GI6919@artemis.corp>
Pierre Habouzit schrieb:
Show 10 quoted lines
> This bit is to allow to aggregate options with arguments together when
> the argument is numeric.
>
> +#if 0
> + /* can be used to understand -A1B1 like -A1 -B1 */
> + if (flag & OPT_SHORT && opt->opt && isdigit(*opt->opt)) {
> + *(int *)opt->value = strtol(opt->opt, (char **)&opt->opt, 10);
> + return 0;
> + }
> +#endifI don't like it, it complicates number options with unit suffixes (e.g. --windows-memory of git-pack-objects).
René