sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
lookupa.h
Go to the documentation of this file.
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
14#ifndef LOOKUPA_H
15#define LOOKUPA_H
16
17#include "standard.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#define CHECKSTATE 8
24#define hashsize(n) ((size_t)1<<(n))
25#define hashmask(n) (hashsize(n)-1)
26
27extern uint32_t lookup(const char *k, size_t length, uint32_t level);
28extern void checksum(const char *k, size_t length, uint32_t *state);
29
30#ifdef __cplusplus
31}
32#endif
33
34#endif /* LOOKUPA */