]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - gnu/usr.bin/perl/x2p/hash.h
Add the missing rerelease target back.
[FreeBSD/FreeBSD.git] / gnu / usr.bin / perl / x2p / hash.h
1 /* $RCSfile: hash.h,v $$Revision: 1.1.1.1 $$Date: 1994/09/10 06:27:54 $
2  *
3  *    Copyright (c) 1991, Larry Wall
4  *
5  *    You may distribute under the terms of either the GNU General Public
6  *    License or the Artistic License, as specified in the README file.
7  *
8  * $Log: hash.h,v $
9  * Revision 1.1.1.1  1994/09/10  06:27:54  gclarkii
10  * Initial import of Perl 4.046 bmaked
11  *
12  * Revision 1.1.1.1  1993/08/23  21:30:10  nate
13  * PERL!
14  *
15  * Revision 4.0.1.1  91/06/07  12:16:04  lwall
16  * patch4: new copyright notice
17  *
18  * Revision 4.0  91/03/20  01:57:53  lwall
19  * 4.0 baseline.
20  *
21  */
22
23 #define FILLPCT 60              /* don't make greater than 99 */
24
25 #ifdef DOINIT
26 char coeff[] = {
27                 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
28                 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
29                 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
30                 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
31                 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
32                 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
33                 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
34                 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1};
35 #else
36 extern char coeff[];
37 #endif
38
39 typedef struct hentry HENT;
40
41 struct hentry {
42     HENT        *hent_next;
43     char        *hent_key;
44     STR         *hent_val;
45     int         hent_hash;
46 };
47
48 struct htbl {
49     HENT        **tbl_array;
50     int         tbl_max;
51     int         tbl_fill;
52     int         tbl_riter;      /* current root of iterator */
53     HENT        *tbl_eiter;     /* current entry of iterator */
54 };
55
56 STR *hfetch();
57 bool hstore();
58 bool hdelete();
59 HASH *hnew();
60 int hiterinit();
61 HENT *hiternext();
62 char *hiterkey();
63 STR *hiterval();