This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 2.0 patch 1: removed redundant debugging code in regexp.c
[perl5.git] / hash.h
CommitLineData
378cc40b 1/* $Header: hash.h,v 2.0 88/06/05 00:09:08 root Exp $
8d063cd8
LW
2 *
3 * $Log: hash.h,v $
378cc40b
LW
4 * Revision 2.0 88/06/05 00:09:08 root
5 * Baseline version 2.0.
8d063cd8
LW
6 *
7 */
8
9#define FILLPCT 60 /* don't make greater than 99 */
10
378cc40b 11#define COEFFSIZE (16 * 8) /* size of array below */
8d063cd8
LW
12#ifdef DOINIT
13char coeff[] = {
14 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
15 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
16 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
17 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
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#else
23extern char coeff[];
24#endif
25
26typedef struct hentry HENT;
27
28struct hentry {
29 HENT *hent_next;
30 char *hent_key;
31 STR *hent_val;
32 int hent_hash;
33};
34
35struct htbl {
36 HENT **tbl_array;
37 int tbl_max;
38 int tbl_fill;
39 int tbl_riter; /* current root of iterator */
40 HENT *tbl_eiter; /* current entry of iterator */
41};
42
43STR *hfetch();
44bool hstore();
378cc40b 45STR *hdelete();
8d063cd8 46HASH *hnew();
378cc40b
LW
47void hclear();
48void hfree();
49void hentfree();
8d063cd8
LW
50int hiterinit();
51HENT *hiternext();
52char *hiterkey();
53STR *hiterval();