PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
lookupa.h
1/*
2------------------------------------------------------------------------------
3By Bob Jenkins, September 1996.
4lookupa.h, a hash function for table lookup, same function as lookup.c.
5Use this code in any way you wish. Public Domain. It has no warranty.
6Source is http://burtleburtle.net/bob/c/lookupa.h
7------------------------------------------------------------------------------
8*/
9
10#ifndef STANDARD
11#include "standard.h"
12#endif
13
14#ifndef LOOKUPA
15#define LOOKUPA
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#define CHECKSTATE 8
22#define hashsize(n) ((ub4)1<<(n))
23#define hashmask(n) (hashsize(n)-1)
24
25ub4 lookup(/*_ ub1 *k, ub4 length, ub4 level _*/);
26void checksum(/*_ ub1 *k, ub4 length, ub4 *state _*/);
27
28#ifdef __cplusplus
29}
30#endif
31
32#endif /* LOOKUPA */