From patchwork Mon Dec 12 18:10:32 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Rausch X-Patchwork-Id: 12121 Received: from mail.gmx.net ([213.165.64.21]) by www.linuxtv.org with smtp (Exim 4.50) id 1Els8h-0000he-Sd for vdr@linuxtv.org; Mon, 12 Dec 2005 19:11:07 +0100 Received: (qmail invoked by alias); 12 Dec 2005 18:10:34 -0000 Received: from p54B8DDAA.dip.t-dialin.net (EHLO gmx.de) [84.184.221.170] by mail.gmx.net (mp032) with SMTP; 12 Dec 2005 19:10:34 +0100 X-Authenticated: #610207 Message-ID: <439DBD18.4050900@gmx.de> Date: Mon, 12 Dec 2005 19:10:32 +0100 From: Thomas Rausch User-Agent: Mozilla/5.0 (compatible; MSIE5.5; Windows 98; X-Accept-Language: de-at, de, en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR Subject: Re: [vdr] Patch for timeline-0.9.0 (vdr-1.3.37) References: <4243F162.10489.90234@localhost> In-Reply-To: <4243F162.10489.90234@localhost> X-Enigmail-Version: 0.76.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-Y-GMX-Trusted: 0 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2005 18:11:08 -0000 Status: O X-Status: X-Keywords: X-UID: 6614 And here is the Patch at vdr-1.3.37 (an Include instruction was still necessary). ;-) diff -Nur timeline-0.9.0-org/checkerOsd.c timeline-0.9.0/checkerOsd.c --- timeline-0.9.0-org/checkerOsd.c 2005-01-02 13:24:57.000000000 +0100 +++ timeline-0.9.0/checkerOsd.c 2005-12-12 17:49:54.000000000 +0100 @@ -228,7 +228,11 @@ { if (showDay<0 && ct1->IsSingleEvent()) { +#if VDRVERSNUM < 10323 showDay=ct1->Day(); +#else + showDay=cTimer::GetMDay(ct1->Day()); +#endif } for(int i=0;iStart()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,ct1->Priority(),ch1->Name(),ct1->File()); - sprintf(line3,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,ct2->PrintDay(ct2->Day()),ct2->Priority(),ch2->Name(),ct2->File()); +#if VDRVERSNUM < 10323 + sprintf(line3,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,(const char *)ct2->PrintDay(ct2->Day()),ct2->Priority(),ch2->Name(),ct2->File()); +#else + sprintf(line3,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,(const char *)ct2->PrintDay(ct2->Day(),ct2->WeekDays()),ct2->Priority(),ch2->Name(),ct2->File()); +#endif } } else if (!ct1->IsSingleEvent() && ct2->IsSingleEvent()) @@ -301,7 +309,11 @@ { localtime_r(&start1t,&day1); sprintf(line1,"%s %04d-%02d-%02d (%s):",tr("Conflict on"),day1.tm_year+1900,day1.tm_mon+1,day1.tm_mday,tr("same input device")); - sprintf(line2,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,ct1->PrintDay(ct1->Day()),ct1->Priority(),ch1->Name(),ct1->File()); +#if VDRVERSNUM < 10323 + sprintf(line2,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,(const char *)ct1->PrintDay(ct1->Day()),ct1->Priority(),ch1->Name(),ct1->File()); +#else + sprintf(line2,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,(const char *)ct1->PrintDay(ct1->Day(),ct1->WeekDays()),ct1->Priority(),ch1->Name(),ct1->File()); +#endif sprintf(line3,"%02d:%02d-%02d:%02d, (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,ct2->Priority(),ch2->Name(),ct2->File()); } } @@ -312,7 +324,11 @@ for(int i=0;i<6;i++) { hassubmatch=false; +#if VDRVERSNUM < 10323 if (ct1->Day() & (1<WeekDays() & (1<SetTime(nn,ct1->TimeToInt(ct1->Start())); @@ -338,9 +354,15 @@ } if (hasmatched) { - sprintf(line1,"%s %s (%s):",tr("Repeating conflict on"),ct1->PrintDay(mdays|0x80000000),tr("same input device")); - sprintf(line2,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,ct1->PrintDay(ct1->Day()),ct1->Priority(),ch1->Name(),ct1->File()); - sprintf(line3,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,ct2->PrintDay(ct2->Day()),ct2->Priority(),ch2->Name(),ct2->File()); +#if VDRVERSNUM < 10323 + sprintf(line1,"%s %s (%s):",tr("Repeating conflict on"),(const char *)ct1->PrintDay(mdays|0x80000000),tr("same input device")); + sprintf(line2,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,(const char *)ct1->PrintDay(ct1->Day()),ct1->Priority(),ch1->Name(),ct1->File()); + sprintf(line3,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,(const char *)ct2->PrintDay(ct2->Day()),ct2->Priority(),ch2->Name(),ct2->File()); +#else + sprintf(line1,"%s %s (%s):",tr("Repeating conflict on"),(const char *)ct1->PrintDay(0,mdays),tr("same input device")); + sprintf(line2,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,(const char *)ct1->PrintDay(ct1->Day(),ct1->WeekDays()),ct1->Priority(),ch1->Name(),ct1->File()); + sprintf(line3,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,(const char *)ct2->PrintDay(ct2->Day(),ct2->WeekDays()),ct2->Priority(),ch2->Name(),ct2->File()); +#endif } } else // ct1->IsSingleEvent() && ct2->IsSingleEvent() @@ -574,13 +596,21 @@ ct1=Timers.First(); while (ct1) { +#if VDRVERSNUM < 10323 int day1=ct1->Day(); +#else + int day1=cTimer::GetMDay(ct1->Day()); +#endif if (!ct1->IsSingleEvent()) { if (ct1->DayMatches(dayt)) { day1=day; } + else + { + day1=0; + } } int start1=ct1->Start(); int stop1=ct1->Stop(); diff -Nur timeline-0.9.0-org/checkerOsd.h timeline-0.9.0/checkerOsd.h --- timeline-0.9.0-org/checkerOsd.h 2004-11-30 21:12:54.000000000 +0100 +++ timeline-0.9.0/checkerOsd.h 2005-12-12 17:51:42.000000000 +0100 @@ -11,6 +11,7 @@ #define CHECKEROSD_H #include +#include #include #include "config.h"