Project

General

Profile

Bug #765 » recordings.diff

anbr, 11/12/2011 02:58 PM

View differences:

vdr-vdrmanager/helpers.cpp
time_t startTime = event->StartTime();
time_t endTime = event->EndTime();
sprintf(buf, "%d", recording->Index());
snprintf(buf, sizeof(buf)-1, "%d", recording->Index());
result = buf;
result += ":";
sprintf(buf, "%lu", startTime);
snprintf(buf, sizeof(buf)-1, "%lu", startTime);
result += buf;
result += ":";
sprintf(buf, "%lu", endTime);
snprintf(buf, sizeof(buf)-1, "%lu", endTime);
result += buf;
result += ":";
......
}
result += ":";
result += MapSpecialChars(event->Title());
if (event->Title()) {
result += MapSpecialChars(event->Title());
} else {
if (info->Title())
result += MapSpecialChars(info->Title());
else
result += "<unnamed>";
}
result += ":";
result += MapSpecialChars(event->ShortText() ? event->ShortText() : "");
......
string result;
char buf[100];
sprintf(buf, "T%d", timer->Index());
snprintf(buf, sizeof(buf)-1, "T%d", timer->Index());
result = buf;
result += ":";
sprintf(buf, "%u", timer->Flags());
snprintf(buf, sizeof(buf)-1, "%u", timer->Flags());
result += buf;
result += ":";
sprintf(buf, "%d", timer->Channel()->Number());
snprintf(buf, sizeof(buf)-1, "%d", timer->Channel()->Number());
result += buf;
result += ":";
result += channelName;
result += ":";
sprintf(buf, "%lu", timer->StartTime());
snprintf(buf, sizeof(buf)-1, "%lu", timer->StartTime());
result += buf;
result += ":";
sprintf(buf, "%lu", timer->StopTime());
snprintf(buf, sizeof(buf)-1, "%lu", timer->StopTime());
result += buf;
result += ":";
sprintf(buf, "%d", timer->Priority());
snprintf(buf, sizeof(buf)-1, "%d", timer->Priority());
result += buf;
result += ":";
sprintf(buf, "%d", timer->Lifetime());
snprintf(buf, sizeof(buf)-1, "%d", timer->Lifetime());
result += buf;
result += ":";
result += MapSpecialChars(timer->File());
......
char buf[100];
string result;
sprintf(buf, "E%d", channel->Number());
snprintf(buf, sizeof(buf)-1, "E%d", channel->Number());
result = buf;
result += ":";
result += channel->Name();
result += ":";
sprintf(buf, "%lu", event->StartTime());
snprintf(buf, sizeof(buf)-1, "%lu", event->StartTime());
result += buf;
result += ":";
sprintf(buf, "%lu", event->StartTime() + event->Duration());
snprintf(buf, sizeof(buf)-1, "%lu", event->StartTime() + event->Duration());
result += buf;
result += ":";
result += MapSpecialChars(event->Title());
(2-2/2)