summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-02-11 11:29:22 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-02-11 11:29:22 +0100
commitc0ed9649a3f32b4510eddb47dfd82bcc860eac70 (patch)
tree1302204c7951816cad401e604d1ba3a8c42cb6ae /config.c
parent535e755278ef51b923a71299204ec86da4229d02 (diff)
downloadvdr-c0ed9649a3f32b4510eddb47dfd82bcc860eac70.tar.gz
vdr-c0ed9649a3f32b4510eddb47dfd82bcc860eac70.tar.bz2
Fixed handling ':' in timer filenames and '\n' in timer summaries
Diffstat (limited to 'config.c')
-rw-r--r--config.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/config.c b/config.c
index d4d3daf0..3d3017c8 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.40 2001/02/03 16:19:42 kls Exp $
+ * $Id: config.c 1.41 2001/02/11 11:22:48 kls Exp $
*/
#include "config.h"
@@ -368,7 +368,11 @@ cTimer& cTimer::operator= (const cTimer &Timer)
const char *cTimer::ToText(cTimer *Timer)
{
delete buffer;
+ strreplace(Timer->file, ':', '|');
+ strreplace(Timer->summary, '\n', '|');
asprintf(&buffer, "%d:%d:%s:%04d:%04d:%d:%d:%s:%s\n", Timer->active, Timer->channel, PrintDay(Timer->day), Timer->start, Timer->stop, Timer->priority, Timer->lifetime, Timer->file, Timer->summary ? Timer->summary : "");
+ strreplace(Timer->summary, '|', '\n');
+ strreplace(Timer->file, '|', ':');
return buffer;
}
@@ -457,6 +461,8 @@ bool cTimer::Parse(const char *s)
//TODO add more plausibility checks
day = ParseDay(buffer1);
strn0cpy(file, buffer2, MaxFileName);
+ strreplace(file, '|', ':');
+ strreplace(summary, '|', '\n');
delete buffer1;
delete buffer2;
delete s2;