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. --- mplayer.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 2ca8518335..e1984e601c 100644 --- a/mplayer.c +++ b/mplayer.c @@ -149,12 +149,6 @@ char *heartbeat_cmd; // Config file //**************************************************************************// -static int cfg_inc_verbose(m_option_t *conf) -{ - ++verbose; - return 0; -} - #include "path.h" //**************************************************************************// @@ -3952,7 +3946,7 @@ int main(int argc, char *argv[]) mp_input_register_options(mpctx->mconfig); // Preparse the command line - m_config_preparse_command_line(mpctx->mconfig, argc, argv); + m_config_preparse_command_line(mpctx->mconfig, argc, argv, &verbose); #if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL) set_path_env(); -- cgit v1.2.3