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

Diego Biurrun diego at biurrun.de
Sun Apr 13 13:37:41 CEST 2008


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.

Diego



More information about the MPlayer-dev-eng mailing list