Commit | Line | Data |
---|---|---|
fe14fcc3 | 1 | /* $Header: hash.h,v 4.0 91/03/20 01:57:53 lwall Locked $ |
a687059c LW |
2 | * |
3 | * Copyright (c) 1989, Larry Wall | |
4 | * | |
5 | * You may distribute under the terms of the GNU General Public License | |
6 | * as specified in the README file that comes with the perl 3.0 kit. | |
8d063cd8 LW |
7 | * |
8 | * $Log: hash.h,v $ | |
fe14fcc3 LW |
9 | * Revision 4.0 91/03/20 01:57:53 lwall |
10 | * 4.0 baseline. | |
8d063cd8 LW |
11 | * |
12 | */ | |
13 | ||
14 | #define FILLPCT 60 /* don't make greater than 99 */ | |
15 | ||
16 | #ifdef DOINIT | |
17 | char coeff[] = { | |
18 | 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, | |
19 | 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, | |
20 | 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, | |
21 | 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, | |
22 | 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, | |
23 | 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, | |
24 | 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, | |
25 | 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1}; | |
26 | #else | |
27 | extern char coeff[]; | |
28 | #endif | |
29 | ||
30 | typedef struct hentry HENT; | |
31 | ||
32 | struct hentry { | |
33 | HENT *hent_next; | |
34 | char *hent_key; | |
35 | STR *hent_val; | |
36 | int hent_hash; | |
37 | }; | |
38 | ||
39 | struct htbl { | |
40 | HENT **tbl_array; | |
41 | int tbl_max; | |
42 | int tbl_fill; | |
43 | int tbl_riter; /* current root of iterator */ | |
44 | HENT *tbl_eiter; /* current entry of iterator */ | |
45 | }; | |
46 | ||
47 | STR *hfetch(); | |
48 | bool hstore(); | |
49 | bool hdelete(); | |
50 | HASH *hnew(); | |
51 | int hiterinit(); | |
52 | HENT *hiternext(); | |
53 | char *hiterkey(); | |
54 | STR *hiterval(); |