From 9fbfac25daaf6bdaab4c1213a294b59bded29b24 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Mon, 7 May 2012 23:51:58 +0300 Subject: options: change -v parsing Handle -v flags as a special case in command line preparsing stage, and change the option entry into a dummy one. Specifying "v" in config file no longer works (and the dummy entry shows an error in this case); "msglevel" can still be used for that purpose. Because the flag is now interpreted at an earlier parsing stage, it now affects the printing of some early messages that were only affected by the MPLAYER_VERBOSE environment variable before. The main motivation for this change is to get rid of the last CONF_TYPE_FUNC option. --- cfg-mplayer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cfg-mplayer.h') diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 6d105569ae..66b381a920 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -373,7 +373,8 @@ const m_option_t common_opts[] = { // ------------------------- common options -------------------- OPT_MAKE_FLAGS("quiet", quiet, CONF_GLOBAL), {"really-quiet", &verbose, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_PRE_PARSE, 0, -10, NULL}, - {"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, NULL}, + // -v is handled in command line preparser + {"v", NULL, CONF_TYPE_FLAG, 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}, {"nomsgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL}, -- cgit v1.2.3