hash.h

ldmud-3.4.1/src/hash.h · 473 B

From the archive ldmud-3.4.1.tar.gz

Download the archive   « Back to the archive contents

#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__ */

Site Stats

Snippets: 1791
Codebases: 571