Re: [PATCH 07/25] parse-options: make some arguments optional, add callbacks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 16 Oct 2007, Pierre Habouzit wrote:

> 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;
>     +		}
>     +#endif
> 
> I'm not a huge fan, but people may like it. Feel free to keep the
> chunk, drop it, or enable it to your liking.

FWIW I like it.  It allows me to aggregate options such as -M30 with other 
short options.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux