Miciah Dashiel Butler Masters <[EMAIL PROTECTED]> wrote Sat, May 07, 2005:
> On Thu, Apr 21, 2005 at 11:50:20AM -0000, [EMAIL PROTECTED] wrote:
> > [...]
> > Add --config-dump which dump a configuration file with default options to
> > stdout. Helpfull for packagemaintainers when providing an example config
> > file and it costs nearly nothing.
> > [...]
> > --- elinks/src/config/cmdline.c:1.118 Fri Apr 15 03:00:18 2005
> > +++ elinks/src/config/cmdline.c Thu Apr 21 13:50:15 2005
> > @@ -594,6 +594,24 @@
> > return NULL;
> > }
> >
> > +static unsigned char *
> > +printconfigdump_cmd(struct option *option, unsigned char ***argv, int
> > *argc)
> > +{
> > + unsigned char *config_string;
> > +
> > + /* Print all. */
> > + get_opt_int("config.saving_style") = 2;
> > +
> > + config_string = create_config_string("", "", config_options);
> > + if (config_string) {
> > + printf("%s", config_string);
> > + mem_free(config_string);
> > + }
> > +
> > + fflush(stdout);
> > + return "";
> > +}
> > +
>
> I bet that it prints the wrong value for config.saving_style.
One out of a million is not that bad. ;) But good point! Should I
introduce a global that can be checked when the config/conf.c code
would otherwise fetch the value of config.saving_style?
> In fact,
> I wouldn't be surprised if it messes up when I stick some -eval
> 'set foo = bar' before the -config-dump.
Why? It could be used for making a default config where some options
differ from the built-in.
--
Jonas Fonseca
_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev