Re: Generic Hash table functions that are not hcreate or BSD
In article <Pine.LNX.3.96.971119095744.2475Cemail@example.com> you write:
>I would like to be able to hash random data (strings, ints, structs..
>whatever I want, basically), and have several different hash tables
>active. The BSD routines fail the first test, hcreate the second.
If your aim is really to associate keys to values, perhaps my rbtree
library is for you. It implements generic red-black trees (which are
binary search trees with some algorithm to keep its height limited
to O(log n)).
The keys as well as the values are supported to the library as void *.
The library doesn't interpret the value pointers at all, but just
stores and returns them appropriately. The key pointers aren't interpreted
but used as arguments to a user supplied compare routine (which is
used for sorting elements into the tree).
The source is BSD-style licensed (so it is DFSG, I hope). It is
accompanied with a mandoc man page and a makefile dependant on
Berkeley make and the <bsd.lib.mk> makefile include. So if you
wanted to make some Debian package of it, someone would have to
make up packaging information and a gmake makefile.
If you are interested, just mail me.
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .