# HG changeset patch # User diego # Date 1313084725 0 # Node ID c52940fe54dd0f94159f32863097fc4356ed7ae0 # Parent 4789b8eed97e3cbc40d6447f5e45af624d64c50b Move cfg_inc_verbose and cfg_include into mpcommon.c. diff -r 4789b8eed97e -r c52940fe54dd mencoder.c --- a/mencoder.c Thu Aug 11 13:54:24 2011 +0000 +++ b/mencoder.c Thu Aug 11 17:45:25 2011 +0000 @@ -220,16 +220,6 @@ vo_osd_changed(OSDTYPE_SUBTITLE); } -//-------------------------- config stuff: - -m_config_t* mconfig; - -static int cfg_inc_verbose(m_option_t *conf){ ++verbose; return 0;} - -static int cfg_include(m_option_t *conf, const char *filename){ - return m_config_parse_config_file(mconfig, filename); -} - static double seek_to_sec; static off_t seek_to_byte=0; diff -r 4789b8eed97e -r c52940fe54dd mpcommon.c --- a/mpcommon.c Thu Aug 11 13:54:24 2011 +0000 +++ b/mpcommon.c Thu Aug 11 17:45:25 2011 +0000 @@ -40,6 +40,7 @@ #include "cpudetect.h" #include "help_mp.h" #include "mp_msg.h" +#include "parser-cfg.h" #include "sub/spudec.h" #include "version.h" #include "sub/vobsub.h" @@ -407,6 +408,19 @@ #endif /* CONFIG_GUI */ } +m_config_t *mconfig; + +int cfg_inc_verbose(m_option_t *conf) +{ + ++verbose; + return 0; +} + +int cfg_include(m_option_t *conf, const char *filename) +{ + return m_config_parse_config_file(mconfig, filename); +} + const m_option_t noconfig_opts[] = { {"all", noconfig_all, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL}, {"system", &disable_system_conf, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 1, NULL}, diff -r 4789b8eed97e -r c52940fe54dd mpcommon.h --- a/mpcommon.h Thu Aug 11 13:54:24 2011 +0000 +++ b/mpcommon.h Thu Aug 11 17:45:25 2011 +0000 @@ -77,6 +77,9 @@ int select_audio(demuxer_t* demuxer, int audio_id, char* audio_lang); void set_osd_subtitle(subtitle *subs); +int cfg_inc_verbose(m_option_t *conf); +int cfg_include(m_option_t *conf, const char *filename); + void common_preinit(void); int common_init(void); diff -r 4789b8eed97e -r c52940fe54dd mplayer.c --- a/mplayer.c Thu Aug 11 13:54:24 2011 +0000 +++ b/mplayer.c Thu Aug 11 17:45:25 2011 +0000 @@ -145,24 +145,6 @@ float start_volume = -1; double start_pts = MP_NOPTS_VALUE; char *heartbeat_cmd; - -m_config_t *mconfig; - -//**************************************************************************// -// Config file -//**************************************************************************// - -static int cfg_inc_verbose(m_option_t *conf) -{ - ++verbose; - return 0; -} - -static int cfg_include(m_option_t *conf, const char *filename) -{ - return m_config_parse_config_file(mconfig, filename); -} - static int max_framesize; int noconsolecontrols;