Re: [PATCH] Port builtin-add.c to use the new option parser.
On Sat, Oct 13, 2007 at 07:22:13PM +0000, Alex Riesen wrote:
Show 17 quoted lines
> Pierre Habouzit, Sat, Oct 13, 2007 17:03:06 +0200:
> > 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.
Well I dislike the "count" thing, and Dscho agreed that it somehow
sucked too. If you go see the current state of the ph/parseopt series
you'll see it's not here anymore.
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org