diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-10-01 18:29:35 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:18:08 +0200 |
commit | 69e3e06a1ab7c58b16294d0c7451b374e5966e21 (patch) | |
tree | 2505424106c7b90448262cc3bdc3f73b699ccf32 /m_option.c | |
parent | b44a0edd9fd1d88e7d114c3ba1f34662127981ad (diff) | |
download | mpv-69e3e06a1ab7c58b16294d0c7451b374e5966e21.tar.bz2 mpv-69e3e06a1ab7c58b16294d0c7451b374e5966e21.tar.xz |
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
Diffstat (limited to 'm_option.c')
-rw-r--r-- | m_option.c | 36 |
1 files changed, 17 insertions, 19 deletions
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; |