Hi, On Fri, Jun 21, 2013 at 02:43:30PM +0200, Arne Schwabe wrote: > +.B \-\-ignore-unknown-option opt1 opt2 opt3 ... optN > +When one of options
Feature-ACK, but the code confuses me a bit...
> + else if (streq (p[0], "ignore-unknown-option") && p[1])
> + {
> + int i;
> + int j;
> + int numignored=0;
> + const char **ignore;
> +
> + VERIFY_PERMISSION (OPT_P_GENERAL);
> + /* Find out how many options to be ignored */
> + for (i=1;p[i];i++)
> + numignored++;
> +
> + numignored=i;
This... (I think the "numignored=i" bit should just go - while it does
not harm, it doesn't help, and confuses people :-))
> + {
> + const char* opt = options->ignore_unknown_option[i];
> +
> + if (streq(p[0], opt))
... and I'm not *so* happy about that either - if you only need "opt" once,
why add an extra variable for that? Code is technically OK, though.
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]
fax: +49-89-35655025 [email protected]
pgp4ZJz1K1db4.pgp
Description: PGP signature
