summaryrefslogtreecommitdiff
blob: 57f3b7f4edf998fdba4ba314bdaf1dda5d505de2 (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
diff -ur softplay-cvs-20080421.orig/PlayList.c softplay-cvs-20080421/PlayList.c
--- softplay-cvs-20080421.orig/PlayList.c	2008-04-21 12:57:46.000000000 +0300
+++ softplay-cvs-20080421/PlayList.c	2009-08-09 23:14:13.000000000 +0300
@@ -625,7 +625,7 @@
         };
         
         SetFilename(Filename);
-        char *ncopy=rindex(Filename,'/');
+        char *ncopy=const_cast<char*> (rindex(Filename,'/'));
         int count=(int) (ncopy-Filename);
         if ( ncopy && count > STR_LENGTH) {
                 fprintf(stderr,"Could not extract directory!\n");
diff -ur softplay-cvs-20080421.orig/softplay.c softplay-cvs-20080421/softplay.c
--- softplay-cvs-20080421.orig/softplay.c	2008-04-21 12:57:46.000000000 +0300
+++ softplay-cvs-20080421/softplay.c	2009-08-09 23:17:13.000000000 +0300
@@ -49,7 +49,7 @@
 	      sizeof(myDir): (unsigned int)(ToPos-path+1));
 	  printf("MyDir '%s'\n",myDir);
 	  PrepareDirectory(myDir);
-	  myToPos=index(ToPos+1,'/');
+	  myToPos=const_cast<char*> (index(ToPos+1,'/'));
 	  AddSubMenu(new cMenuDirectory(path,EditList,myToPos));
   } else  {
 	  printf("Open only directory '%s'.\n",path);
@@ -592,7 +592,7 @@
  
 bool IsM3UFile( const char * const Filename) {
         char * pos;
-        pos = rindex(Filename,'.');
+        pos = const_cast<char*> (rindex(Filename,'.'));
         if ( !pos )
                 return false;
         if ( !strcmp(pos,".m3u") ) {
@@ -614,10 +614,10 @@
 
 void chomp(const char *const str) {
         char *pos;
-        pos = index(str,'\n');
+        pos = const_cast<char*> (index(str,'\n'));
         if (pos)
               *pos=0;
-        pos = index(str,'\r');
+        pos = const_cast<char*> (index(str,'\r'));
         if (pos)
                 *pos=0;
 };
diff -ur softplay-cvs-20080421.orig/SoftPlayer.c softplay-cvs-20080421/SoftPlayer.c
--- softplay-cvs-20080421.orig/SoftPlayer.c	2008-04-21 12:57:46.000000000 +0300
+++ softplay-cvs-20080421/SoftPlayer.c	2009-08-09 23:14:57.000000000 +0300
@@ -409,7 +409,7 @@
 };
 
 bool IsStreamFile( const char * const Filename) {
-        char * pos;
+        const char * pos;
         pos = rindex(Filename,'.');
 	printf("IsStream %s\n",pos);
         if ( !pos )