xref: /openbsd-src/lib/libc/db/btree/extern.h (revision bb64080b0f4926cfaad11f8655a5a0ff1c21e50f)
1*bb64080bSguenther /*	$OpenBSD: extern.h,v 1.8 2015/08/27 04:37:09 guenther Exp $	*/
21b727fc6Smillert 
3df930be7Sderaadt /*-
4bec2d00aSderaadt  * Copyright (c) 1991, 1993, 1994
5df930be7Sderaadt  *	The Regents of the University of California.  All rights reserved.
6df930be7Sderaadt  *
7df930be7Sderaadt  * Redistribution and use in source and binary forms, with or without
8df930be7Sderaadt  * modification, are permitted provided that the following conditions
9df930be7Sderaadt  * are met:
10df930be7Sderaadt  * 1. Redistributions of source code must retain the above copyright
11df930be7Sderaadt  *    notice, this list of conditions and the following disclaimer.
12df930be7Sderaadt  * 2. Redistributions in binary form must reproduce the above copyright
13df930be7Sderaadt  *    notice, this list of conditions and the following disclaimer in the
14df930be7Sderaadt  *    documentation and/or other materials provided with the distribution.
156580fee3Smillert  * 3. Neither the name of the University nor the names of its contributors
16df930be7Sderaadt  *    may be used to endorse or promote products derived from this software
17df930be7Sderaadt  *    without specific prior written permission.
18df930be7Sderaadt  *
19df930be7Sderaadt  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20df930be7Sderaadt  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21df930be7Sderaadt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22df930be7Sderaadt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23df930be7Sderaadt  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24df930be7Sderaadt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25df930be7Sderaadt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26df930be7Sderaadt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27df930be7Sderaadt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28df930be7Sderaadt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29df930be7Sderaadt  * SUCH DAMAGE.
30df930be7Sderaadt  *
311b727fc6Smillert  *	@(#)extern.h	8.10 (Berkeley) 7/20/94
32df930be7Sderaadt  */
33df930be7Sderaadt 
34*bb64080bSguenther __BEGIN_HIDDEN_DECLS
35c72b5b24Smillert int	 __bt_close(DB *);
36c72b5b24Smillert int	 __bt_cmp(BTREE *, const DBT *, EPG *);
37c72b5b24Smillert int	 __bt_defcmp(const DBT *, const DBT *);
38c72b5b24Smillert size_t	 __bt_defpfx(const DBT *, const DBT *);
39c72b5b24Smillert int	 __bt_delete(const DB *, const DBT *, u_int);
40c72b5b24Smillert int	 __bt_dleaf(BTREE *, const DBT *, PAGE *, u_int);
41c72b5b24Smillert int	 __bt_fd(const DB *);
42c72b5b24Smillert int	 __bt_free(BTREE *, PAGE *);
43c72b5b24Smillert int	 __bt_get(const DB *, const DBT *, DBT *, u_int);
44c72b5b24Smillert PAGE	*__bt_new(BTREE *, pgno_t *);
45c72b5b24Smillert void	 __bt_pgin(void *, pgno_t, void *);
46c72b5b24Smillert void	 __bt_pgout(void *, pgno_t, void *);
47c72b5b24Smillert int	 __bt_put(const DB *dbp, DBT *, const DBT *, u_int);
48c72b5b24Smillert int	 __bt_ret(BTREE *, EPG *, DBT *, DBT *, DBT *, DBT *, int);
49c72b5b24Smillert EPG	*__bt_search(BTREE *, const DBT *, int *);
50c72b5b24Smillert int	 __bt_seq(const DB *, DBT *, DBT *, u_int);
51c72b5b24Smillert void	 __bt_setcur(BTREE *, pgno_t, u_int);
52f3c3a9c6Smillert int	 __bt_split(BTREE *, PAGE *,
53f3c3a9c6Smillert 	    const DBT *, const DBT *, int, size_t, u_int32_t);
54c72b5b24Smillert int	 __bt_sync(const DB *, u_int);
55df930be7Sderaadt 
56c72b5b24Smillert int	 __ovfl_delete(BTREE *, void *);
57c72b5b24Smillert int	 __ovfl_get(BTREE *, void *, size_t *, void **, size_t *);
58c72b5b24Smillert int	 __ovfl_put(BTREE *, const DBT *, pgno_t *);
59df930be7Sderaadt 
60df930be7Sderaadt #ifdef DEBUG
61c72b5b24Smillert void	 __bt_dnpage(DB *, pgno_t);
62c72b5b24Smillert void	 __bt_dpage(PAGE *);
63c72b5b24Smillert void	 __bt_dump(DB *);
64df930be7Sderaadt #endif
65df930be7Sderaadt #ifdef STATISTICS
66c72b5b24Smillert void	 __bt_stat(DB *);
67df930be7Sderaadt #endif
68*bb64080bSguenther __END_HIDDEN_DECLS
69