diff options
author | reynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-09 17:45:36 +0000 |
---|---|---|
committer | reynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-09 17:45:36 +0000 |
commit | 4728357b58f053c28abf9bfb5e938f4dc7556790 (patch) | |
tree | 0e80eb644c6dbd42b3a1f937821f32a39e6b939d | |
parent | 2efd5b393de605e5e94123ce421e7c52e84a9faa (diff) |
Marks several string parameters as const when they are not modified in the function, Patch by Stefan Huehner, stefan AT huehner-org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18985 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | codec-cfg.c | 2 | ||||
-rw-r--r-- | codec-cfg.h | 2 | ||||
-rw-r--r-- | libmpcodecs/ve.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vf.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vf.h | 6 | ||||
-rw-r--r-- | libvo/font_load.c | 2 | ||||
-rw-r--r-- | libvo/font_load.h | 4 | ||||
-rw-r--r-- | libvo/font_load_ft.c | 4 | ||||
-rw-r--r-- | mencoder.c | 2 | ||||
-rw-r--r-- | subreader.c | 2 | ||||
-rw-r--r-- | subreader.h | 2 |
11 files changed, 16 insertions, 16 deletions
diff --git a/codec-cfg.c b/codec-cfg.c index 588baa06b0..21c3b89862 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -486,7 +486,7 @@ static codecs_t *audio_codecs=NULL; static int nr_vcodecs = 0; static int nr_acodecs = 0; -int parse_codec_cfg(char *cfgfile) +int parse_codec_cfg(const char *cfgfile) { codecs_t *codec = NULL; // current codec codecs_t **codecsp = NULL;// points to audio_codecs or to video_codecs diff --git a/codec-cfg.h b/codec-cfg.h index 8e7649d17d..9d81961659 100644 --- a/codec-cfg.h +++ b/codec-cfg.h @@ -58,7 +58,7 @@ typedef struct codecs_st { short cpuflags; } codecs_t; -int parse_codec_cfg(char *cfgfile); +int parse_codec_cfg(const char *cfgfile); codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start, int force); codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap, diff --git a/libmpcodecs/ve.c b/libmpcodecs/ve.c index 4409a10e45..5856c8e651 100644 --- a/libmpcodecs/ve.c +++ b/libmpcodecs/ve.c @@ -46,7 +46,7 @@ static vf_info_t* encoder_list[]={ NULL }; -vf_instance_t* vf_open_encoder(vf_instance_t* next, char *name, char *args){ +vf_instance_t* vf_open_encoder(vf_instance_t* next, const char *name, char *args){ char* vf_args[] = { "_oldargs_", args, NULL }; return vf_open_plugin(encoder_list,next,name,vf_args); } diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index f93aebf085..3df26ef639 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -436,7 +436,7 @@ static int vf_default_query_format(struct vf_instance_s* vf, unsigned int fmt){ return vf_next_query_format(vf,fmt); } -vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char *name, char **args){ +vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, const char *name, char **args){ vf_instance_t* vf; int i; for(i=0;;i++){ @@ -475,7 +475,7 @@ vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char return NULL; } -vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char **args){ +vf_instance_t* vf_open_filter(vf_instance_t* next, const char *name, char **args){ if(args && strcmp(args[0],"_oldargs_")) { int i,l = 0; for(i = 0 ; args && args[2*i] ; i++) diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h index 29640bc9fb..cb6839d571 100644 --- a/libmpcodecs/vf.h +++ b/libmpcodecs/vf.h @@ -89,10 +89,10 @@ typedef struct vf_seteq_s void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h); mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h); -vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char *name, char **args); -vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char **args); +vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, const char *name, char **args); +vf_instance_t* vf_open_filter(vf_instance_t* next, const char *name, char **args); vf_instance_t* vf_add_before_vo(vf_instance_t **vf, char *name, char **args); -vf_instance_t* vf_open_encoder(vf_instance_t* next, char *name, char *args); +vf_instance_t* vf_open_encoder(vf_instance_t* next, const char *name, char *args); unsigned int vf_match_csp(vf_instance_t** vfp,unsigned int* list,unsigned int preferred); void vf_clone_mpi_attributes(mp_image_t* dst, mp_image_t* src); diff --git a/libvo/font_load.c b/libvo/font_load.c index be445de86a..9f0204b5c7 100644 --- a/libvo/font_load.c +++ b/libvo/font_load.c @@ -49,7 +49,7 @@ err_out: extern int sub_unicode; -font_desc_t* read_font_desc(char* fname,float factor,int verbose){ +font_desc_t* read_font_desc(const char* fname,float factor,int verbose){ unsigned char sor[1024]; unsigned char sor2[1024]; font_desc_t *desc; diff --git a/libvo/font_load.h b/libvo/font_load.h index b125b9db7b..629dcd336c 100644 --- a/libvo/font_load.h +++ b/libvo/font_load.h @@ -80,7 +80,7 @@ extern int force_load_font; int init_freetype(void); int done_freetype(void); -font_desc_t* read_font_desc_ft(char* fname,int movie_width, int movie_height); +font_desc_t* read_font_desc_ft(const char* fname,int movie_width, int movie_height); void free_font_desc(font_desc_t *desc); void render_one_glyph(font_desc_t *desc, int c); @@ -96,6 +96,6 @@ static int kerning(font_desc_t *desc, int prevc, int c) { return 0; } #endif raw_file* load_raw(char *name,int verbose); -font_desc_t* read_font_desc(char* fname,float factor,int verbose); +font_desc_t* read_font_desc(const char* fname,float factor,int verbose); #endif /* ! __MPLAYER_FONT_LOAD_H */ diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c index c555b162c6..571919b473 100644 --- a/libvo/font_load_ft.c +++ b/libvo/font_load_ft.c @@ -905,7 +905,7 @@ void free_font_desc(font_desc_t *desc) free(desc); } -static int load_sub_face(char *name, FT_Face *face) +static int load_sub_face(const char *name, FT_Face *face) { int err = -1; @@ -952,7 +952,7 @@ int kerning(font_desc_t *desc, int prevc, int c) return f266ToInt(kern.x); } -font_desc_t* read_font_desc_ft(char *fname, int movie_width, int movie_height) +font_desc_t* read_font_desc_ft(const char *fname, int movie_width, int movie_height) { font_desc_t *desc; diff --git a/mencoder.c b/mencoder.c index 26c565d853..3392acc433 100644 --- a/mencoder.c +++ b/mencoder.c @@ -299,7 +299,7 @@ static int edl_seek(edl_record_ptr next_edl_record, demuxer_t* demuxer, demux_st #include "libao2/audio_out.h" /* FIXME */ -static void mencoder_exit(int level, char *how) +static void mencoder_exit(int level, const char *how) { if (how) mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_ExitingHow, how); diff --git a/subreader.c b/subreader.c index fe91d0adb7..0c0002d231 100644 --- a/subreader.c +++ b/subreader.c @@ -1832,7 +1832,7 @@ static int compare_sub_priority(const void *a, const void *b) } } -char** sub_filenames(char* path, char *fname) +char** sub_filenames(const char* path, char *fname) { char *f_dir, *f_fname, *f_fname_noext, *f_fname_trim, *tmp, *tmp_sub_id; char *tmp_fname_noext, *tmp_fname_trim, *tmp_fname_ext, *tmpresult; diff --git a/subreader.h b/subreader.h index e600a9823d..3230eab4f1 100644 --- a/subreader.h +++ b/subreader.h @@ -76,7 +76,7 @@ void subcp_close (void); /* for demux_ogg.c */ void* guess_buffer_cp(unsigned char* buffer, int buflen, char *preferred_language, char *fallback); void* guess_cp(struct stream_st *st, char *preferred_language, char *fallback); #endif -char ** sub_filenames(char *path, char *fname); +char ** sub_filenames(const char *path, char *fname); void list_sub_file(sub_data* subd); void dump_srt(sub_data* subd, float fps); void dump_mpsub(sub_data* subd, float fps); |