Mercurial > mplayer.hg
changeset 19108:5e767cabf4cd
marks several read-only string parameters and function return-values which can only be used read-only as const. Patch by Stefan Huehner, stefan _AT huener-org
author | reynaldo |
---|---|
date | Sun, 16 Jul 2006 01:20:30 +0000 |
parents | 251872bee3e0 |
children | 6e840952870d |
files | libaf/af_format.h libaf/format.c libmpcodecs/img_format.c libmpcodecs/img_format.h libmpdemux/asfheader.c libmpdemux/librtsp/rtsp.c libmpdemux/librtsp/rtsp.h libmpdemux/network.c libmpdemux/tvi_v4l2.c libvo/video_out.h |
diffstat | 10 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/libaf/af_format.h Sat Jul 15 23:42:44 2006 +0000 +++ b/libaf/af_format.h Sun Jul 16 01:20:30 2006 +0000 @@ -84,11 +84,11 @@ #define AF_FORMAT_FLOAT_NE AF_FORMAT_FLOAT_LE #endif -extern int af_str2fmt(char *str); -extern int af_str2fmt_short(char *str); +extern int af_str2fmt(const char *str); +extern int af_str2fmt_short(const char *str); extern int af_fmt2bits(int format); extern int af_bits2fmt(int bits); extern char* af_fmt2str(int format, char* str, int size); -extern char* af_fmt2str_short(int format); +extern const char* af_fmt2str_short(int format); #endif /* __af_format_h__ */
--- a/libaf/format.c Sat Jul 15 23:42:44 2006 +0000 +++ b/libaf/format.c Sun Jul 16 01:20:30 2006 +0000 @@ -19,7 +19,7 @@ #include "help_mp.h" // Convert from string to format -int af_str2fmt(char* str) +int af_str2fmt(const char* str) { int format=0; // Scan for endianess @@ -178,7 +178,7 @@ { NULL, 0 } }; -char *af_fmt2str_short(int format) +const char *af_fmt2str_short(int format) { int i; @@ -189,7 +189,7 @@ return "??"; } -int af_str2fmt_short(char* str) +int af_str2fmt_short(const char* str) { int i;
--- a/libmpcodecs/img_format.c Sat Jul 15 23:42:44 2006 +0000 +++ b/libmpcodecs/img_format.c Sun Jul 16 01:20:30 2006 +0000 @@ -1,7 +1,7 @@ #include "config.h" #include "img_format.h" -char *vo_format_name(int format) +const char *vo_format_name(int format) { switch(format) {
--- a/libmpcodecs/img_format.h Sat Jul 15 23:42:44 2006 +0000 +++ b/libmpcodecs/img_format.h Sun Jul 16 01:20:30 2006 +0000 @@ -114,6 +114,6 @@ int timestamp; // pts, 90000 Hz counter based } vo_mpegpes_t; -char *vo_format_name(int format); +const char *vo_format_name(int format); #endif
--- a/libmpdemux/asfheader.c Sat Jul 15 23:42:44 2006 +0000 +++ b/libmpdemux/asfheader.c Sun Jul 16 01:20:30 2006 +0000 @@ -77,7 +77,7 @@ mp_msg(MSGT_HEADER,MSGL_V,"%s%s\n", name, string); } -static char* asf_chunk_type(unsigned char* guid) { +static const char* asf_chunk_type(unsigned char* guid) { static char tmp[60]; char *p; int i;
--- a/libmpdemux/librtsp/rtsp.c Sat Jul 15 23:42:44 2006 +0000 +++ b/libmpdemux/librtsp/rtsp.c Sun Jul 16 01:20:30 2006 +0000 @@ -705,7 +705,7 @@ } -char *rtsp_get_param(rtsp_t *s, char *p) { +char *rtsp_get_param(rtsp_t *s, const char *p) { int len; char *param; if (!s->param)
--- a/libmpdemux/librtsp/rtsp.h Sat Jul 15 23:42:44 2006 +0000 +++ b/libmpdemux/librtsp/rtsp.h Sun Jul 16 01:20:30 2006 +0000 @@ -72,7 +72,7 @@ char *rtsp_get_session(rtsp_t *s); char *rtsp_get_mrl(rtsp_t *s); -char *rtsp_get_param(rtsp_t *s, char *param); +char *rtsp_get_param(rtsp_t *s, const char *param); /*int rtsp_peek_header (rtsp_t *this, char *data); */
--- a/libmpdemux/network.c Sat Jul 15 23:42:44 2006 +0000 +++ b/libmpdemux/network.c Sun Jul 16 01:20:30 2006 +0000 @@ -117,7 +117,7 @@ // Converts an address family constant to a string -char *af2String(int af) { +const char *af2String(int af) { switch (af) { case AF_INET: return "AF_INET";
--- a/libmpdemux/tvi_v4l2.c Sat Jul 15 23:42:44 2006 +0000 +++ b/libmpdemux/tvi_v4l2.c Sun Jul 16 01:20:30 2006 +0000 @@ -213,7 +213,7 @@ ** Translate a video4linux2 fourcc aka pixel format ** to a human readable string. */ -static char *pixfmt2name(int pixfmt) +static const char *pixfmt2name(int pixfmt) { static char unknown[24];