Sync usage with man page.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / mkmap.h
blob17d462621fbd5e107f4789dae5bb65957b8bd3a9
1 /* $NetBSD$ */
3 #ifndef _MKMAP_H_INCLUDED_
4 #define _MKMAP_H_INCLUDED_
6 /*++
7 /* NAME
8 /* mkmap 3h
9 /* SUMMARY
10 /* create or rewrite Postfix database
11 /* SYNOPSIS
12 /* #include <mkmap.h>
13 /* DESCRIPTION
14 /* .nf
17 * Utility library.
19 #include <dict.h>
22 * A database handle is an opaque structure. The user is not supposed to
23 * know its implementation. We try to open and lock a file before DB/DBM
24 * initialization. However, if the file does not exist then we may have to
25 * acquire the lock after the DB/DBM initialization.
27 typedef struct MKMAP {
28 struct DICT *(*open) (const char *, int, int); /* dict_xx_open() */
29 struct DICT *dict; /* dict_xx_open() result */
30 void (*after_open) (struct MKMAP *); /* may be null */
31 void (*after_close) (struct MKMAP *); /* may be null */
32 } MKMAP;
34 extern MKMAP *mkmap_open(const char *, const char *, int, int);
35 extern void mkmap_append(MKMAP *, const char *, const char *);
36 extern void mkmap_close(MKMAP *);
38 #define mkmap_append(map, key, val) dict_put((map)->dict, (key), (val))
40 extern MKMAP *mkmap_dbm_open(const char *);
41 extern MKMAP *mkmap_cdb_open(const char *);
42 extern MKMAP *mkmap_hash_open(const char *);
43 extern MKMAP *mkmap_btree_open(const char *);
44 extern MKMAP *mkmap_sdbm_open(const char *);
45 extern MKMAP *mkmap_proxy_open(const char *);
47 /* LICENSE
48 /* .ad
49 /* .fi
50 /* The Secure Mailer license must be distributed with this software.
51 /* AUTHOR(S)
52 /* Wietse Venema
53 /* IBM T.J. Watson Research
54 /* P.O. Box 704
55 /* Yorktown Heights, NY 10598, USA
56 /*--*/
58 #endif