3 #ifndef _BINHASH_H_INCLUDED_
4 #define _BINHASH_H_INCLUDED_
12 /* #include <binhash.h>
16 /* Structure of one hash table entry. */
18 typedef struct BINHASH_INFO
{
19 char *key
; /* lookup key */
20 int key_len
; /* key length */
21 char *value
; /* associated value */
22 struct BINHASH_INFO
*next
; /* colliding entry */
23 struct BINHASH_INFO
*prev
; /* colliding entry */
26 /* Structure of one hash table. */
28 typedef struct BINHASH
{
29 int size
; /* length of entries array */
30 int used
; /* number of entries in table */
31 BINHASH_INFO
**data
; /* entries array, auto-resized */
34 extern BINHASH
*binhash_create(int);
35 extern BINHASH_INFO
*binhash_enter(BINHASH
*, const char *, int, char *);
36 extern BINHASH_INFO
*binhash_locate(BINHASH
*, const char *, int);
37 extern char *binhash_find(BINHASH
*, const char *, int);
38 extern void binhash_delete(BINHASH
*, const char *, int, void (*) (char *));
39 extern void binhash_free(BINHASH
*, void (*) (char *));
40 extern void binhash_walk(BINHASH
*, void (*) (BINHASH_INFO
*, char *), char *);
41 extern BINHASH_INFO
**binhash_list(BINHASH
*);
46 /* The Secure Mailer license must be distributed with this software.
49 /* IBM T.J. Watson Research
51 /* Yorktown Heights, NY 10598, USA
53 /* Thu Feb 20 16:54:29 EST 1997