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 |
#ifndef __H_HASH__
|
|
5 |
#define __H_HASH__
|
|
6 |
||
7 |
#include "defs.h" |
|
|
22
by Gustav Hartvigsson
* Made code compile |
8 |
#include "utils.h" |
|
5.2.7
by Gustav Hartvigsson
* Switched licence to a more permisive one. |
9 |
|
10 |
BEGIN_DECLS
|
|
11 |
||
12 |
/** @file
|
|
13 |
* A collection of hash functions.
|
|
14 |
*/
|
|
15 |
||
16 |
||
17 |
/**
|
|
18 |
* this is the SDBM hash function from:
|
|
19 |
* http://en.literateprograms.org/Hash_function_comparison_%28C,_sh%29
|
|
20 |
*/
|
|
21 |
hash_t sdbm_hash (const unsigned char *key); |
|
22 |
||
23 |
||
|
29
by Gustav Hartvigsson
* Switched to CMake to future proof the project a lil' bit. |
24 |
/* TODO: Make this settable via CMake. */
|
|
5.2.7
by Gustav Hartvigsson
* Switched licence to a more permisive one. |
25 |
/**
|
26 |
* what hash function s_hash is defined to.
|
|
27 |
*/
|
|
28 |
#define s_hash(k) sdbm_hash(k)
|
|
29 |
||
30 |
||
31 |
END_DECLS
|
|
32 |
||
33 |
#endif
|