cleanup: remove M_OPT_NOCMD

Unused.
This commit is contained in:
wm4
2012-10-30 19:50:22 +01:00
parent f211733123
commit 0502b69672
2 changed files with 2 additions and 13 deletions
+2 -9
View File
@@ -406,12 +406,6 @@ static int m_config_parse_option(struct m_config *config, void *optstruct,
BSTR_P(name));
return M_OPT_INVALID;
}
if ((config->mode == M_COMMAND_LINE) && (co->opt->flags & M_OPT_NOCMD)) {
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,
"The %.*s option can't be used on the command line.\n",
BSTR_P(name));
return M_OPT_INVALID;
}
if (config->file_local_mode && (co->opt->flags & M_OPT_GLOBAL)) {
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,
"The %.*s option is global and can't be set per-file.\n",
@@ -548,7 +542,7 @@ void m_config_print_option_list(const struct m_config *config)
return;
mp_tmsg(MSGT_CFGPARSER, MSGL_INFO,
"\n Name Type Min Max Global CL Cfg\n\n");
"\n Name Type Min Max Global Cfg\n\n");
for (co = config->opts; co; co = co->next) {
const struct m_option *opt = co->opt;
if (opt->type->flags & M_OPT_TYPE_HAS_CHILD)
@@ -562,13 +556,12 @@ void m_config_print_option_list(const struct m_config *config)
else
strcpy(max, "No");
mp_msg(MSGT_CFGPARSER, MSGL_INFO,
" %-20.20s %-15.15s %-10.10s %-10.10s %-3.3s %-3.3s %-3.3s\n",
" %-20.20s %-15.15s %-10.10s %-10.10s %-3.3s %-3.3s\n",
co->name,
co->opt->type->name,
min,
max,
opt->flags & CONF_GLOBAL ? "Yes" : "No",
opt->flags & CONF_NOCMD ? "No" : "Yes",
opt->flags & CONF_NOCFG ? "No" : "Yes");
count++;
}
-4
View File
@@ -313,9 +313,6 @@ struct m_option {
// The option is forbidden in config files.
#define M_OPT_NOCFG (1 << 2)
// The option is forbidden on the command line.
#define M_OPT_NOCMD (1 << 3)
// This option can't be set per-file when used with struct m_config.
#define M_OPT_GLOBAL (1 << 4)
@@ -340,7 +337,6 @@ struct m_option {
#define CONF_MAX M_OPT_MAX
#define CONF_RANGE M_OPT_RANGE
#define CONF_NOCFG M_OPT_NOCFG
#define CONF_NOCMD M_OPT_NOCMD
#define CONF_GLOBAL M_OPT_GLOBAL
#define CONF_PRE_PARSE M_OPT_PRE_PARSE