From 7f9d14ee8b181a999afb997d74a24b3087fd9d33 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 11 Jan 2004 15:54:37 +0100 Subject: The actual transponder data is now taken from the NIT --- tools.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tools.c') diff --git a/tools.c b/tools.c index 21ec526c..fc8cb294 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.77 2003/04/06 15:31:45 kls Exp $ + * $Id: tools.c 1.78 2004/01/11 15:42:30 kls Exp $ */ #include "tools.h" @@ -20,6 +20,14 @@ int SysLogLevel = 3; +int BCD2INT(int x) +{ + return ((1000000 * BCDCHARTOINT((x >> 24) & 0xFF)) + + (10000 * BCDCHARTOINT((x >> 16) & 0xFF)) + + (100 * BCDCHARTOINT((x >> 8) & 0xFF)) + + BCDCHARTOINT( x & 0xFF)); +} + ssize_t safe_read(int filedes, void *buffer, size_t size) { for (;;) { -- cgit v1.2.3