xref: /titanic_41/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/extern.h (revision 54925bf60766fbb4f1f2d7c843721406a7b7a3fb)
1 /*
2  * Copyright 1997-2002 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #ifndef _KRB5_DB2_EXTERN_H
7 #define	_KRB5_DB2_EXTERN_H
8 
9 #pragma ident	"%Z%%M%	%I%	%E% SMI"
10 
11 #ifdef	__cplusplus
12 extern "C" {
13 #endif
14 
15 /*-
16  * Copyright (c) 1991, 1993, 1994
17  *	The Regents of the University of California.  All rights reserved.
18  *
19  * Redistribution and use in source and binary forms, with or without
20  * modification, are permitted provided that the following conditions
21  * are met:
22  * 1. Redistributions of source code must retain the above copyright
23  *    notice, this list of conditions and the following disclaimer.
24  * 2. Redistributions in binary form must reproduce the above copyright
25  *    notice, this list of conditions and the following disclaimer in the
26  *    documentation and/or other materials provided with the distribution.
27  * 3. All advertising materials mentioning features or use of this software
28  *    must display the following acknowledgement:
29  *	This product includes software developed by the University of
30  *	California, Berkeley and its contributors.
31  * 4. Neither the name of the University nor the names of its contributors
32  *    may be used to endorse or promote products derived from this software
33  *    without specific prior written permission.
34  *
35  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
36  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
38  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
39  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
40  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
41  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
42  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
43  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
44  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
45  * SUCH DAMAGE.
46  *
47  *	@(#)extern.h	8.8 (Berkeley) 11/7/95
48  */
49 
50 #define __add_bigpage		__kdb2_add_bigpage
51 #define __add_ovflpage		__kdb2_add_ovflpage
52 #define __addel			__kdb2_addel
53 #define __alloc_tmp		__kdb2_alloc_tmp
54 #define __big_delete		__kdb2_big_delete
55 #define __big_insert		__kdb2_big_insert
56 #define __big_keydata		__kdb2_big_keydata
57 #define __big_return		__kdb2_big_return
58 #define __call_hash		__kdb2_call_hash
59 #define __cursor_creat		__kdb2_cursor_creat
60 #define __delete_page		__kdb2_delete_page
61 #define __delpair		__kdb2_delpair
62 #define __expand_table		__kdb2_expand_table
63 #define __find_bigpair		__kdb2_find_bigpair
64 #define __free_ovflpage		__kdb2_free_ovflpage
65 #define __get_bigkey		__kdb2_get_bigkey
66 #define __get_buf		__kdb2_get_buf
67 #define __get_item		__kdb2_get_item
68 #define __get_item_done		__kdb2_get_item_done
69 #define __get_item_first	__kdb2_get_item_first
70 #define __get_item_next		__kdb2_get_item_next
71 #define __get_item_reset	__kdb2_get_item_reset
72 #define __get_page		__kdb2_get_page
73 #define __ibitmap		__kdb2_ibitmap
74 #define __log2			__kdb2_log2
75 #define __new_page		__kdb2_new_page
76 #define __pgin_routine		__kdb2_pgin_routine
77 #define __pgout_routine		__kdb2_pgout_routine
78 #define __put_buf		__kdb2_put_buf
79 #define __put_page		__kdb2_put_page
80 #define __reclaim_tmp		__kdb2_reclaim_tmp
81 #define __split_page		__kdb2_split_page
82 
83 PAGE16	 *__add_bigpage __P((HTAB *, PAGE16 *, indx_t, const u_int8_t));
84 PAGE16	 *__add_ovflpage __P((HTAB *, PAGE16 *));
85 int32_t	  __addel __P((HTAB *, ITEM_INFO *,
86 		const DBT *, const DBT *, u_int32_t, const u_int8_t));
87 u_int32_t __alloc_tmp __P((HTAB*));
88 int32_t	  __big_delete __P((HTAB *, PAGE16 *, indx_t));
89 int32_t	  __big_insert __P((HTAB *, PAGE16 *, const DBT *, const DBT *));
90 int32_t	  __big_keydata __P((HTAB *, PAGE16 *, DBT *, DBT *, int32_t));
91 int32_t	  __big_return __P((HTAB *, ITEM_INFO *, DBT *, int32_t));
92 u_int32_t __call_hash __P((HTAB *, int8_t *, int32_t));
93 CURSOR	 *__cursor_creat __P((const DB *));
94 int32_t	  __delete_page __P((HTAB *, PAGE16 *, int32_t));
95 int32_t	  __delpair __P((HTAB *, CURSOR *, ITEM_INFO *));
96 int32_t	  __expand_table __P((HTAB *));
97 int32_t	  __find_bigpair __P((HTAB *, CURSOR *, int8_t *, int32_t));
98 void	  __free_ovflpage __P((HTAB *, PAGE16 *));
99 int32_t	  __get_bigkey __P((HTAB *, PAGE16 *, indx_t, DBT *));
100 PAGE16	 *__get_buf __P((HTAB *, u_int32_t, int32_t));
101 u_int32_t __get_item __P((HTAB *, CURSOR *, DBT *, DBT *, ITEM_INFO *));
102 u_int32_t __get_item_done __P((HTAB *, CURSOR *));
103 u_int32_t __get_item_first __P((HTAB *, CURSOR *, DBT *, DBT *, ITEM_INFO *));
104 u_int32_t __get_item_next __P((HTAB *, CURSOR *, DBT *, DBT *, ITEM_INFO *));
105 u_int32_t __get_item_reset __P((HTAB *, CURSOR *));
106 PAGE16	 *__get_page __P((HTAB *, u_int32_t, int32_t));
107 int32_t	  __ibitmap __P((HTAB *, int32_t, int32_t, int32_t));
108 u_int32_t __log2 __P((u_int32_t));
109 int32_t	  __new_page __P((HTAB *, u_int32_t, int32_t));
110 void	  __pgin_routine __P((void *, db_pgno_t, void *));
111 void	  __pgout_routine __P((void *, db_pgno_t, void *));
112 u_int32_t __put_buf __P((HTAB *, PAGE16 *, u_int32_t));
113 int32_t	  __put_page __P((HTAB *, PAGE16 *, int32_t, int32_t));
114 void	  __reclaim_tmp __P((HTAB *));
115 int32_t	  __split_page __P((HTAB *, u_int32_t, u_int32_t));
116 
117 /* Default hash routine. */
118 extern u_int32_t (*__default_hash) __P((const void *, size_t));
119 
120 #ifdef HASH_STATISTICS
121 extern long hash_accesses, hash_bigpages, hash_collisions, hash_expansions;
122 extern long hash_overflow;
123 #endif
124 
125 #ifdef	__cplusplus
126 }
127 #endif
128 
129 #endif	/* !_KRB5_DB2_EXTERN_H */
130