# HG changeset patch # User ib # Date 1310460352 0 # Node ID ab6d06f5b98bd4925b0c87708881a4edf720f71f # Parent 475d96f700d426097a4417a0d468494b104a00b9 Add const to some string pointer arguments that will not be modified. diff -r 475d96f700d4 -r ab6d06f5b98b gui/interface.c --- a/gui/interface.c Mon Jul 11 21:54:53 2011 +0000 +++ b/gui/interface.c Tue Jul 12 08:45:52 2011 +0000 @@ -1105,7 +1105,7 @@ #endif } -void mplayerLoadSubtitle(char *name) +void mplayerLoadSubtitle(const char *name) { if (guiInfo.Playing == 0) return; diff -r 475d96f700d4 -r ab6d06f5b98b gui/interface.h --- a/gui/interface.h Mon Jul 11 21:54:53 2011 +0000 +++ b/gui/interface.h Tue Jul 12 08:45:52 2011 +0000 @@ -149,7 +149,7 @@ void mplayer(int what, float fparam, void *vparam); void mplayerLoadFont(void); -void mplayerLoadSubtitle(char *name); +void mplayerLoadSubtitle(const char *name); void gmp_msg(int mod, int lev, const char *format, ...); #endif /* MPLAYER_GUI_INTERFACE_H */ diff -r 475d96f700d4 -r ab6d06f5b98b gui/win32/dialogs.c --- a/gui/win32/dialogs.c Mon Jul 11 21:54:53 2011 +0000 +++ b/gui/win32/dialogs.c Tue Jul 12 08:45:52 2011 +0000 @@ -45,7 +45,7 @@ guiInterface_t guiInfo; int addurl = 0; -void mplayerLoadSubtitle(char *name) +void mplayerLoadSubtitle(const char *name) { if (!guiInfo.Playing) return; diff -r 475d96f700d4 -r ab6d06f5b98b sub/subreader.c --- a/sub/subreader.c Mon Jul 11 21:54:53 2011 +0000 +++ b/sub/subreader.c Tue Jul 12 08:45:52 2011 +0000 @@ -1429,7 +1429,7 @@ #undef MAX_GUESS_BUFFER_SIZE #endif -sub_data* sub_read_file (char *filename, float fps) { +sub_data* sub_read_file (const char *filename, float fps) { int utf16; stream_t* fd; int n_max, n_first, i, j, sub_first, sub_orig; diff -r 475d96f700d4 -r ab6d06f5b98b sub/subreader.h --- a/sub/subreader.h Mon Jul 11 21:54:53 2011 +0000 +++ b/sub/subreader.h Tue Jul 12 08:45:52 2011 +0000 @@ -91,7 +91,7 @@ typedef void (*open_sub_func)(char *, float, int); typedef int (*open_vob_func)(const char *, const char * const, int, void *); -sub_data* sub_read_file (char *filename, float pts); +sub_data* sub_read_file (const char *filename, float pts); subtitle* subcp_recode (subtitle *sub); // enca_fd is the file enca uses to determine the codepage. // setting to NULL disables enca.