Simplify hash_table somewhat.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Thu, 19 Nov 2009 00:24:08 +0000 (00:24 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Thu, 19 Nov 2009 00:24:08 +0000 (00:24 +0000)
commitc9fc602ad5c318d50707393caf62d1468697f500
treed120cc65e972a48cb2ee51349e12834715595868
parent8d9e0ecb10ca5fd8b3ae1bdcf244291e75654740
Simplify hash_table somewhat.

- Use djb2 hash http://www.cse.yorku.ca/~oz/hash.html
  Performs similarly to the existing function, but removes the need for a prime
  number of buckets. Doesn't need to do an strlen every insert either.
- Add some more heuristics. Collected in realtime (cheap), no postprocessing.

git-svn-id: http://opkg.googlecode.com/svn/trunk@336 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
libopkg/hash_table.c
libopkg/hash_table.h
libopkg/opkg_conf.c