From 1a5a7a49293c2c70a5caf9d51dad7bd5aa938471 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 18 Sep 2012 15:50:24 +0200 Subject: options: accept "yes" and "no" only for flags This removes the alternative values like "off", "0", "false" etc., and also the non-English versions of these. This is done for general consistency. It's better to have a single way of doing things when multiple ways don't add singificant value. Also update some choices for consistency. --- m_option.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'm_option.h') diff --git a/m_option.h b/m_option.h index acbbb3fd9f..69694c4286 100644 --- a/m_option.h +++ b/m_option.h @@ -488,7 +488,7 @@ static inline void m_option_free(const m_option_t *opt, void *dst) #define OPT_CHOICE_OR_INT_(optname, varname, flags, minval, maxval, choices, ...) OPT_GENERAL(optname, varname, (flags) | CONF_RANGE, .min = minval, .max = maxval, .priv = (void *)&(const struct m_opt_choice_alternatives[]){OPT_HELPER_REMOVEPAREN choices, {NULL}}, __VA_ARGS__) #define OPT_TIME(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_time) -#define OPT_TRACKCHOICE(name, var) OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"off", -2}, {"no", -2}, {"auto", -1})) +#define OPT_TRACKCHOICE(name, var) OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"no", -2}, {"auto", -1})) // subconf must have the type struct m_sub_options. // flagv should be M_OPT_MERGE or M_OPT_FLATTEN. -- cgit v1.2.3