Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: help fixing timeline-0.9.0 for 1.3.18
You should only be adding a "(const char *)" to cString objects that you
need converted to strings.
> Thank you for your response. If I take the following expression:
>
> ct2->PrintDay(ct2->Day())
>
> and translate that to:
>
> ct2->PrintDay((const char *)ct2->Day())
>
> Then, I get the following error.
Since ct2->Day() returns an integer, the "(const char *)" conversion is
not the right thing to do here.
Taking one of the lines you quoted in your first message:
> checkerOsd.c: 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());
Only the 5th, 7th and 8th parameters passed of sprintf are expected as
strings (%s), the others should be left alone as integers (%d).
So the line should probably be fixed as:
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(), (const char
*)ch2->Name(), (const char *)ct2->File());
I have not tested this, so it's possible I've made a typo in it... ;)
YMMV,
Peter
Home |
Main Index |
Thread Index