Gentoo Archives: gentoo-commits

From: "Matthias Schwarzott (zzam)" <zzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-plugins/vdr-tvonscreen/files: vdr-tvonscreen-1.0.141-fixes.diff vdr-tvonscreen-1.0.141-vdr-1.5.3.diff
Date: Tue, 22 Apr 2008 10:41:53
Message-Id: E1JoFwd-0004cm-0a@stork.gentoo.org
1 zzam 08/04/22 10:41:51
2
3 Added: vdr-tvonscreen-1.0.141-fixes.diff
4 vdr-tvonscreen-1.0.141-vdr-1.5.3.diff
5 Log:
6 Added two patches from e-tobi. This should fix some segfaults, and add vdr-1.6 compatibility.
7 (Portage version: 2.1.5_rc6)
8
9 Revision Changes Path
10 1.1 media-plugins/vdr-tvonscreen/files/vdr-tvonscreen-1.0.141-fixes.diff
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/vdr-tvonscreen/files/vdr-tvonscreen-1.0.141-fixes.diff?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/vdr-tvonscreen/files/vdr-tvonscreen-1.0.141-fixes.diff?rev=1.1&content-type=text/plain
14
15 Index: vdr-tvonscreen-1.0.141-fixes.diff
16 ===================================================================
17 #! /bin/sh /usr/share/dpatch/dpatch-run
18 ## 02_tvonscreen-1.0-fixes.dpatch by apex at vdrportal.de
19 ## http://vdrportal.de/board/thread.php?postid=517272#post517272
20 ##
21 ## Contains following patches:
22 ## - http://toms-cafe.de/vdr/download/tvonscreen-0.7.0-fix-noepg.diff
23 ## (fixes segmentation fault without any epg data)
24 ## - http://vdrportal.de/board/thread.php?postid=401733#post401733
25 ## (fixes segmentation fault with empty columns)
26 ## - http://www.vdr-portal.de/board/thread.php?postid=681720#post681720
27 ## (fixes segfault when switching to edit mode)
28 ##
29 ## All lines beginning with `## DP:' are a description of the patch.
30 ## DP: Fixes segmentation faults.
31
32 @DPATCH@
33 diff -urNad vdr-plugin-tvonscreen-1.0.141~/magazine.c vdr-plugin-tvonscreen-1.0.141/magazine.c
34 --- vdr-plugin-tvonscreen-1.0.141~/magazine.c 2006-06-18 15:59:36.000000000 +0200
35 +++ vdr-plugin-tvonscreen-1.0.141/magazine.c 2008-04-13 18:11:49.000000000 +0200
36 @@ -458,6 +458,9 @@
37 }
38 const cEvent *magazine::getNext(const cSchedule *s,const cEvent *e)
39 {
40 + if (e == NULL)
41 + return NULL;
42 +
43 const cEvent *pe = NULL;
44 time_t ref = e->StartTime();
45
46 @@ -480,6 +483,9 @@
47 }
48 const cEvent *magazine::getPrev(const cSchedule *s,const cEvent *e)
49 {
50 + if (e == NULL)
51 + return NULL;
52 +
53 const cEvent *pe = NULL;
54 time_t ref = e->StartTime();
55 time_t delta = INT_MAX;
56 @@ -1077,9 +1083,9 @@
57 {
58 state = cOsdObject::ProcessKey(Key);
59
60 - if (state == osUnknown)
61 + if (state == osUnknown && schedArrayNum>currentFirst)
62 {
63 - if (curmode==SHOW && schedArrayNum>currentFirst)
64 + if (curmode==SHOW)
65 {
66 switch (Key & ~k_Repeat)
67 {
68 @@ -1111,6 +1117,8 @@
69 currentFirst++;
70 if (currentFirst>schedArrayNum-3)
71 currentFirst=schedArrayNum-3;
72 + if (currentFirst<0)
73 + currentFirst=0;
74 output();
75 break;
76 case kUp:
77 @@ -1145,6 +1153,8 @@
78 currentFirst+=3;
79 if (currentFirst>schedArrayNum-3)
80 currentFirst=schedArrayNum-3;
81 + if (currentFirst<0)
82 + currentFirst=0;
83 output();
84 break;
85 case k8: // zum aktuellen Sender
86 @@ -1206,14 +1216,17 @@
87 {
88 case kOk:
89 {
90 - delete osd;
91 - osd=NULL;
92 cEvent **ev=ev4ch(EDIT_curChannel);
93 - me=new tvOcMenuEvent(ev[EDIT_curEVI]);
94 - me->Display();
95 - curmode=SHOW;
96 - EDIT_curEvent=0;
97 - return osContinue;
98 + if (ev[EDIT_curEVI] != NULL)
99 + {
100 + delete osd;
101 + osd=NULL;
102 + me=new tvOcMenuEvent(ev[EDIT_curEVI]);
103 + me->Display();
104 + curmode=SHOW;
105 + EDIT_curEvent=0;
106 + return osContinue;
107 + }
108 }
109 break;
110 case kBack:
111 @@ -1238,11 +1251,15 @@
112 EDIT_curChannel++;
113 if (EDIT_curChannel>schedArrayNum-1)
114 EDIT_curChannel=schedArrayNum-1;
115 + if (EDIT_curChannel<0)
116 + EDIT_curChannel=0;
117 if (EDIT_curChannel>currentFirst+2)
118 {
119 currentFirst++;
120 if (currentFirst>schedArrayNum-3)
121 currentFirst=schedArrayNum-3;
122 + if (currentFirst<0)
123 + currentFirst=0;
124 EDIT_curChannel=currentFirst+2;
125 }
126 outputLR();
127 @@ -1343,17 +1360,20 @@
128 break; */
129 case kRecord:
130 {
131 - delete osd;
132 - osd=NULL;
133 cEvent **ev=ev4ch(EDIT_curChannel);
134 - cTimer *timer = new cTimer(ev[EDIT_curEVI]);
135 - cTimer *t = Timers.GetTimer(timer);
136 - if (t)
137 + if (ev[EDIT_curEVI] != NULL)
138 {
139 - delete timer;
140 - timer = t;
141 + delete osd;
142 + osd=NULL;
143 + cTimer *timer = new cTimer(ev[EDIT_curEVI]);
144 + cTimer *t = Timers.GetTimer(timer);
145 + if (t)
146 + {
147 + delete timer;
148 + timer = t;
149 + }
150 + met=new cMenuEditTimer(timer, !t);
151 }
152 - met=new cMenuEditTimer(timer, !t);
153 }
154 break;
155 default:
156 diff -urNad vdr-plugin-tvonscreen-1.0.141~/magazine.h vdr-plugin-tvonscreen-1.0.141/magazine.h
157 --- vdr-plugin-tvonscreen-1.0.141~/magazine.h 2006-06-18 15:59:36.000000000 +0200
158 +++ vdr-plugin-tvonscreen-1.0.141/magazine.h 2008-04-13 18:12:15.000000000 +0200
159 @@ -70,7 +70,7 @@
160 enum modes {SHOW,EDIT};
161 enum modes curmode;
162
163 - unsigned short EDIT_curEvent;
164 + int EDIT_curEvent;
165 int EDIT_curChannel;
166 int EDIT_curEVI;
167
168
169
170
171 1.1 media-plugins/vdr-tvonscreen/files/vdr-tvonscreen-1.0.141-vdr-1.5.3.diff
172
173 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/vdr-tvonscreen/files/vdr-tvonscreen-1.0.141-vdr-1.5.3.diff?rev=1.1&view=markup
174 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/vdr-tvonscreen/files/vdr-tvonscreen-1.0.141-vdr-1.5.3.diff?rev=1.1&content-type=text/plain
175
176 Index: vdr-tvonscreen-1.0.141-vdr-1.5.3.diff
177 ===================================================================
178 #! /bin/sh /usr/share/dpatch/dpatch-run
179 ## 90_tvonscreen-1.0.141-1.5.3.dpatch by Thomas Günther <tom@×××××××××.de>
180 ## http://toms-cafe.de/vdr/download/tvonscreen-1.0.141-1.5.3.diff
181 ##
182 ## All lines beginning with `## DP:' are a description of the patch.
183 ## DP: Changes for VDR >= 1.5.3.
184
185 @DPATCH@
186 diff -Naurp tvonscreen-1.0.141/anyfont.c tvonscreen-1.0.141-vdr153/anyfont.c
187 --- tvonscreen-1.0.141/anyfont.c 2004-07-08 13:54:56.000000000 +0000
188 +++ tvonscreen-1.0.141-vdr153/anyfont.c 2007-09-14 12:46:58.000000000 +0000
189 @@ -10,20 +10,36 @@
190 #include "anyfont.h"
191 #include "magazine.h"
192
193 -#if VDRVERSNUM >= 10307
194 +#if VDRVERSNUM >= 10503
195 +anyFont::anyFont(cOsd *_osd,int fheight,int transparent)
196 +#elif VDRVERSNUM >= 10307
197 anyFont::anyFont(cOsd *_osd,const cFont::tPixelData *fd,int fheight,int transparent)
198 #else
199 anyFont::anyFont(cOsdBase *_osd,const cFont::tPixelData *fd,int fheight,int transparent)
200 #endif
201 {
202 osd=_osd;
203 +#if VDRVERSNUM >= 10503
204 +#if VDRVERSNUM >= 10504
205 + Font = cFont::CreateFont(Setup.FontOsd, fheight);
206 +#else
207 + Font = new cFreetypeFont(*AddDirectory(FONTDIR, Setup.FontOsd, fheight);
208 +#endif
209 + if (!Font || !Font->Height())
210 + Font = cFont::GetFont(fontSml);
211 +#else
212 FontData=fd;
213 FontHeight=fheight;
214 +#endif
215 trans=transparent;
216 }
217 int anyFont::Height(void)
218 {
219 +#if VDRVERSNUM >= 10503
220 + return Font->Height();
221 +#else
222 return FontHeight-2-2;
223 +#endif
224 }
225 int anyFont::Width(const char *txt)
226 {
227 @@ -39,21 +55,29 @@ int anyFont::LargeWidth(const char *txt)
228 }
229 int anyFont::Width(char c)
230 {
231 +#if VDRVERSNUM >= 10503
232 + return Font->Width(c);
233 +#else
234 if ((int)FontData[(((unsigned char)c)-32)*(FontHeight)]>100)
235 {
236 mzlog(1," big letter error %c: %d",c,(int)FontData[(((unsigned char)c)-32)*(FontHeight)]);
237 return 100;
238 }
239 return (int)FontData[(((unsigned char)c)-32)*(FontHeight)];
240 +#endif
241 }
242 int anyFont::LargeWidth(char c)
243 {
244 +#if VDRVERSNUM >= 10503
245 + return Font->Width(c);
246 +#else
247 if ((int)FontData[(((unsigned char)c)-32)*(FontHeight)]>100)
248 {
249 mzlog(1," big letter error %c: %d",c,(int)FontData[(((unsigned char)c)-32)*(FontHeight)]);
250 return 100;
251 }
252 return (int)FontData[(((unsigned char)c)-32)*(FontHeight)]*2;
253 +#endif
254 }
255 #if VDRVERSNUM >= 10307
256 int anyFont::Text(int x, int y, const char *txt, tColor fg, tColor bg)
257 @@ -61,6 +85,10 @@ int anyFont::Text(int x, int y, const ch
258 int anyFont::Text(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh)
259 #endif
260 {
261 +#if VDRVERSNUM >= 10503
262 + osd->DrawText(x, y, txt, fg, trans ? clrTransparent : bg, Font);
263 + return x += Font->Width(txt);
264 +#else
265 unsigned int pxl;
266 int row,col;
267
268 @@ -85,6 +113,7 @@ int anyFont::Text(int x, int y, const ch
269 x += Width(*txt++);
270 }
271 return x;
272 +#endif
273 }
274 #if VDRVERSNUM >= 10307
275 int anyFont::LargeText(int x, int y, const char *txt, tColor fg, tColor bg)
276 @@ -92,6 +121,10 @@ int anyFont::LargeText(int x, int y, con
277 int anyFont::LargeText(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh)
278 #endif
279 {
280 +#if VDRVERSNUM >= 10503
281 + osd->DrawText(x, y, txt, fg, trans ? clrTransparent : bg, Font);
282 + return x + Font->Width(txt);
283 +#else
284 unsigned int pxl;
285 int row,col;
286
287 @@ -116,6 +149,7 @@ int anyFont::LargeText(int x, int y, con
288 x += LargeWidth(*txt++);
289 }
290 return x;
291 +#endif
292 }
293 #if VDRVERSNUM >= 10307
294 int anyFont::Text(int x, int y, int w, int h, const char *txt, tColor fg, tColor bg)
295 diff -Naurp tvonscreen-1.0.141/anyfont.h tvonscreen-1.0.141-vdr153/anyfont.h
296 --- tvonscreen-1.0.141/anyfont.h 2004-07-08 13:54:56.000000000 +0000
297 +++ tvonscreen-1.0.141-vdr153/anyfont.h 2007-09-14 12:47:38.000000000 +0000
298 @@ -19,11 +19,17 @@ class anyFont
299 #else
300 cOsdBase *osd;
301 #endif
302 +#if VDRVERSNUM >= 10503
303 + const cFont *Font;
304 +#else
305 const cFont::tPixelData *FontData;
306 int FontHeight;
307 +#endif
308 int trans;
309 public:
310 -#if VDRVERSNUM >= 10307
311 +#if VDRVERSNUM >= 10503
312 + anyFont(cOsd *o,int fheight,int transparent=0);
313 +#elif VDRVERSNUM >= 10307
314 anyFont(cOsd *o,const cFont::tPixelData *fd,int fheight,int transparent=0);
315 #else
316 anyFont(cOsdBase *o,const cFont::tPixelData *fd,int fheight,int transparent=0);
317 diff -Naurp tvonscreen-1.0.141/magazine.c tvonscreen-1.0.141-vdr153/magazine.c
318 --- tvonscreen-1.0.141/magazine.c 2006-06-18 13:59:36.000000000 +0000
319 +++ tvonscreen-1.0.141-vdr153/magazine.c 2007-09-13 20:04:34.000000000 +0000
320 @@ -812,10 +812,12 @@ void magazine::autoTimer(const class cEv
321 }
322 }
323
324 +#if VDRVERSNUM < 10503
325 #include "fontosd/fontosd-arial18.c"
326 #include "fontosd/fontosd-verdana16.c"
327 #include "fontosd/fontosd-tahoma16.c"
328 #include "fontosd/fontosd-timesNewRoman16.c"
329 +#endif
330
331 void magazine::Show(void)
332 {
333 @@ -850,10 +852,17 @@ void magazine::Show(void)
334 delete f3;
335 delete f4;
336
337 +#if VDRVERSNUM >= 10503
338 + f1=new anyFont(osd,18,1); // Sendung
339 + f2=new anyFont(osd,16,1); // Extra-Info
340 + f3=new anyFont(osd,20,1); // Sender
341 + f4=new anyFont(osd,16); // Tasten
342 +#else
343 f1=new anyFont(osd,(cFont::tPixelData *)fontosd_arial18,FONTOSD_ARIAL18,1); // Sendung
344 f2=new anyFont(osd,(cFont::tPixelData *)fontosd_verdana16,FONTOSD_VERDANA16,1); // Extra-Info
345 f3=new anyFont(osd,(cFont::tPixelData *)fontosd_tahoma16,FONTOSD_TAHOMA16,1); // Sender
346 f4=new anyFont(osd,(cFont::tPixelData *)fontosd_newroman16,FONTOSD_NEWROMAN16); // Tasten
347 +#endif
348 for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++)
349 {
350 // cBitmap *b=osd->GetBitmap(i);
351
352
353
354 --
355 gentoo-commits@l.g.o mailing list