diff options
Diffstat (limited to 'include/lookupa.h')
-rw-r--r-- | include/lookupa.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/lookupa.h b/include/lookupa.h new file mode 100644 index 0000000..5f0f385 --- /dev/null +++ b/include/lookupa.h @@ -0,0 +1,30 @@ +/* +------------------------------------------------------------------------------ +By Bob Jenkins, September 1996. +lookupa.h, a hash function for table lookup, same function as lookup.c. +Use this code in any way you wish. Public Domain. It has no warranty. +Source is http://burtleburtle.net/bob/c/lookupa.h +------------------------------------------------------------------------------ +*/ + +#ifndef LOOKUPA +#define LOOKUPA + +#include "generic.h" + +#define CHECKSTATE 8 +#define hashsize(n) ((ub4)1<<(n)) +#define hashmask(n) (hashsize(n)-1) + +#ifdef __cplusplus +extern "C" { +#endif + +Uint32 lookup(/*_ ub1 *k, ub4 length, ub4 level _*/); +void checksum(/*_ ub1 *k, ub4 length, ub4 *state _*/); + +#ifdef __cplusplus +} +#endif + +#endif /* LOOKUPA */ |