diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-05-31 16:39:06 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-05-31 16:39:06 +0000 |
commit | 4e1eaa7205d8b7fbc64dc685d864b385a25602be (patch) | |
tree | c8548e4f6d775b1d7d3d7764fdd87156de116eff /hash.c | |
parent | 61bd7f7bf2cef22b8d867ad7b168e4422ffd94f6 (diff) | |
download | lcd4linux-4e1eaa7205d8b7fbc64dc685d864b385a25602be.tar.gz |
[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
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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;i<Hash->nItems; i++) { if (regexec(&preg, Hash->Items[i].key, 0, NULL, 0)==0) { |