Hi, On Sunday 13 April 2008 15:37, Diego Biurrun 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@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.
Done, thanks to the new preparser it is much easier to implement ;-). But -include and -user-filedir-conf are left untouched as described in my earlier mail: On Saturday 12 April 2008 20:17, Andrew Savchenko wrote: [...]
Behaviour of options -include and -user-filedir-conf is not changed. The reason is simple: if they are specified in the config file and -noconfig is used, they will be obviously ignored; if these options are specified in the command line together with -noconfig, than I assume that user knows what he/she is doing. This behaviour is documented in the manual.
The first patch is a bugfix for mencoder: system-wide config file reading. The second patch is -noconfig option itself, requires 1st path. The third patch is cosmetics required after previous patches. And the fourth patch is a manual page update. With best regards, Andrew