1 /*
2  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #ifndef _KRB5_DB2_SEARCH_H
7 #define	_KRB5_DB2_SEARCH_H
8 
9 #ifdef	__cplusplus
10 extern "C" {
11 #endif
12 
13 /*-
14  * Copyright (c) 1990, 1993
15  *	The Regents of the University of California.  All rights reserved.
16  *
17  * This code is derived from software contributed to Berkeley by
18  * Margo Seltzer.
19  *
20  * Redistribution and use in source and binary forms, with or without
21  * modification, are permitted provided that the following conditions
22  * are met:
23  * 1. Redistributions of source code must retain the above copyright
24  *    notice, this list of conditions and the following disclaimer.
25  * 2. Redistributions in binary form must reproduce the above copyright
26  *    notice, this list of conditions and the following disclaimer in the
27  *    documentation and/or other materials provided with the distribution.
28  * 3. All advertising materials mentioning features or use of this software
29  *    must display the following acknowledgement:
30  *	This product includes software developed by the University of
31  *	California, Berkeley and its contributors.
32  * 4. Neither the name of the University nor the names of its contributors
33  *    may be used to endorse or promote products derived from this software
34  *    without specific prior written permission.
35  *
36  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
37  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
39  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
40  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
41  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
42  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
43  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
44  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
45  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46  * SUCH DAMAGE.
47  *
48  *	@(#)search.h	8.1 (Berkeley) 6/4/93
49  */
50 
51 /* Backward compatibility to hsearch interface. */
52 typedef struct entry {
53 	char *key;
54 	char *data;
55 } ENTRY;
56 
57 typedef enum {
58 	FIND, ENTER
59 } ACTION;
60 
61 #define hcreate		kdb2_hcreate
62 #define hdestroy	kdb2_hdestroy
63 #define hsearch		kdb2_hsearch
64 
65 int	 hcreate __P((unsigned int));
66 void	 hdestroy __P((void));
67 ENTRY	*hsearch __P((ENTRY, ACTION));
68 
69 #ifdef	__cplusplus
70 }
71 #endif
72 
73 #endif	/* !_KRB5_DB2_SEARCH_H */
74