summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
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 b3b64fc..df2d570 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;