summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-10-19 15:33:37 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-10-19 15:33:37 +0200
commitab4ceb29a033f8a3cc051d5ea9a6f20ca6e75f8a (patch)
treebefea69b48e6187abae6b836b51c823e76846763 /tools.c
parent16f3d3fc5d2f883241147db6ed9622a58f73b7c0 (diff)
downloadvdr-ab4ceb29a033f8a3cc051d5ea9a6f20ca6e75f8a.tar.gz
vdr-ab4ceb29a033f8a3cc051d5ea9a6f20ca6e75f8a.tar.bz2
Implemented gaps in channel numbering
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index b3b64fc9..df2d5705 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.71 2002/09/09 21:35:49 kls Exp $
+ * $Id: tools.c 1.72 2002/10/19 12:32:53 kls Exp $
*/
#include "tools.h"
@@ -207,6 +207,13 @@ bool isempty(const char *s)
return !(s && *skipspace(s));
}
+int numdigits(int n)
+{
+ char buf[16];
+ snprintf(buf, sizeof(buf), "%d", n);
+ return strlen(buf);
+}
+
int time_ms(void)
{
static time_t t0 = 0;