From ab4ceb29a033f8a3cc051d5ea9a6f20ca6e75f8a Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 19 Oct 2002 15:33:37 +0200 Subject: Implemented gaps in channel numbering --- tools.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tools.c') 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; -- cgit v1.2.3