comparison m_config.c @ 30695:a26f6577d338

Make more option-parsing related function arguments const. Prerequisite for making stream_open filename const in a proper way.
author reimar
date Thu, 25 Feb 2010 22:32:28 +0000
parents e9b902ad0ddb
children 3dd526b691bc
comparison
equal deleted inserted replaced
30694:9be8d71ca9a5 30695:a26f6577d338
35 #include "help_mp.h" 35 #include "help_mp.h"
36 36
37 #define MAX_PROFILE_DEPTH 20 37 #define MAX_PROFILE_DEPTH 20
38 38
39 static int 39 static int
40 parse_profile(const m_option_t *opt, const char *name, char *param, void *dst, int src); 40 parse_profile(const m_option_t *opt, const char *name, const char *param, void *dst, int src);
41 41
42 static void 42 static void
43 set_profile(const m_option_t *opt, void* dst, void* src); 43 set_profile(const m_option_t *opt, void* dst, const void* src);
44 44
45 static int 45 static int
46 show_profile(m_option_t *opt, char* name, char *param); 46 show_profile(m_option_t *opt, char* name, char *param);
47 47
48 static void 48 static void
513 m_config_set_option(config,p->opts[2*i],p->opts[2*i+1]); 513 m_config_set_option(config,p->opts[2*i],p->opts[2*i+1]);
514 config->profile_depth--; 514 config->profile_depth--;
515 } 515 }
516 516
517 static int 517 static int
518 parse_profile(const m_option_t *opt, const char *name, char *param, void *dst, int src) 518 parse_profile(const m_option_t *opt, const char *name, const char *param, void *dst, int src)
519 { 519 {
520 m_config_t* config = opt->priv; 520 m_config_t* config = opt->priv;
521 char** list = NULL; 521 char** list = NULL;
522 int i,r; 522 int i,r;
523 if(param && !strcmp(param,"help")) { 523 if(param && !strcmp(param,"help")) {
549 m_option_free(opt,&list); 549 m_option_free(opt,&list);
550 return r; 550 return r;
551 } 551 }
552 552
553 static void 553 static void
554 set_profile(const m_option_t *opt, void *dst, void *src) { 554 set_profile(const m_option_t *opt, void *dst, const void *src) {
555 m_config_t* config = opt->priv; 555 m_config_t* config = opt->priv;
556 m_profile_t* p; 556 m_profile_t* p;
557 char** list = NULL; 557 char** list = NULL;
558 int i; 558 int i;
559 if(!src || !*(char***)src) return; 559 if(!src || !*(char***)src) return;