No empty .Rs/.Re
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / util / htable.h
blobd35331394c644f889fea8fbd0470411ddcfb876a
1 /* $NetBSD$ */
3 #ifndef _HTABLE_H_INCLUDED_
4 #define _HTABLE_H_INCLUDED_
6 /*++
7 /* NAME
8 /* htable 3h
9 /* SUMMARY
10 /* hash table manager
11 /* SYNOPSIS
12 /* #include <htable.h>
13 /* DESCRIPTION
14 /* .nf
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 */
23 } HTABLE_INFO;
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 */
31 } HTABLE;
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 *);
42 /* LICENSE
43 /* .ad
44 /* .fi
45 /* The Secure Mailer license must be distributed with this software.
46 /* AUTHOR(S)
47 /* Wietse Venema
48 /* IBM T.J. Watson Research
49 /* P.O. Box 704
50 /* Yorktown Heights, NY 10598, USA
51 /* CREATION DATE
52 /* Fri Feb 14 13:43:19 EST 1997
53 /* LAST MODIFICATION
54 /* %E% %U%
55 /* VERSION/RELEASE
56 /* %I%
57 /*--*/
59 #endif