]>
Commit | Line | Data |
---|---|---|
07ee61b2 MT |
1 | Index: vdr-1.6.0/recording.c |
2 | =================================================================== | |
3 | --- vdr-1.6.0.orig/recording.c | |
4 | +++ vdr-1.6.0/recording.c | |
5 | @@ -509,8 +509,8 @@ cRecording::cRecording(cTimer *Timer, co | |
6 | Utf8Strn0Cpy(SubtitleBuffer, Subtitle, MAX_SUBTITLE_LENGTH); | |
7 | Subtitle = SubtitleBuffer; | |
8 | } | |
9 | - char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE); | |
10 | - char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE); | |
11 | + const char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE); | |
12 | + const char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE); | |
13 | if (macroTITLE || macroEPISODE) { | |
14 | name = strdup(Timer->File()); | |
15 | name = strreplace(name, TIMERMACRO_TITLE, Title); | |
16 | @@ -551,7 +551,7 @@ cRecording::cRecording(const char *FileN | |
17 | sortBuffer = NULL; | |
18 | fileName = strdup(FileName); | |
19 | FileName += strlen(VideoDirectory) + 1; | |
20 | - char *p = strrchr(FileName, '/'); | |
21 | + const char *p = strrchr(FileName, '/'); | |
22 | ||
23 | name = NULL; | |
24 | info = new cRecordingInfo; | |
25 | @@ -1022,7 +1022,8 @@ void cRecordings::DelByName(const char * | |
26 | if (recording) { | |
27 | cThreadLock DeletedRecordingsLock(&DeletedRecordings); | |
28 | Del(recording, false); | |
29 | - char *ext = strrchr(recording->FileName(), '.'); | |
30 | + // wtf? | |
31 | + char *ext = strrchr(const_cast<char*>(recording->FileName()), '.'); | |
32 | if (ext) { | |
33 | strncpy(ext, DELEXT, strlen(ext)); | |
34 | recording->fileSizeMB = DirSizeMB(recording->FileName()); | |
35 | Index: vdr-1.6.0/svdrp.c | |
36 | =================================================================== | |
37 | --- vdr-1.6.0.orig/svdrp.c | |
38 | +++ vdr-1.6.0/svdrp.c | |
39 | @@ -736,7 +736,7 @@ void cSVDRP::CmdGRAB(const char *Option) | |
40 | char *strtok_next; | |
41 | FileName = strtok_r(p, delim, &strtok_next); | |
42 | // image type: | |
43 | - char *Extension = strrchr(FileName, '.'); | |
44 | + const char *Extension = strrchr(FileName, '.'); | |
45 | if (Extension) { | |
46 | if (strcasecmp(Extension, ".jpg") == 0 || strcasecmp(Extension, ".jpeg") == 0) | |
47 | Jpeg = true; | |
48 | @@ -796,12 +796,12 @@ void cSVDRP::CmdGRAB(const char *Option) | |
49 | if (FileName) { | |
50 | if (grabImageDir) { | |
51 | cString s; | |
52 | - char *slash = strrchr(FileName, '/'); | |
53 | + char *slash = strrchr(const_cast<char*>(FileName), '/'); | |
54 | if (!slash) { | |
55 | s = AddDirectory(grabImageDir, FileName); | |
56 | FileName = s; | |
57 | } | |
58 | - slash = strrchr(FileName, '/'); // there definitely is one | |
59 | + slash = strrchr(const_cast<char*>(FileName), '/'); // there definitely is one | |
60 | *slash = 0; | |
61 | char *r = realpath(FileName, RealFileName); | |
62 | *slash = '/'; |