[MPlayer-cvslog] r19058 - in trunk: asxparser.c asxparser.h libmpdemux/demux_ogg.c libmpdemux/demuxer.c libmpdemux/demuxer.h libvo/vo_caca.c m_option.c m_option.h m_property.h mplayer.c
reynaldo
subversion at mplayerhq.hu
Thu Jul 13 07:03:48 CEST 2006
Author: reynaldo
Date: Thu Jul 13 07:03:43 2006
New Revision: 19058
Modified:
trunk/asxparser.c
trunk/asxparser.h
trunk/libmpdemux/demux_ogg.c
trunk/libmpdemux/demuxer.c
trunk/libmpdemux/demuxer.h
trunk/libvo/vo_caca.c
trunk/m_option.c
trunk/m_option.h
trunk/m_property.h
trunk/mplayer.c
Log:
marks several string parameters as const, as they are not modified inside the function, Patch by Stefan Huehner, stefan AT huehner-org
Modified: trunk/asxparser.c
==============================================================================
--- trunk/asxparser.c (original)
+++ trunk/asxparser.c Thu Jul 13 07:03:43 2006
@@ -92,7 +92,7 @@
}
int
-asx_attrib_to_enum(char* val,char** valid_vals) {
+asx_attrib_to_enum(const char* val,char** valid_vals) {
char** ptr;
int r = 0;
@@ -107,7 +107,7 @@
static void
asx_warning_attrib_invalid(ASX_Parser_t* parser, char* elem, char* attrib,
- char** valid_vals,char* val) {
+ char** valid_vals,const char* val) {
char *str,*vals,**ptr;
int len;
Modified: trunk/asxparser.h
==============================================================================
--- trunk/asxparser.h (original)
+++ trunk/asxparser.h Thu Jul 13 07:03:43 2006
@@ -37,7 +37,7 @@
asx_get_attrib(char* attrib,char** attribs);
int
-asx_attrib_to_enum(char* val,char** valid_vals);
+asx_attrib_to_enum(const char* val,char** valid_vals);
#define asx_free_attribs(a) asx_list_free((void***)&a,free)
Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c (original)
+++ trunk/libmpdemux/demux_ogg.c Thu Jul 13 07:03:43 2006
@@ -441,7 +441,7 @@
}
// check if clang has substring from comma separated langlist
-static int demux_ogg_check_lang(char *clang, char *langlist)
+static int demux_ogg_check_lang(const char *clang, char *langlist)
{
char *c;
Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c (original)
+++ trunk/libmpdemux/demuxer.c Thu Jul 13 07:03:43 2006
@@ -922,7 +922,7 @@
return 1;
}
-int demux_info_add(demuxer_t *demuxer, char *opt, char *param)
+int demux_info_add(demuxer_t *demuxer, const char *opt, const char *param)
{
char **info = demuxer->info;
int n = 0;
Modified: trunk/libmpdemux/demuxer.h
==============================================================================
--- trunk/libmpdemux/demuxer.h (original)
+++ trunk/libmpdemux/demuxer.h Thu Jul 13 07:03:43 2006
@@ -348,7 +348,7 @@
extern int extension_parsing;
-int demux_info_add(demuxer_t *demuxer, char *opt, char *param);
+int demux_info_add(demuxer_t *demuxer, const char *opt, const char *param);
char* demux_info_get(demuxer_t *demuxer, char *opt);
int demux_info_print(demuxer_t *demuxer);
int demux_control(demuxer_t *demuxer, int cmd, void *arg);
Modified: trunk/libvo/vo_caca.c
==============================================================================
--- trunk/libvo/vo_caca.c (original)
+++ trunk/libvo/vo_caca.c Thu Jul 13 07:03:43 2006
@@ -67,7 +67,7 @@
static int osdx = 0, osdy = 0;
static int posbary = 2;
-static void osdmessage(int duration, char *fmt, ...)
+static void osdmessage(int duration, const char *fmt, ...)
{
/*
* for outputting a centered string at the bottom
@@ -87,7 +87,7 @@
posbar[0] = '\0';
}
-static void osdpercent(int duration, int min, int max, int val, char *desc, char *unit)
+static void osdpercent(int duration, int min, int max, int val, const char *desc, const char *unit)
{
/*
* prints a bar for setting values
Modified: trunk/m_option.c
==============================================================================
--- trunk/m_option.c (original)
+++ trunk/m_option.c Thu Jul 13 07:03:43 2006
@@ -22,7 +22,7 @@
//#define NO_FREE
#endif
-m_option_t* m_option_list_find(m_option_t* list,char* name) {
+m_option_t* m_option_list_find(m_option_t* list,const char* name) {
int i;
for(i = 0 ; list[i].name ; i++) {
@@ -1196,7 +1196,7 @@
return 0;
}
-static int get_obj_param(char* opt_name,char* obj_name, m_struct_t* desc,
+static int get_obj_param(const char* opt_name,const char* obj_name, m_struct_t* desc,
char* str,int* nold,int oldmax,char** dst) {
char* eq;
m_option_t* opt;
@@ -1249,7 +1249,7 @@
return 1;
}
-static int get_obj_params(char* opt_name, char* name,char* params,
+static int get_obj_params(const char* opt_name, const char* name,char* params,
m_struct_t* desc,char separator, char*** _ret) {
int n = 0,nold = 0, nopts,r;
char* ptr,*last_ptr = params;
Modified: trunk/m_option.h
==============================================================================
--- trunk/m_option.h (original)
+++ trunk/m_option.h Thu Jul 13 07:03:43 2006
@@ -439,7 +439,7 @@
* \param name Name of the option.
* \return The matching option or NULL.
*/
-m_option_t* m_option_list_find(m_option_t* list,char* name);
+m_option_t* m_option_list_find(m_option_t* list,const char* name);
/// Helper to parse options, see \ref m_option_type::parse.
inline static int
Modified: trunk/m_property.h
==============================================================================
--- trunk/m_property.h (original)
+++ trunk/m_property.h Thu Jul 13 07:03:43 2006
@@ -120,7 +120,7 @@
// Helpers to use MPlayer's properties
/// Get an MPlayer property.
-m_option_t* mp_property_find(char* name);
+m_option_t* mp_property_find(const char* name);
/// Do an action with an MPlayer property.
int mp_property_do(char* name,int action, void* val);
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c (original)
+++ trunk/mplayer.c Thu Jul 13 07:03:43 2006
@@ -1112,7 +1112,7 @@
*
*/
-static void set_osd_msg(int id, int level, int time, char* fmt, ...) {
+static void set_osd_msg(int id, int level, int time, const char* fmt, ...) {
mp_osd_msg_t *msg,*last=NULL;
va_list va;
int r;
@@ -1243,7 +1243,7 @@
*
*/
-void set_osd_bar(int type,char* name,double min,double max,double val) {
+void set_osd_bar(int type,const char* name,double min,double max,double val) {
if(osd_level < 1) return;
@@ -2254,7 +2254,7 @@
{ NULL, NULL, NULL, 0, 0, 0, NULL }
};
-m_option_t* mp_property_find(char* name) {
+m_option_t* mp_property_find(const char* name) {
return m_option_list_find(mp_properties,name);
}
More information about the MPlayer-cvslog
mailing list