|
|
1.1 root 1: /* $Header: hash.h,v 1.2 85/03/26 15:49:56 nicklin Exp $ */
2:
3: /*
4: * Hash table definitions
5: *
6: * Author: Peter J. Nicklin
7: */
8:
9: /*
10: * Singly-linked list block containing a pointer to a hash table
11: * block for an include file
12: */
13: typedef struct _iblk
14: {
15: int i_loop;
16: struct _hblk *i_hblk;
17: struct _iblk *i_next;
18: } INCBLK;
19: /*
20: * Hash table block
21: */
22: typedef struct _hblk
23: {
24: char *h_key; /* points to key */
25: char *h_def; /* points to definition string */
26: int h_val; /* integer value */
27: struct _iblk *h_sub; /* ptr to include subchain */
28: struct _hblk *h_tag; /* ptr to auxiliary tag chain */
29: struct _hblk *h_next; /* ptr to next block */
30: } HASHBLK;
31: /*
32: * Hash pointer table struct
33: */
34: typedef struct _hash
35: {
36: HASHBLK **hashtab; /* hash pointer table */
37: int hashsiz; /* hash table size */
38: } HASH;
39: /*
40: * Functions defined for hash tables
41: */
42: extern HASHBLK *htbrm(); /* remove hash table block */
43: extern int hthash(); /* compute hash value */
44: extern HASH *htinit(); /* initialize hash table */
45: extern HASHBLK *htinstall(); /* install hash table entry */
46: extern HASHBLK *htlookup(); /* find hash table entry */
47: extern void htrm(); /* remove hash table entry */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.