diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-03-28 08:41:02 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-03-28 08:41:02 +0000 |
| commit | 71e60921ff395a16285b7c5362f8bfbebf0821bf (patch) | |
| tree | 700be4c6c20764894c8e23932d45b7753617798f /lib/libc/stdlib | |
| parent | 9829c3ed2e564308a11d9c7785d53362735084d6 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/strhash.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libc/stdlib/strhash.c b/lib/libc/stdlib/strhash.c index 77d8ac944477..77bc02ef0c64 100644 --- a/lib/libc/stdlib/strhash.c +++ b/lib/libc/stdlib/strhash.c @@ -1,5 +1,5 @@ #ifndef lint -static char *rcsid = "$Header: /home/ncvs/src/lib/libc/stdlib/strhash.c,v 1.1 1995/03/26 10:21:55 jkh Exp $"; +static char *rcsid = "$Header: /home/ncvs/src/lib/libc/stdlib/strhash.c,v 1.2 1995/03/26 19:32:24 ache Exp $"; #endif /* @@ -37,6 +37,9 @@ static char *rcsid = "$Header: /home/ncvs/src/lib/libc/stdlib/strhash.c,v 1.1 19 /* * $Log: strhash.c,v $ + * Revision 1.2 1995/03/26 19:32:24 ache + * Hash 8bit chars without sign extension + * * Revision 1.1 1995/03/26 10:21:55 jkh * Add the strhash family of routines. They provide a number of features * that the db/hash functions don't, and they're much simpler to use for @@ -83,6 +86,7 @@ static char *rcsid = "$Header: /home/ncvs/src/lib/libc/stdlib/strhash.c,v 1.1 19 */ +#include <stdio.h> #include <string.h> #include <sys/types.h> #include <strhash.h> @@ -238,7 +242,7 @@ void * hash_search(hash_table *table, caddr_t key, void *datum, void (*replace_func)()) { - int bucket = hash(table->size, key); + int bucket = _hash(table->size, key); hash_node *found = list_find(key, table->buckets[bucket]); if (found){ @@ -346,8 +350,7 @@ hash_purge(hash_table *table, void (*purge_func)(char *p1, void *p2)) } } -#ifdef HASH_STATS -#include <stdio.h> +#undef min #define min(a, b) (a) < (b) ? (a) : (b) /* @@ -416,4 +419,3 @@ hash_stats(hash_table *table, int verbose) } return; } -#endif /* HASH_STATS */ |
