/* $Id: hash.c,v 1.17 2004/03/11 06:39:59 reinelt Exp $ * * hashes (associative arrays) * * Copyright 1999-2003 Michael Reinelt * Copyright 2004 The LCD4Linux Team * * This file is part of LCD4Linux. * * LCD4Linux is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * LCD4Linux is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * $Log: hash.c,v $ * Revision 1.17 2004/03/11 06:39:59 reinelt * big patch from Martin: * - reuse filehandles * - memory leaks fixed * - earlier busy-flag checking with HD44780 * - reuse memory for strings in RESULT and hash * - netdev_fast to wavid time-consuming regex * * Revision 1.16 2004/03/03 08:40:07 hejl * Fixed memory leak in hash_get_regex * * Revision 1.15 2004/03/03 04:44:16 reinelt * changes (cosmetics?) to the big patch from Martin * hash patch un-applied * * Revision 1.14 2004/03/03 03:47:04 reinelt * big patch from Martin Hejl: * - use qprintf() where appropriate * - save CPU cycles on gettimeofday() * - add quit() functions to free allocated memory * - fixed lots of memory leaks * * Revision 1.13 2004/02/27 06:07:55 reinelt * hash improvements from Martin * * Revision 1.12 2004/01/30 20:57:56 reinelt * HD44780 patch from Martin Hejl * dmalloc integrated * * Revision 1.11 2004/01/29 04:40:02 reinelt * every .c file includes "config.h" now * * Revision 1.10 2004/01/27 04:48:57 reinelt * bug with hash_age() fixed (thanks to Markus Keil for pointing this out) * * Revision 1.9 2004/01/22 07:57:45 reinelt * several bugs fixed where segfaulting on layout>display * Crystalfontz driver optimized, 632 display already works * * Revision 1.8 2004/01/21 14:29:03 reinelt * new helper 'hash_get_regex' which delivers the sum over regex matched items * new function 'disk()' which uses this regex matching * * Revision 1.7 2004/01/21 10:48:17 reinelt * hash_age function added * * Revision 1.6 2004/01/20 05:36:59 reinelt * moved text-display-specific stuff to drv_generic_text * moved all the bar stuff from drv_generic_bar to generic_text * * Revision 1.5 2004/01/18 09:01:45 reinelt * /proc/stat parsing finished * * Revision 1.4 2004/01/18 06:54:08 reinelt * bug in expr.c fixed (thanks to Xavier) * some progress with /proc/stat parsing * * Revision 1.3 2004/01/16 07:26:25 reinelt * moved various /proc parsing to own functions * made some progress with /proc/stat parsing * * Revision 1.2 2004/01/16 05:04:53 reinelt * started plugin proc_stat which should parse /proc/stat * which again is a paint in the a** * thinking over implementation methods of delta functions * (CPU load, ...) * * Revision 1.1 2004/01/13 10:03:01 reinelt * new util 'hash' for associative arrays * new plugin 'cpuinfo' * */
# Lyon - France (DVB-T transmitter of Mt Pilat)
# Lyon - France (signal DVB-T transmis depuis l'�metteur du Mont Pilat)
# see : http://tnt.niv2.com/69000-LYON.html
# contact : Nicolas Estre <n_estre@yahoo.fr>
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
# R1 : Canal 45
T 666000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
# R2 : Canal 36
T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
# R3 : Canal 39
T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
# R4 : Canal 54
T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
# R5 : Canal 42
T 642000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
# R6 : Canal 47
T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
regerror(err, &preg, buffer, sizeof(buffer)); error ("error in regular expression: %s", buffer); regfree(&preg); return 0.0; } // force the table to be sorted by requesting anything hash_lookup(Hash, "", 1); for (i=0;inItems; i++) { if (regexec(&preg, Hash->Items[i].key, 0, NULL, 0)==0) { sum+=hash_get_delta(Hash, Hash->Items[i].key, delay); } } regfree(&preg); return sum; } void hash_destroy (HASH *Hash) { int i; if (Hash->Items) { // free all entries for (i=0;inItems; i++) { if (Hash->Items[i].key) free (Hash->Items[i].key); if (Hash->Items[i].val) free (Hash->Items[i].val); if (Hash->Items[i].Slot) free (Hash->Items[i].Slot); } // free hash table free (Hash->Items); } Hash->nItems=0; Hash->sorted=0; Hash->Items=NULL; }