summaryrefslogtreecommitdiff
blob: 7ace820dd2e437a85a8dc07b79a8b622a5952921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
diff -ur music-0.2.0.orig/data.c music-0.2.0/data.c
--- music-0.2.0.orig/data.c	2007-05-08 22:50:56.000000000 +0300
+++ music-0.2.0/data.c	2009-08-09 22:43:50.000000000 +0300
@@ -479,7 +479,7 @@
   description=strdup(Description);
   if(Include) {
     do {
-      char *s=index(Include,'/');
+      char *s=const_cast<char*> (index(Include,'/'));
       int l=s ? s-Include : strlen(Include);
       if(l) {
         char **s=(char **)realloc(include,(incCount+2)*sizeof(char *));
diff -ur music-0.2.0.orig/decoder.c music-0.2.0/decoder.c
--- music-0.2.0.orig/decoder.c	2007-05-15 03:59:15.000000000 +0300
+++ music-0.2.0/decoder.c	2009-08-09 22:47:23.000000000 +0300
@@ -111,7 +111,7 @@
 {
   // if no title, try to build a reasonable from the filename
   if(!Title && filename)  {
-    char *s=rindex(filename,'/');
+    char *s=const_cast<char*> (rindex(filename,'/'));
     if(s && *s=='/') {
       s++;
       Title=strdup(s);
diff -ur music-0.2.0.orig/decoder-ogg.c music-0.2.0/decoder-ogg.c
--- music-0.2.0.orig/decoder-ogg.c	2007-04-08 22:50:36.000000000 +0300
+++ music-0.2.0/decoder-ogg.c	2009-08-09 22:50:43.000000000 +0300
@@ -161,7 +161,7 @@
     for(int i=0 ; i<vc->comments ; i++) {
       const char *cc=vc->user_comments[i];
       d(printf("music: decoder-ogg: comment%d='%s'\n",i,cc))
-      char *p=strchr(cc,'=');
+      const char *p=strchr(cc,'=');
       if(p) {
         const int len=p-cc;
         p++;
diff -ur music-0.2.0.orig/decoder-snd.c music-0.2.0/decoder-snd.c
--- music-0.2.0.orig/decoder-snd.c	2007-04-08 22:50:36.000000000 +0300
+++ music-0.2.0/decoder-snd.c	2009-08-09 22:49:57.000000000 +0300
@@ -581,7 +581,7 @@
 bool cCDDBDisc::Split(const char *source, char div, char * &first, char * &second, bool only3)
 {
   int pos=-1, n=0;
-  char *p, l[4]={ ' ',div,' ',0 };
+  const char *p, l[4]={ ' ',div,' ',0 };
   if ((p=strstr(source,l))) { pos=p-source; n=3; }
   else if(!only3 && (p=strchr(source,div)))  { pos=p-source; n=1; }
   if(pos>=0) {
@@ -861,7 +861,7 @@
 {
   if(id->Get()) {
     int tr;
-    char *s=strstr(filename,CDFS_TRACK);
+    char *s=const_cast<char*> (strstr(filename,CDFS_TRACK));
     if(s && sscanf(s+strlen(CDFS_TRACK),"%d",&tr)==1) {
       d(printf("music: decoder-snd: looking up disc id %08x track %d\n",id->discid,tr))
       return cddb.Lookup(id,tr-1,this);
diff -ur music-0.2.0.orig/stream.c music-0.2.0/stream.c
--- music-0.2.0.orig/stream.c	2007-04-08 22:50:36.000000000 +0300
+++ music-0.2.0/stream.c	2009-08-09 22:48:32.000000000 +0300
@@ -408,7 +408,7 @@
 
 bool cNetStream::ParseHeader(const char *buff, const char *name, char **value)
 {
-  char *s=index(buff,':');
+  char *s=const_cast<char*> (index(buff,':'));
   if(s && !strncasecmp(buff,name,s-buff)) {
     s=skipspace(s+1);
     d(printf("music: netstream: found header '%s' contents '%s'\n",name,s))
@@ -532,7 +532,7 @@
 
 char *cNetStream::ParseMetaString(const char *buff, const char *name, char **value)
 {
-  char *s=index(buff,'=');
+  char *s=const_cast<char*> (index(buff,'='));
   if(s && !strncasecmp(buff,name,s-buff)) {
     char *end=index(s+2,'\'');
     if(s[1]=='\'' && end) {