Re: [PATCH] Port builtin-add.c to use the new option parser.
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Oct 13, 2007, 19:22 UTC
- Message-ID
- <20071013192213.GB2875@steel.home>
- In-Reply-To
- <20071013150306.GH7110@artemis.corp>
Pierre Habouzit, Sat, Oct 13, 2007 17:03:06 +0200:
Show 7 quoted lines
> On Sat, Oct 13, 2007 at 02:47:20PM +0000, Johannes Schindelin wrote: > > Thinking about this more, I am reverting my stance on the ARRAY_SIZE() > > issue. I think if you introduce a "OPTION_NONE = 0" in the enum, then > > this single last comma should be enough. > > adding a trailing comma does not add a NULL after that, it's ignored, > you're confused.
Yep
> Note that I don't really like using ARRAY_SIZE either, I kept it that > way, but my taste would rather be to have an "empty" option, and > explicitely mark the end of the array.
You can have both. Just stop at NULL-entry or when the 'size' elements passed, whatever happens first.