1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
*/
#ifndef __H_HASH__
#define __H_HASH__
#include "defs.h"
#include "utils.h"
BEGIN_DECLS
/** @file
* A collection of hash functions.
*/
/**
* this is the SDBM hash function from:
* http://en.literateprograms.org/Hash_function_comparison_%28C,_sh%29
*/
hash_t sdbm_hash (const unsigned char *key);
/* TODO: Make this settable via CMake. */
/**
* what hash function s_hash is defined to.
*/
#define s_hash(k) sdbm_hash(k)
END_DECLS
#endif
|