From eed2e8e82082f78b6b38af1531c91bff91d0246c Mon Sep 17 00:00:00 2001 From: albeu Date: Tue, 24 Jan 2006 11:14:13 +0000 Subject: New option type to print help text with a function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17471 b3059339-0415-0410-9bf9-f77b7e298cf2 --- m_option.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'm_option.c') diff --git a/m_option.c b/m_option.c index 5222b26841..850d117594 100644 --- a/m_option.c +++ b/m_option.c @@ -824,6 +824,8 @@ m_option_type_t m_option_type_func = { static int parse_print(m_option_t* opt,char *name, char *param, void* dst, int src) { if(opt->type == CONF_TYPE_PRINT_INDIRECT) mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", *(char **) opt->p); + else if(opt->type == CONF_TYPE_PRINT_FUNC) + return ((m_opt_func_full_t) opt->p)(opt,name,param); else mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", (char *) opt->p); @@ -858,6 +860,19 @@ m_option_type_t m_option_type_print_indirect = { NULL }; +m_option_type_t m_option_type_print_func = { + "Print", + "", + 0, + M_OPT_TYPE_ALLOW_WILDCARD, + parse_print, + NULL, + NULL, + NULL, + NULL, + NULL +}; + /////////////////////// Subconfig #undef VAL -- cgit v1.2.3