diff mpcommon.c @ 33877:c52940fe54dd

Move cfg_inc_verbose and cfg_include into mpcommon.c.
author diego
date Thu, 11 Aug 2011 17:45:25 +0000
parents 277ec491a8a7
children 18dfcac48055
line wrap: on
line diff
--- 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},