From 0c1dd8a8f54a152755faef3d323ce6fdc7d63f73 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 6 Aug 2012 17:42:53 +0200 Subject: m_config: support flatten and merge flags for suboptions M_OPT_PREFIXED allows adding top-level options with the suboption mechanism. The point of this is that, even though these options are top-level options, they don't need to be added directly to a top- level option array (such as mplayer_opts[]). Instead, the suboption can be defined in a separate source file. Only a suboption declaration is needed to add these options. M_OPT_MERGE is similar to M_OPT_PREFIXED, but doesn't add the name of the suboptions entry as prefix. Given you have a suboption declaration "prefix" and the suboption "subopt", you can pass them as follows on the command line: normal: --prefix=subopt=value M_OPT_PREFIXED: --prefix-subopt=value M_OPT_MERGE: --subopt=value --- m_config.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'm_config.h') diff --git a/m_config.h b/m_config.h index 10f0cb67ed..beeab80a53 100644 --- a/m_config.h +++ b/m_config.h @@ -42,6 +42,8 @@ struct m_config_option { void *global_backup; // See \ref ConfigOptionFlags. unsigned int flags; + // If this is a suboption, the option that contains this option. + struct m_config_option *parent; }; // Profiles allow to predefine some sets of options that can then -- cgit v1.2.3