On 17 Oct 2007 at 12:41, Lorenzo Bettini wrote:
> Actually setting print_errors to 0 in the _init function causes
> previous code not to work anymore in some cases, and this is quite
> dangerous (e.g., some tests in the testsuite do not print error
> messages anymore); thus I set print_errors to 1 also in the _init
> function and changed the documentation accordingly.
I don't quite understand the intent of the "_init" function. Wouldn't it
make more sense if it initialized the values to the defaults (override = 0,
initialize = 1, check_required = 1), rather than to all zeros? Then:
params = cmdline_parser_params_init();
i = cmdline_parser_ext (..., params);
...would be the same as:
i = cmdline_parser (...);
...and then in using "cmdline_parser_params_init", you would only have to
change those items where the default behavior is not what is wanted.
But maybe I don't understand gengetopt enough yet to know why zeros are
best.
-- Dave
_______________________________________________
Help-gengetopt mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gengetopt