1*9508192eSchristos /* Id: dbm_map.h,v 1.1 2016/07/19 21:31:55 schwarze Exp */ 2*9508192eSchristos /* 3*9508192eSchristos * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> 4*9508192eSchristos * 5*9508192eSchristos * Permission to use, copy, modify, and distribute this software for any 6*9508192eSchristos * purpose with or without fee is hereby granted, provided that the above 7*9508192eSchristos * copyright notice and this permission notice appear in all copies. 8*9508192eSchristos * 9*9508192eSchristos * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10*9508192eSchristos * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*9508192eSchristos * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12*9508192eSchristos * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*9508192eSchristos * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*9508192eSchristos * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15*9508192eSchristos * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*9508192eSchristos * 17*9508192eSchristos * Private interface for low-level routines for the map-based version 18*9508192eSchristos * of the mandoc database, for read-only access. 19*9508192eSchristos * To be used by dbm*.c only. 20*9508192eSchristos */ 21*9508192eSchristos 22*9508192eSchristos struct dbm_match; 23*9508192eSchristos 24*9508192eSchristos int dbm_map(const char *); 25*9508192eSchristos void dbm_unmap(void); 26*9508192eSchristos void *dbm_get(int32_t); 27*9508192eSchristos int32_t *dbm_getint(int32_t); 28*9508192eSchristos int32_t dbm_addr(const void *); 29*9508192eSchristos int dbm_match(const struct dbm_match *, const char *); 30