3 #ifndef _HTABLE_H_INCLUDED_
4 #define _HTABLE_H_INCLUDED_
12 /* #include <htable.h>
16 /* Structure of one hash table entry. */
18 typedef struct HTABLE_INFO
{
19 char *key
; /* lookup key */
20 char *value
; /* associated value */
21 struct HTABLE_INFO
*next
; /* colliding entry */
22 struct HTABLE_INFO
*prev
; /* colliding entry */
25 /* Structure of one hash table. */
27 typedef struct HTABLE
{
28 int size
; /* length of entries array */
29 int used
; /* number of entries in table */
30 HTABLE_INFO
**data
; /* entries array, auto-resized */
33 extern HTABLE
*htable_create(int);
34 extern HTABLE_INFO
*htable_enter(HTABLE
*, const char *, char *);
35 extern HTABLE_INFO
*htable_locate(HTABLE
*, const char *);
36 extern char *htable_find(HTABLE
*, const char *);
37 extern void htable_delete(HTABLE
*, const char *, void (*) (char *));
38 extern void htable_free(HTABLE
*, void (*) (char *));
39 extern void htable_walk(HTABLE
*, void (*) (HTABLE_INFO
*, char *), char *);
40 extern HTABLE_INFO
**htable_list(HTABLE
*);
45 /* The Secure Mailer license must be distributed with this software.
48 /* IBM T.J. Watson Research
50 /* Yorktown Heights, NY 10598, USA
52 /* Fri Feb 14 13:43:19 EST 1997