1
mirror of https://github.com/mpv-player/mpv synced 2025-01-13 00:06:25 +01:00

options: remove unused "func_full" option type

vo_zr was the last user of the "func_full" option type. I think it's
better if future features are implemented using more straightforward
option functionality. Delete the func_full implementation.
This commit is contained in:
Uoti Urpala 2011-01-31 05:13:29 +02:00
parent 626d5ed628
commit f923fd720c
3 changed files with 2 additions and 43 deletions

View File

@ -59,18 +59,6 @@ const m_option_t tvscan_conf[]={
{NULL, NULL, 0, 0, 0, 0, NULL}
};
#endif
/*
* CONF_TYPE_FUNC_FULL :
* allows own implementations for passing the params
*
* the function receives parameter name and argument (if it does not start with - )
* useful with a conf.name like 'aa*' to parse several parameters to a function
* return 0 =ok, but we didn't need the param (could be the filename)
* return 1 =ok, we accepted the param
* negative values: see cfgparser.h, ERR_XXX
*
* by Folke
*/
const m_option_t mplayer_opts[]={
/* name, pointer, type, flags, min, max */

View File

@ -805,7 +805,7 @@ const m_option_type_t m_option_type_string_list = {
/////////////////// Func based options
// A chained list to save the various calls for func_param and func_full
// A chained list to save the various calls for func_param
typedef struct m_func_save m_func_save_t;
struct m_func_save {
m_func_save_t* next;
@ -833,7 +833,7 @@ static void free_func_pf(void* src) {
VAL(src) = NULL;
}
// Parser for func_param and func_full
// Parser for func_param
static int parse_func_pf(const m_option_t* opt,const char *name, const char *param, void* dst, int src) {
m_func_save_t *s,*p;
@ -906,33 +906,6 @@ const m_option_type_t m_option_type_func_param = {
free_func_pf
};
/////////////////// Func_full
static void set_func_full(const m_option_t* opt, void* dst, const void* src) {
m_func_save_t* s;
if(!src) return;
for(s = VAL(src) ; s ; s = s->next) {
// Revert if needed
if(opt->priv) ((m_opt_default_func_t)opt->priv)(opt,s->name);
((m_opt_func_full_t) opt->p)(opt,s->name,s->param);
}
}
const m_option_type_t m_option_type_func_full = {
"Func full",
"",
sizeof(m_func_save_t*),
M_OPT_TYPE_ALLOW_WILDCARD|M_OPT_TYPE_INDIRECT,
parse_func_pf,
NULL,
NULL, // Nothing to do on save
set_func_full,
copy_func_pf,
free_func_pf
};
/////////////// Func
#undef VAL

View File

@ -63,7 +63,6 @@ extern const m_option_type_t m_option_type_imgfmt;
extern const m_option_type_t m_option_type_afmt;
// Func-based types
extern const m_option_type_t m_option_type_func_full;
extern const m_option_type_t m_option_type_func_param;
extern const m_option_type_t m_option_type_func;
@ -188,7 +187,6 @@ struct m_opt_choice_alternatives {
#define CONF_TYPE_PRINT (&m_option_type_print)
#define CONF_TYPE_PRINT_INDIRECT (&m_option_type_print_indirect)
#define CONF_TYPE_PRINT_FUNC (&m_option_type_print_func)
#define CONF_TYPE_FUNC_FULL (&m_option_type_func_full)
#define CONF_TYPE_SUBCONFIG (&m_option_type_subconfig)
#define CONF_TYPE_STRING_LIST (&m_option_type_string_list)
#define CONF_TYPE_POSITION (&m_option_type_position)