diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-10-19 15:33:37 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-10-19 15:33:37 +0200 |
commit | ab4ceb29a033f8a3cc051d5ea9a6f20ca6e75f8a (patch) | |
tree | befea69b48e6187abae6b836b51c823e76846763 /tools.c | |
parent | 16f3d3fc5d2f883241147db6ed9622a58f73b7c0 (diff) | |
download | vdr-ab4ceb29a033f8a3cc051d5ea9a6f20ca6e75f8a.tar.gz vdr-ab4ceb29a033f8a3cc051d5ea9a6f20ca6e75f8a.tar.bz2 |
Implemented gaps in channel numbering
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 9 |
1 files changed, 8 insertions, 1 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.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; |