xref: /netbsd-src/external/ibm-public/postfix/dist/src/util/dict_db.h (revision c48c605c14fd8622b523d1d6a3f0c0bad133ea89)
1 /*	$NetBSD: dict_db.h,v 1.4 2023/12/23 20:30:46 christos Exp $	*/
2 
3 #ifndef _DICT_DB_H_INCLUDED_
4 #define _DICT_DB_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	dict_db 3h
9 /* SUMMARY
10 /*	dictionary manager interface to DB files
11 /* SYNOPSIS
12 /*	#include <dict_db.h>
13 /* DESCRIPTION
14 /* .nf
15 
16  /*
17   * Utility library.
18   */
19 #include <dict.h>
20 #include <mkmap.h>
21 
22  /*
23   * External interface.
24   */
25 #define DICT_TYPE_HASH	"hash"
26 #define DICT_TYPE_BTREE	"btree"
27 
28 extern DICT *dict_hash_open(const char *, int, int);
29 extern DICT *dict_btree_open(const char *, int, int);
30 extern MKMAP *mkmap_hash_open(const char *);
31 extern MKMAP *mkmap_btree_open(const char *);
32 
33  /*
34   * XXX Should be part of the DICT interface.
35   *
36   * You can override the default dict_db_cache_size setting before calling
37   * dict_hash_open() or dict_btree_open(). This is done in mkmap_db_open() to
38   * set a larger memory pool for database (re)builds.
39   */
40 extern int dict_db_cache_size;
41 
42 #define DEFINE_DICT_DB_CACHE_SIZE int dict_db_cache_size = (128 * 1024)
43 
44 /* LICENSE
45 /* .ad
46 /* .fi
47 /*	The Secure Mailer license must be distributed with this software.
48 /* AUTHOR(S)
49 /*	Wietse Venema
50 /*	IBM T.J. Watson Research
51 /*	P.O. Box 704
52 /*	Yorktown Heights, NY 10598, USA
53 /*
54 /*	Wietse Venema
55 /*	Google, Inc.
56 /*	111 8th Avenue
57 /*	New York, NY 10011, USA
58 /*--*/
59 
60 #endif
61