1.1 --- a/data.c Fri Nov 13 19:27:36 2009 +0800
1.2 +++ b/data.c Sun Dec 06 08:48:57 2009 +0800
1.3 @@ -412,7 +412,7 @@
1.4 description=strdup(Description);
1.5 if(Include) {
1.6 do {
1.7 - char *s=index(Include,'/');
1.8 + const char *s=index(Include,'/');
1.9 int l=s ? s-Include : strlen(Include);
1.10 if(l) {
1.11 char **s=(char **)realloc(include,(incCount+2)*sizeof(char *));
2.1 --- a/decoder-ogg.c Fri Nov 13 19:27:36 2009 +0800
2.2 +++ b/decoder-ogg.c Sun Dec 06 08:48:57 2009 +0800
2.3 @@ -162,7 +162,7 @@
2.4 for(int i=0 ; i<vc->comments ; i++) {
2.5 const char *cc=vc->user_comments[i];
2.6 d(printf("ogg: comment%d='%s'\n",i,cc))
2.7 - char *p=strchr(cc,'=');
2.8 + const char *p=strchr(cc,'=');
2.9 if(p) {
2.10 const int len=p-cc;
2.11 p++;
3.1 --- a/decoder-snd.c Fri Nov 13 19:27:36 2009 +0800
3.2 +++ b/decoder-snd.c Sun Dec 06 08:48:57 2009 +0800
3.3 @@ -579,7 +579,8 @@
3.4 bool cCDDBDisc::Split(const char *source, char div, char * &first, char * &second, bool only3)
3.5 {
3.6 int pos=-1, n=0;
3.7 - char *p, l[4]={ ' ',div,' ',0 };
3.8 + const char *p;
3.9 + char l[4]={ ' ',div,' ',0 };
3.10 if ((p=strstr(source,l))) { pos=p-source; n=3; }
3.11 else if(!only3 && (p=strchr(source,div))) { pos=p-source; n=1; }
3.12 if(pos>=0) {
3.13 @@ -860,7 +861,7 @@
3.14 {
3.15 if(id->Get()) {
3.16 int tr;
3.17 - char *s=strstr(filename,CDFS_TRACK);
3.18 + const char *s=strstr(filename,CDFS_TRACK);
3.19 if(s && sscanf(s+strlen(CDFS_TRACK),"%d",&tr)==1) {
3.20 d(printf("snd: looking up disc id %08x track %d\n",id->discid,tr))
3.21 return cddb.Lookup(id,tr-1,this);
4.1 --- a/decoder.c Fri Nov 13 19:27:36 2009 +0800
4.2 +++ b/decoder.c Sun Dec 06 08:48:57 2009 +0800
4.3 @@ -137,7 +137,7 @@
4.4 {
4.5 // if no title, try to build a reasonable from the filename
4.6 if(!Title && filename) {
4.7 - char *s=rindex(filename,'/');
4.8 + const char *s=rindex(filename,'/');
4.9 if(s && *s=='/') {
4.10 s++;
4.11 Title=strdup(s);
4.12 @@ -147,8 +147,8 @@
4.13 if(l>0 && !strcasecmp(Title+l,extention)) Title[l]=0;
4.14 }
4.15 else { // strip any extention
4.16 - s=rindex(Title,'.');
4.17 - if(s && *s=='.' && strlen(s)<=5) *s=0;
4.18 + char *e=rindex(Title,'.');
4.19 + if(e && *e=='.' && strlen(e)<=5) *e=0;
4.20 }
4.21 d(printf("mp3: faking title '%s' from filename '%s'\n",Title,filename))
4.22 }
5.1 --- a/mp3.c Fri Nov 13 19:27:36 2009 +0800
5.2 +++ b/mp3.c Sun Dec 06 08:48:57 2009 +0800
5.3 @@ -563,11 +563,11 @@
5.4 int hash=MakeHash(buff);
5.5 if(num==mode->Num) { fg=clrBlack; bg=clrCyan; hash=(hash^77) + 23; }
5.6 if(all || hash!=hashlist[i]) {
5.7 - char *s=rindex(buff,'\t');
5.8 + const char *s=rindex(buff,'\t');
5.9 if(s) {
5.10 - *s++=0;
5.11 + Write(5,i,bwc-5,s,fg,bg);
5.12 + buff.Truncate(s-buff);
5.13 Write(0,i,5,buff,fg,bg);
5.14 - Write(5,i,bwc-5,s,fg,bg);
5.15 }
5.16 else
5.17 Write(0,i,bwc,buff,fg,bg);
6.1 --- a/stream.c Fri Nov 13 19:27:36 2009 +0800
6.2 +++ b/stream.c Sun Dec 06 08:48:57 2009 +0800
6.3 @@ -1,7 +1,7 @@
6.4 /*
6.5 * MP3/MPlayer plugin to VDR (C++)
6.6 *
6.7 - * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
6.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
6.9 *
6.10 * This code is free software; you can redistribute it and/or
6.11 * modify it under the terms of the GNU General Public License
6.12 @@ -406,7 +406,7 @@
6.13
6.14 bool cNetStream::ParseHeader(const char *buff, const char *name, char **value)
6.15 {
6.16 - char *s=index(buff,':');
6.17 + const char *s=index(buff,':');
6.18 if(s && !strncasecmp(buff,name,s-buff)) {
6.19 s=skipspace(s+1);
6.20 d(printf("netstream: found header '%s' contents '%s'\n",name,s))
6.21 @@ -528,7 +528,7 @@
6.22 return false;
6.23 }
6.24
6.25 -char *cNetStream::ParseMetaString(const char *buff, const char *name, char **value)
6.26 +char *cNetStream::ParseMetaString(char *buff, const char *name, char **value)
6.27 {
6.28 char *s=index(buff,'=');
6.29 if(s && !strncasecmp(buff,name,s-buff)) {
7.1 --- a/stream.h Fri Nov 13 19:27:36 2009 +0800
7.2 +++ b/stream.h Sun Dec 06 08:48:57 2009 +0800
7.3 @@ -1,7 +1,7 @@
7.4 /*
7.5 * MP3/MPlayer plugin to VDR (C++)
7.6 *
7.7 - * (C) 2001-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
7.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
7.9 *
7.10 * This code is free software; you can redistribute it and/or
7.11 * modify it under the terms of the GNU General Public License
7.12 @@ -114,7 +114,7 @@
7.13 bool GetHTTPResponse(void);
7.14 bool ParseHeader(const char *buff, const char *name, char **value);
7.15 bool ParseMetaData(void);
7.16 - char *ParseMetaString(const char *buff, const char *name, char **value);
7.17 + char *ParseMetaString(char *buff, const char *name, char **value);
7.18 public:
7.19 cNetStream(const char *Filename);
7.20 virtual ~cNetStream();