[MPlayer-dev-eng] [path] get_path const parameter
Stefan Huehner
stefan at huehner.org
Sun Jul 2 18:09:03 CEST 2006
Hi,
attached path marts the filename parameter of get_path as const. As this
parameter is not modified in the function. Changes are get_path
declaration and the get_path prototzpes (scattered in several files).
Regards,
Stefan
-------------- next part --------------
diff -u Gui/interface.h Gui/interface.h
--- Gui/interface.h (working copy)
+++ Gui/interface.h (working copy)
@@ -142,7 +142,7 @@
#define guiFilenames 4
#define guiALL 0xffffffff
-extern char *get_path(char *filename);
+extern char *get_path(const char *filename);
extern void guiInit( void );
extern void guiDone( void );
diff -u libmpdemux/dvbin.c libmpdemux/dvbin.c
--- libmpdemux/dvbin.c (working copy)
+++ libmpdemux/dvbin.c (working copy)
@@ -622,7 +622,7 @@
-extern char *get_path(char *);
+extern char *get_path(const char *);
static void dvbin_close(stream_t *stream)
{
--- Gui/cfg.c (revision 18884)
+++ Gui/cfg.c (working copy)
@@ -75,7 +75,7 @@
int gui_sub_pos_y = -1;
// ---
-extern char * get_path( char * filename );
+extern char * get_path( const char * filename );
extern int flip;
extern int frame_dropping;
extern int stop_xscreensaver;
--- Gui/app.c (revision 18884)
+++ Gui/app.c (working copy)
@@ -70,7 +70,7 @@
// ---
-extern char *get_path(char *);
+extern char *get_path(const char *);
listItems appMPlayer;
--- libmpcodecs/dec_video.c (revision 18884)
+++ libmpcodecs/dec_video.c (working copy)
@@ -251,7 +251,7 @@
return 0;
}
-extern char *get_path(char *filename);
+extern char *get_path(const char *filename);
int init_best_video_codec(sh_video_t *sh_video,char** video_codec_list,char** video_fm_list){
char* vc_l_default[2]={"",(char*)NULL};
--- libmpcodecs/dec_audio.c (revision 18884)
+++ libmpcodecs/dec_audio.c (working copy)
@@ -199,7 +199,7 @@
return 0;
}
-extern char *get_path(char *filename);
+extern char *get_path(const char *filename);
int init_best_audio_codec(sh_audio_t *sh_audio,char** audio_codec_list,char** audio_fm_list){
char* ac_l_default[2]={"",(char*)NULL};
--- input/input.c (revision 18884)
+++ input/input.c (working copy)
@@ -1562,7 +1562,7 @@
return 0;
}
-extern char *get_path(char *filename);
+extern char *get_path(const char *filename);
void
mp_input_init(int use_gui) {
--- libvo/vo_dxr2.c (revision 18884)
+++ libvo/vo_dxr2.c (working copy)
@@ -26,7 +26,7 @@
#include <dxr2ioctl.h>
-extern char *get_path(char *filename);
+extern char *get_path(const char *filename);
extern float monitor_aspect;
extern float movie_aspect;
--- libvo/font_load_ft.c (revision 18884)
+++ libvo/font_load_ft.c (working copy)
@@ -38,7 +38,7 @@
#define HAVE_FREETYPE21
#endif
-char *get_path(char *filename);
+char *get_path(const char *filename);
char *subtitle_font_encoding = NULL;
float text_font_scale_factor = 5.0;
--- get_path.c (revision 18884)
+++ get_path.c (working copy)
@@ -18,7 +18,7 @@
#include <string.h>
#endif
-char *get_path(char *filename){
+char *get_path(const char *filename){
char *homedir;
char *buff;
#if defined(__MINGW32__)
--- libmpdvdkit2/dvd_reader.c (revision 18884)
+++ libmpdvdkit2/dvd_reader.c (working copy)
@@ -213,7 +213,7 @@
#ifndef HAVE_MPLAYER
#include "get_path.c"
#else
- extern char * get_path( char * filename );
+ extern char * get_path( const char * filename );
#endif
//extern char * dvdcss_cache_dir;
--- loader/registry.c (revision 18884)
+++ loader/registry.c (working copy)
@@ -24,7 +24,7 @@
//#undef TRACE
//#define TRACE printf
-extern char *get_path ( char * );
+extern char *get_path ( const char * );
// ...can be set before init_registry() call
char* regpathname = NULL;
--- loader/qtx/list.c (revision 18884)
+++ loader/qtx/list.c (working copy)
@@ -11,7 +11,7 @@
#include "qtxsdk/components.h"
#include "qtxsdk/select.h"
-char* get_path(char* x){ return strdup(x);}
+char* get_path(const char* x){ return strdup(x);}
void* LoadLibraryA(char* name);
void* GetProcAddress(void* handle,char* func);
--- loader/qtx/qtxload.c (revision 18884)
+++ loader/qtx/qtxload.c (working copy)
@@ -22,7 +22,7 @@
return(0);
}
-char *get_path(char* x){ return strdup(x);}
+char *get_path(const char* x){ return strdup(x);}
void* LoadLibraryA(char* name);
void* GetProcAddress(void* handle,char* func);
--- libaf/af_export.c (revision 18884)
+++ libaf/af_export.c (working copy)
@@ -23,7 +23,7 @@
#include "af.h"
-extern char * get_path( char * filename );
+extern char * get_path( const char * filename );
#define DEF_SZ 512 // default buffer size (in samples)
More information about the MPlayer-dev-eng
mailing list