Re: show-config may print default values

"Papp Gyozo (VBuster)" <[email protected]> Fri, 12 Dec 2008 13:05:40 +0100
Newsgroups gmane.comp.gnu.gengetopt.general
Message-ID <[email protected]>
> I'm not sure I understad: do you just need that if an option contains 
> the default value it should be dumped anyway, am I right?

yes, something like that. Actually I'm talking about to extend the current condition selecting options to be dumped:

  if (args_info->help_given)
    write_into_file(outfile, "help", 0, 0 );

to something like that:

int
<parser>_dump(FILE *outfile, struct cmdline_options *args_info, int dumpall)
(...)
  if (dumpall || args_info->help_given)
    write_into_file(outfile, "help", 0, 0 );

`dumpall' argument may not be the best or ultimate choice. I rather need if *_orig differs from the actual *_arg, but chances are this kind of check makes no sense in certain cases or too difficult to implement (multiple string choices brr)... and it may be too particular request.

Anyway please think of it! :)