/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/hash.h

  • Committer: Gustav Hartvigsson
  • Date: 2014-11-24 13:43:46 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: gustav.hartvigsson@gmail.com-20141124134346-s0rshlu1e0qfo5g5
* Switched licence to a more permisive one.
   No need for it to be LGPL.
* Added hashing functions.

Show diffs side-by-side

added added

removed removed

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