summaryrefslogtreecommitdiff
path: root/noannounce.c
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger@gmx.de>2011-09-22 19:43:08 +0200
committerChristian Wieninger <cwieninger@gmx.de>2011-09-22 19:43:08 +0200
commiteff341390c079060d0904a53b7eebe84e2315f3a (patch)
treed45d902e7a7022a95a3e9c58346d88c45e0da517 /noannounce.c
parentbe2c5ff1bfdff45d384981816ef692f0179a7f15 (diff)
downloadvdr-plugin-epgsearch-eff341390c079060d0904a53b7eebe84e2315f3a.tar.gz
vdr-plugin-epgsearch-eff341390c079060d0904a53b7eebe84e2315f3a.tar.bz2
Delete trailing whitespace, thanks to Ville Skyttä for patches
Diffstat (limited to 'noannounce.c')
-rw-r--r--noannounce.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/noannounce.c b/noannounce.c
index e2f13c4..d70290b 100644
--- a/noannounce.c
+++ b/noannounce.c
@@ -43,7 +43,7 @@ cNoAnnounce::cNoAnnounce(const cEvent* e, time_t NextAnnounce)
startTime = 0;
buffer = NULL;
if (e)
- {
+ {
if (e->Title()) title = e->Title();
if (e->ShortText()) shortText = e->ShortText();
channelID = e->ChannelID();
@@ -72,11 +72,11 @@ bool cNoAnnounce::Parse(const char *s)
char *pos_next;
int parameter = 1;
int valuelen;
-
+
#define MAXVALUELEN (10 * MaxFileName)
-
+
char value[MAXVALUELEN];
-
+
pos = line = strdup(s);
pos_next = pos + strlen(pos);
if (*pos_next == '\n') *pos_next = 0;
@@ -88,9 +88,9 @@ bool cNoAnnounce::Parse(const char *s)
if (!pos_next)
pos_next = pos + strlen(pos);
valuelen = pos_next - pos + 1;
- if (valuelen > MAXVALUELEN)
+ if (valuelen > MAXVALUELEN)
{
- LogFile.eSysLog("entry '%s' is too long. Will be truncated!", pos);
+ LogFile.eSysLog("entry '%s' is too long. Will be truncated!", pos);
valuelen = MAXVALUELEN;
}
strn0cpy(value, pos, valuelen);
@@ -114,10 +114,10 @@ bool cNoAnnounce::Parse(const char *s)
}
if (*pos) pos++;
} //while
-
+
title = ReplaceAll(title, "|", ":");
shortText = ReplaceAll(shortText, "|", ":");
-
+
free(line);
return (parameter >= 5) ? true : false;
}
@@ -125,7 +125,7 @@ bool cNoAnnounce::Parse(const char *s)
const char *cNoAnnounce::ToText(void) const
{
free(buffer);
- msprintf(&buffer, "%s:%s:%s:%ld:%ld",
+ msprintf(&buffer, "%s:%s:%s:%ld:%ld",
ReplaceAll(title, ":", "|").c_str(),
ReplaceAll(shortText, ":", "|").c_str(),
*channelID.ToString(),
@@ -144,7 +144,7 @@ cNoAnnounce* cNoAnnounces::InList(const cEvent* e)
{
cNoAnnounce noAnnounceTemp(e);
cNoAnnounce* noAnnounce = First();
- while (noAnnounce)
+ while (noAnnounce)
{
if (*noAnnounce == noAnnounceTemp)
{
@@ -157,7 +157,7 @@ cNoAnnounce* cNoAnnounces::InList(const cEvent* e)
return noAnnounce;
}
noAnnounce = Next(noAnnounce);
- }
+ }
return NULL;
}
@@ -165,18 +165,18 @@ void cNoAnnounces::ClearOutdated(void)
{
// remove outdated items
cNoAnnounce* noAnnounce = First();
- while (noAnnounce)
+ while (noAnnounce)
{
cNoAnnounce* noAnnounceNext = Next(noAnnounce);
if (noAnnounce->startTime < time(NULL))
Del(noAnnounce);
noAnnounce = noAnnounceNext;
- }
+ }
}
void cNoAnnounces::UpdateNextAnnounce(const cEvent* e, time_t NextAnnounce)
{
cNoAnnounce* noAnnounce = InList(e);
if (noAnnounce)
- noAnnounce->nextAnnounce = NextAnnounce;
+ noAnnounce->nextAnnounce = NextAnnounce;
}