]>
git.cameronkatri.com Git - mandoc.git/blob - dbm.h
1 /* $Id: dbm.h,v 1.1 2016/07/19 21:31:55 schwarze Exp $ */
3 * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 * Public interface for the map-based version
18 * of the mandoc database, for read-only access.
19 * To be used by dbm*.c, dba_read.c, and man(1) and apropos(1).
53 int dbm_open(const char *);
56 int32_t dbm_page_count(void);
57 struct dbm_page
*dbm_page_get(int32_t);
58 void dbm_page_byname(const struct dbm_match
*);
59 void dbm_page_bysect(const struct dbm_match
*);
60 void dbm_page_byarch(const struct dbm_match
*);
61 void dbm_page_bydesc(const struct dbm_match
*);
62 void dbm_page_bymacro(int32_t, const struct dbm_match
*);
63 struct dbm_res
dbm_page_next(void);
65 int32_t dbm_macro_count(int32_t);
66 struct dbm_macro
*dbm_macro_get(int32_t, int32_t);
67 void dbm_macro_bypage(int32_t, int32_t);
68 char *dbm_macro_next(void);