blob: 8d3998c6a1a27a97fe2c4c18b84534e0216342bd [file] [log] [blame]
willy tarreau12350152005-12-18 01:03:27 +01001/*
2 This File is copied from
3
4 http://www.oreilly.com/catalog/masteralgoc/index.html
5 Mastering Algorithms with C
6 By Kyle Loudon
7 ISBN: 1-56592-453-3
8 Publishd by O'Reilly
9
10 We have added our own struct to these function.
11 */
12
13/*****************************************************************************
14* *
15* ------------------------------- hashpjw.h ------------------------------ *
16* *
17*****************************************************************************/
18
Willy Tarreau2dd0d472006-06-29 17:53:05 +020019#ifndef _COMMON_HASHPJW_H
20#define _COMMON_HASHPJW_H
willy tarreau12350152005-12-18 01:03:27 +010021
Willy Tarreaue3ba5f02006-06-29 18:54:54 +020022#include <common/config.h>
23
willy tarreau12350152005-12-18 01:03:27 +010024/*****************************************************************************
25* *
26* Define a table size for demonstration purposes only. *
27* *
28*****************************************************************************/
29
30#define PRIME_TBLSIZ 1699
31
32/*****************************************************************************
33* *
34* --------------------------- Public Interface --------------------------- *
35* *
36*****************************************************************************/
37
38int hashpjw(const void *key);
39
Willy Tarreau2dd0d472006-06-29 17:53:05 +020040#endif /* _COMMON_HASHPJW_H */