mirror of
git://git.psyced.org/git/psyclpc
synced 2024-08-15 03:20:16 +00:00
19 lines
473 B
C
19 lines
473 B
C
|
#ifndef HASH_H__
|
||
|
#define HASH_H__ 1
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
#include <limits.h>
|
||
|
|
||
|
typedef unsigned short whash_t;
|
||
|
typedef unsigned char chash_t;
|
||
|
|
||
|
#define MAX_WHASH (USHRT_MAX)
|
||
|
#define MAX_CHASH (UCHAR_MAX)
|
||
|
|
||
|
extern whash_t whashmem (const char *s, size_t len, int maxn);
|
||
|
extern whash_t whashmem2 (const char *s, size_t len, int maxn, whash_t initial);
|
||
|
extern whash_t whashstr (const char *s, int maxn);
|
||
|
extern chash_t chashstr (const char *s, int maxn);
|
||
|
|
||
|
#endif /* HASH_H__ */
|