diff options
author | 2006-07-14 16:57:24 +0000 | |
---|---|---|
committer | 2006-07-14 16:57:24 +0000 | |
commit | cb2e693d2246c450842810b1e49452a49489938a (patch) | |
tree | 65aab297cadf1ee00244e09808b69267f918de68 /Gui/interface.c | |
parent | 812a300c262ce94a4c161d424619624081a93297 (diff) |
Mark several string parameters that are not modified in the function as const.
patch by Stefan Huehner, stefan at huehner org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19086 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/interface.c')
-rw-r--r-- | Gui/interface.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Gui/interface.c b/Gui/interface.c index eb1a4849ee..c4f75ac5c4 100644 --- a/Gui/interface.c +++ b/Gui/interface.c @@ -54,7 +54,7 @@ extern mixer_t mixer; // mixer from mplayer.c guiInterface_t guiIntfStruct; int guiWinID=-1; -char * gstrcat( char ** dest,char * src ) +char * gstrcat( char ** dest,const char * src ) { char * tmp = NULL; @@ -75,21 +75,21 @@ char * gstrcat( char ** dest,char * src ) return tmp; } -int gstrcmp( char * a,char * b ) +int gstrcmp( const char * a,const char * b ) { if ( !a && !b ) return 0; if ( !a || !b ) return -1; return strcmp( a,b ); } -int gstrncmp( char * a,char * b,int size ) +int gstrncmp( const char * a,const char * b,int size ) { if ( !a && !b ) return 0; if ( !a || !b ) return -1; return strncmp( a,b,size ); } -char * gstrdup( char * str ) +char * gstrdup( const char * str ) { if ( !str ) return NULL; return strdup( str ); @@ -107,7 +107,7 @@ void gfree( void ** p ) free( *p ); *p=NULL; } -void gset( char ** str,char * what ) +void gset( char ** str, const char * what ) { if ( *str ) { if ( !strstr( *str,what ) ) { gstrcat( str,"," ); gstrcat( str,what ); }} else gstrcat( str,what ); @@ -116,7 +116,7 @@ void gset( char ** str,char * what ) /** * \brief this actually creates a new list containing only one element... */ -void gaddlist( char *** list,char * entry ) +void gaddlist( char *** list,const char * entry ) { int i; @@ -135,7 +135,7 @@ void gaddlist( char *** list,char * entry ) * \brief this replaces a string starting with search by replace. * If not found, replace is appended. */ -void greplace(char ***list, char *search, char *replace) +void greplace(char ***list, const char *search, const char *replace) { int i = 0; int len = (search) ? strlen(search) : 0; |