hash.c is a C hash table with quadratic probing
hash.c is a C hash table with quadratic probing. hash.c is very small and easy to use.
Compile: gcc -c hash.c
This hashtable uses C-strings for keys and quadratic probing instead of linked-list chains. It depends only on ANSI C and so should work anywhere.
hash * hash_new ( unsigned int size ) Create new hashtable.
void hash_destroy ( hash *h ) Free hashtable.
int hash_add ( hash *h , const char *key , void *value ) Add key/value pair.
void * hash_get ( hash *h , const char *key ) Return value matching given key.
void * hash_remove ( hash *h , const char *key ) Remove key from table, returing value.
unsigned int hash_size ( hash *h ) Returns total number of keys.
What's New in This Release:
This release uses exponentiation instead of xor in hashing.
It adds a hash_destroy function.
const char char *key this release int hash unsigned int hash destroy quadratic probing
Download hash.c 2
SQLiteJDBC 030 (by David Crawshaw)
SQLiteJDBC is a JDBC driver for SQLite which is written as a Java JNI layer over the SQLite 3.3.x API.
SQLiteJDBC supports the mos
hashit 0.9.4 (by Pleyades Crew)
hashit is a generic hash library.
hashit implements diverse collision handling methods.
This function creates a hash table whic
uthash 1.2 (by Troy D. Hanson)
uthash is a hash for C structures, allowing any C structure having a unique key field to be hashed.
Structures can be deleted, add
Other software in this category
zlib 1.2.3 (by Jean-loup Gailly)
zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp
libxml2 2.6.27 (by DV)
Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i
GNU C library 2.4 (by Andreas Jaeger)
GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.
GNU C library is us
jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java
Surf the Internet in a safer, faster, and easier way with Opera browser
GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell