From 69e3e06a1ab7c58b16294d0c7451b374e5966e21 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 1 Oct 2010 18:29:35 +0000 Subject: Move code to avoid forward declarations in top-level .c files git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32421 b3059339-0415-0410-9bf9-f77b7e298cf2 --- m_option.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'm_option.c') diff --git a/m_option.c b/m_option.c index 4e8a776d26..b1b37ffc87 100644 --- a/m_option.c +++ b/m_option.c @@ -1677,8 +1677,6 @@ static int parse_obj_settings(const char* opt,char* str,const m_obj_list_t* list return 1; } -static void free_obj_settings_list(void* dst); - static int obj_settings_list_del(const char *opt_name,const char *param,void* dst, int src) { char** str_list = NULL; int r,i,idx_max = 0; @@ -1737,6 +1735,23 @@ static int obj_settings_list_del(const char *opt_name,const char *param,void* ds return 1; } +static void free_obj_settings_list(void* dst) { + int n; + m_obj_settings_t *d; + + if (!dst || !VAL(dst)) return; + + d = VAL(dst); +#ifndef NO_FREE + for (n = 0 ; d[n].name ; n++) { + free(d[n].name); + free_str_list(&(d[n].attribs)); + } + free(d); +#endif + VAL(dst) = NULL; +} + static int parse_obj_settings_list(const m_option_t* opt,const char *name, const char *param, void* dst, int src) { int n = 0,r,len = strlen(opt->name); @@ -1874,23 +1889,6 @@ static int parse_obj_settings_list(const m_option_t* opt,const char *name, return 1; } -static void free_obj_settings_list(void* dst) { - int n; - m_obj_settings_t *d; - - if(!dst || !VAL(dst)) return; - - d = VAL(dst); -#ifndef NO_FREE - for(n = 0 ; d[n].name ; n++) { - free(d[n].name); - free_str_list(&(d[n].attribs)); - } - free(d); -#endif - VAL(dst) = NULL; -} - static void copy_obj_settings_list(const m_option_t* opt,void* dst, const void* src) { m_obj_settings_t *d,*s; int n; -- cgit v1.2.3