1 /* $NetBSD: search.h,v 1.18 2005/07/06 15:47:15 drochner Exp $ */
4 * Written by J.T. Conklin <jtc@NetBSD.org>
11 #include <sys/cdefs.h>
12 #include <machine/ansi.h>
15 typedef _BSD_SIZE_T_
size_t;
19 typedef struct entry
{
35 #ifdef _SEARCH_PRIVATE
38 struct node
*llink
, *rlink
;
43 #ifndef __BSEARCH_DECLARED
44 #define __BSEARCH_DECLARED
45 /* also in stdlib.h */
46 void *bsearch(const void *, const void *, size_t, size_t,
47 int (*)(const void *, const void *));
48 #endif /* __BSEARCH_DECLARED */
51 ENTRY
*hsearch(ENTRY
, ACTION
);
53 void *lfind(const void *, const void *, size_t *, size_t,
54 int (*)(const void *, const void *));
55 void *lsearch(const void *, void *, size_t *, size_t,
56 int (*)(const void *, const void *));
57 void insque(void *, void *);
60 void *tdelete(const void * __restrict
, void ** __restrict
,
61 int (*)(const void *, const void *));
62 void *tfind(const void *, void * const *,
63 int (*)(const void *, const void *));
64 void *tsearch(const void *, void **,
65 int (*)(const void *, const void *));
66 void twalk(const void *, void (*)(const void *, VISIT
, int));
69 #endif /* !_SEARCH_H_ */