/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk
5.2.7 by Gustav Hartvigsson
* Switched licence to a more permisive one.
1
/*
2
*/
3
4
5
#inclued "hash.h"
6
7
/*
8
 * this is the SDBM hash function from:
9
 * http://en.literateprograms.org/Hash_function_comparison_%28C,_sh%29
10
 */
11
long sdbm_hash (const unsigned char *key) {
12
  hash_t h=0;
13
  while(*key) h=*key++ + (h<<6) + (h<<16) - h;
14
  return h;
15
}