summaryrefslogtreecommitdiffstats
path: root/m_option.c
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-12 12:39:05 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-12 12:39:05 +0000
commit20acd250c5c5b787e7a7226759752c5905eef13d (patch)
tree7e3540cbe6145096853b69b8a985d147483fd348 /m_option.c
parent66f4e56389d97b61a4a17325201643ef6bd87e37 (diff)
downloadmpv-20acd250c5c5b787e7a7226759752c5905eef13d.tar.bz2
mpv-20acd250c5c5b787e7a7226759752c5905eef13d.tar.xz
Fix the Gui with NEW_CONFIG
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8169 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'm_option.c')
-rw-r--r--m_option.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/m_option.c b/m_option.c
index a5824895ee..dda0cfba37 100644
--- a/m_option.c
+++ b/m_option.c
@@ -315,7 +315,7 @@ static int parse_str(m_option_t* opt,char *name, char *param, void* dst, int src
}
static char* print_str(m_option_t* opt, void* val) {
- return (val && VAL(val) && strlen(VAL(val)) > 0) ? strdup(VAL(val)) : strdup("(empty)");
+ return (val && VAL(val) && strlen(VAL(val)) > 0) ? strdup(VAL(val)) : NULL;
}
static void copy_str(m_option_t* opt,void* dst, void* src) {
@@ -559,7 +559,23 @@ static void copy_str_list(m_option_t* opt,void* dst, void* src) {
}
static char* print_str_list(m_option_t* opt, void* src) {
- return strdup("TODO ;)");
+ char **lst = NULL;
+ char *ret = NULL,*last = NULL;
+ int i;
+
+ if(!(src && VAL(src))) return NULL;
+ lst = VAL(src);
+
+ for(i = 0 ; lst[i] ; i++) {
+ if(last) {
+ ret = dup_printf("%s,%s",last,lst[i]);
+ free(last);
+ } else
+ ret = strdup(lst[i]);
+ last = ret;
+ }
+ if(last && last != ret) free(last);
+ return ret;
}
m_option_type_t m_option_type_string_list = {