options: respect --no-msgcolor during early program start

Using --no-msgcolor, error messages that happened before "really"
parsing the command line were still printed in color. Add the
CONF_PRE_PARSE flag to make this option take effect as early as
possible.
This commit is contained in:
wm4
2012-11-16 21:21:15 +01:00
parent 2628ff6224
commit db45c8771a
+1 -1
View File
@@ -320,7 +320,7 @@ const m_option_t common_opts[] = {
// -v is handled in command line preparser
{"v", NULL, CONF_TYPE_FLAG, CONF_GLOBAL | CONF_NOCFG, 0, 0, NULL},
{"msglevel", (void *) msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
{"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL | CONF_PRE_PARSE, 0, 1, NULL},
{"msgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
#ifdef CONFIG_PRIORITY
{"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL},