[MPlayer-dev-eng] [PATCH] -noconfig option

Alban Bedel albeu at free.fr
Sun Apr 13 14:41:24 CEST 2008


On Sun, 13 Apr 2008 13:37:41 +0200
Diego Biurrun <diego at biurrun.de> wrote:

> On Sun, Apr 13, 2008 at 02:28:04PM +0300, Ivan Kalvachev wrote:
> > On Sat, Apr 12, 2008 at 7:17 PM, Andrew Savchenko <Bircoph at list.ru>
> > wrote:
> > >
> > >  On Saturday 12 April 2008 12:57, Alban Bedel wrote:
> > >  > >  int m_config_parse_config_file(m_config_t* config, char
> > >  > > *conffile) {
> > >  > > +        if (noconfig)
> > >  > > +                return 1;
> > >  >
> > >  > I don't like that very much. Having a global simply disable a
> > >  > function is ugly. Better check before looking for config files.
> > >  > It's a bit more work but you could also allow finer disabling
> > >  > (to only use the user's config file for ex.).
> > >
> > >  Done. Some code lookup shows that there is 5 different types of
> > >  config files:
> > >  1) system-wide;
> > >  2) user-specific;
> > >  3) include;
> > >  4) user-filedir;
> > >  5) gui.
> > >
> > >  So I introduced 4 new options:
> > >  -noconfig, -disable-system-conf, -disable-user-conf, and
> > >  -disable-gui-conf (gui only). Option -noconfig is equivalent to
> > >  all -disable-*-conf specified simaltaneously.
> > 
> > How about having only one option -noconfig that takes combination of
> > parameters "system","user","include","filedir","gui", "all" ?
> 
> I agree.  Just add one global option that skips parsing any config
> file. Everything else is far too specialised to warrant adding
> another option.

I agree too, but the current ultra-trivial command line pre-parser
won't be able to handle such non-trivial options. The normal option
parser should be used instead, I'll take a look at that.

	Albeu




More information about the MPlayer-dev-eng mailing list