diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-02 15:56:38 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-02 15:56:38 +0000 |
commit | 2e18988a04197bce8f26d373fe6a450e8de0ba81 (patch) | |
tree | 71d921c5824fa4c8858990187f39d17fbb774d99 /m_option.c | |
parent | 9870aa54e357b882b8172f4d3ce28d63545c4761 (diff) | |
download | mpv-2e18988a04197bce8f26d373fe6a450e8de0ba81.tar.bz2 mpv-2e18988a04197bce8f26d373fe6a450e8de0ba81.tar.xz |
Option print functions may not and do not modify value
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25257 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'm_option.c')
-rw-r--r-- | m_option.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/m_option.c b/m_option.c index 14368c9add..4ce5c60dbc 100644 --- a/m_option.c +++ b/m_option.c @@ -114,7 +114,7 @@ static int parse_flag(const m_option_t* opt,const char *name, char *param, void* } } -static char* print_flag(const m_option_t* opt, void* val) { +static char* print_flag(const m_option_t* opt, const void* val) { if(VAL(val) == opt->min) return strdup("no"); else @@ -167,7 +167,7 @@ static int parse_int(const m_option_t* opt,const char *name, char *param, void* return 1; } -static char* print_int(const m_option_t* opt, void* val) { +static char* print_int(const m_option_t* opt, const void* val) { opt = NULL; return dup_printf("%d",VAL(val)); } @@ -239,7 +239,7 @@ static int parse_double(const m_option_t* opt,const char *name, char *param, voi return 1; } -static char* print_double(const m_option_t* opt, void* val) { +static char* print_double(const m_option_t* opt, const void* val) { opt = NULL; return dup_printf("%f",VAL(val)); } @@ -267,7 +267,7 @@ static int parse_float(const m_option_t* opt,const char *name, char *param, void return r; } -static char* print_float(const m_option_t* opt, void* val) { +static char* print_float(const m_option_t* opt, const void* val) { opt = NULL; return dup_printf("%f",VAL(val)); } @@ -322,7 +322,7 @@ static int parse_position(const m_option_t* opt,const char *name, char *param, v return 1; } -static char* print_position(const m_option_t* opt, void* val) { +static char* print_position(const m_option_t* opt, const void* val) { return dup_printf("%"PRId64,(int64_t)VAL(val)); } @@ -373,7 +373,7 @@ static int parse_str(const m_option_t* opt,const char *name, char *param, void* } -static char* print_str(const m_option_t* opt, void* val) { +static char* print_str(const m_option_t* opt, const void* val) { return (val && VAL(val) && strlen(VAL(val)) > 0) ? strdup(VAL(val)) : NULL; } @@ -636,7 +636,7 @@ static void copy_str_list(const m_option_t* opt,void* dst, void* src) { VAL(dst) = d; } -static char* print_str_list(const m_option_t* opt, void* src) { +static char* print_str_list(const m_option_t* opt, const void* src) { char **lst = NULL; char *ret = NULL,*last = NULL; int i; |