From 4e1eaa7205d8b7fbc64dc685d864b385a25602be Mon Sep 17 00:00:00 2001 From: reinelt Date: Mon, 31 May 2004 16:39:06 +0000 Subject: [lcd4linux @ 2004-05-31 16:39:05 by reinelt] added NULL display driver (for debugging/profiling purposes) added backlight/contrast initialisation for matrixOrbital added Backlight initialisation for Cwlinux git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@452 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- hash.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index b73313a..57dbe06 100644 --- a/hash.c +++ b/hash.c @@ -1,4 +1,4 @@ -/* $Id: hash.c,v 1.17 2004/03/11 06:39:59 reinelt Exp $ +/* $Id: hash.c,v 1.18 2004/05/31 16:39:06 reinelt Exp $ * * hashes (associative arrays) * @@ -23,6 +23,12 @@ * * * $Log: hash.c,v $ + * Revision 1.18 2004/05/31 16:39:06 reinelt + * + * added NULL display driver (for debugging/profiling purposes) + * added backlight/contrast initialisation for matrixOrbital + * added Backlight initialisation for Cwlinux + * * Revision 1.17 2004/03/11 06:39:59 reinelt * big patch from Martin: * - reuse filehandles @@ -162,6 +168,9 @@ static HASH_ITEM* hash_lookup (HASH *Hash, char *key, int sortit) Hash->sorted=1; } + // no key was passed + if (key==NULL) return NULL; + // lookup using bsearch if (Hash->sorted) { Item=bsearch(key, Hash->Items, Hash->nItems, sizeof(HASH_ITEM), hash_lookup_f); @@ -378,7 +387,7 @@ double hash_get_regex (HASH *Hash, char *key, int delay) } // force the table to be sorted by requesting anything - hash_lookup(Hash, "", 1); + hash_lookup(Hash, NULL, 1); for (i=0;inItems; i++) { if (regexec(&preg, Hash->Items[i].key, 0, NULL, 0)==0) { -- cgit v1.2.3