git-svn-id: http://moon:8086/svn/software/trunk/libsrc/hash@1 b431acfa-c32f-4a4a-93f1-934dc6c82436
18 lines
613 B
C
Executable File
18 lines
613 B
C
Executable File
// -------------------------------------------------------------------
|
|
// hash.h
|
|
// -------------------------------------------------------------------
|
|
#ifndef HASH_H
|
|
#define HASH_H
|
|
|
|
// -------------------------------------------------------------------
|
|
typedef unsigned long int ub4; /* unsigned 4-byte quantities */
|
|
typedef unsigned char ub1; /* unsigned 1-byte quantities */
|
|
|
|
#define hashsize(n) ((ub4)1<<(n))
|
|
#define hashmask(n) (hashsize(n)-1)
|
|
|
|
ub4 hash(ub1 *k, ub4 length, ub4 initval);
|
|
|
|
// -------------------------------------------------------------------
|
|
#endif // HASH_H
|