diff options
Diffstat (limited to 'options/m_option.h')
-rw-r--r-- | options/m_option.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/options/m_option.h b/options/m_option.h index c26d1b3529..401d98473d 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -52,6 +52,7 @@ extern const m_option_type_t m_option_type_keyvalue_list; extern const m_option_type_t m_option_type_time; extern const m_option_type_t m_option_type_rel_time; extern const m_option_type_t m_option_type_choice; +extern const m_option_type_t m_option_type_flags; extern const m_option_type_t m_option_type_msglevels; extern const m_option_type_t m_option_type_print_fn; extern const m_option_type_t m_option_type_subconfig; @@ -626,6 +627,9 @@ extern const char m_option_path_separator; #define OPT_CHOICE_(optname, varname, flags, choices, ...) \ OPT_GENERAL(int, optname, varname, flags, M_CHOICES(choices), __VA_ARGS__) +#define OPT_FLAGS(...) \ + OPT_CHOICE_(__VA_ARGS__, .type = &m_option_type_flags) + // Union of choices and an int range. The choice values can be included in the // int range, or be completely separate - both works. #define OPT_CHOICE_OR_INT_(optname, varname, flags, minval, maxval, choices, ...) \ |