diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2000-10-29 13:17:22 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2000-10-29 13:17:22 +0100 |
commit | e6999e9b3a5f584de2f40ca833effe5ff5636f6a (patch) | |
tree | ffbbe5fd379916a43e9c887783b34ee34563a77f /tools.c | |
parent | 92d3e366badb370e446156c0896103a578a24af0 (diff) | |
download | vdr-e6999e9b3a5f584de2f40ca833effe5ff5636f6a.tar.gz vdr-e6999e9b3a5f584de2f40ca833effe5ff5636f6a.tar.bz2 |
Implemented 'Schedules' menu
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.21 2000/10/07 18:02:24 kls Exp $ + * $Id: tools.c 1.22 2000/10/29 11:21:55 kls Exp $ */ #define _GNU_SOURCE @@ -85,11 +85,16 @@ char *strreplace(char *s, char c1, char c2) return s; } -char *skipspace(char *s) +char *skipspace(const char *s) { while (*s && isspace(*s)) s++; - return s; + return (char *)s; +} + +bool isempty(const char *s) +{ + return !(s && *skipspace(s)); } int time_ms(void) @@ -520,7 +525,7 @@ void cListBase::Clear(void) objects = lastObject = NULL; } -cListObject *cListBase::Get(int Index) +cListObject *cListBase::Get(int Index) const { if (Index < 0) return NULL; @@ -530,7 +535,7 @@ cListObject *cListBase::Get(int Index) return object; } -int cListBase::Count(void) +int cListBase::Count(void) const { int n = 0; cListObject *object = objects; |