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