summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-08-18 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-08-18 18:00:00 +0200
commit371bf0665eda455c67926999f52b4850cd8529e4 (patch)
tree383f39f92ef1f3846d89e4ae6ad7e39699334f01 /tools.c
parentefea0f64d08052b0189d962101e1a3634d4adfc8 (diff)
downloadvdr-patch-lnbsharing-371bf0665eda455c67926999f52b4850cd8529e4.tar.gz
vdr-patch-lnbsharing-371bf0665eda455c67926999f52b4850cd8529e4.tar.bz2
Version 0.92vdr-0.92
- The "channel not sync'ed" log message now also lists the card number. - Now using the EIT services from 'libdtv' (thanks to Rolf Hakenes), which provides EPG information for NVOD ("Near Video On Demand") channels. - Doing some bug fixing on the EPG data (some tv stations apparently have their own idea on how to fill in the data...). The level up to which EPG bugs are fixed can be controlled with the EPGBugfixLevel parameter in the "Setup" menu (see MANUAL for details, and cEventInfo::FixEpgBugs() in eit.c for the actual implementation). - Fixed broken recordings after a driver buffer overflow. - Fixed the chirping sound after Pause/Play of a DVD (thanks to Andreas Schultz).
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index e6aba17..30b675b 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.39 2001/08/12 15:12:54 kls Exp $
+ * $Id: tools.c 1.40 2001/08/17 12:45:42 kls Exp $
*/
#define _GNU_SOURCE
@@ -103,6 +103,32 @@ char *stripspace(char *s)
return s;
}
+char *compactspace(char *s)
+{
+ if (s && *s) {
+ char *t = stripspace(skipspace(s));
+ char *p = t;
+ while (p && *p) {
+ char *q = skipspace(p);
+ if (q - p > 1)
+ memmove(p + 1, q, strlen(q) + 1);
+ p++;
+ }
+ if (t != s)
+ memmove(s, t, strlen(t) + 1);
+ }
+ return s;
+}
+
+bool startswith(const char *s, const char *p)
+{
+ while (*p) {
+ if (*p++ != *s++)
+ return false;
+ }
+ return true;
+}
+
bool isempty(const char *s)
{
return !(s && *skipspace(s));