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

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

 



Johannes Schindelin schrieb:
> Hi,
> 
> On Tue, 16 Oct 2007, Ren? Scharfe wrote:
> 
>> Pierre Habouzit schrieb:
>>> 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 don't like it, it complicates number options with unit suffixes (e.g.
>> --windows-memory of git-pack-objects).
> 
> Why?  It only means that you cannot say -W10mxabc instead of -W10m xabc.  
> 
> Remember: this is a special case for OPT_INTEGER.  Nothing to do with 
> OPT_SIZE, which you'd probably implement as a callback.

You mean I need to take a look at the actual patch to get a bit more
context? ;-)  Now that I did, I retract my comment.

Pierre, FYI: I didn't see your patches coming through the NNTP gateway
of gmane.org, which is my way of reading this list.  Its web interface
doesn't show them, either, so it's probably not caused by my news reader.

René
-
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