2 * Written by J.T. Conklin <jtc@netbsd.org>
5 * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $
6 * $FreeBSD: src/include/search.h,v 1.10 2002/10/16 14:29:23 robert Exp $
7 * $DragonFly: src/include/search.h,v 1.6 2008/05/19 10:05:18 corecode Exp $
13 #include <sys/cdefs.h>
14 #include <sys/types.h>
16 #ifndef _SIZE_T_DECLARED
17 typedef __size_t
size_t;
18 #define _SIZE_T_DECLARED
21 typedef struct entry
{
37 #ifdef _SEARCH_PRIVATE
40 struct node
*llink
, *rlink
;
44 struct que_elem
*next
;
45 struct que_elem
*prev
;
52 ENTRY
*hsearch(ENTRY
, ACTION
);
53 void insque(void *, void *);
54 void *lfind(const void *, const void *, size_t *, size_t,
55 int (*)(const void *, const void *));
56 void *lsearch(const void *, void *, size_t *, size_t,
57 int (*)(const void *, const void *));
59 void *tdelete(const void * __restrict
, void ** __restrict
,
60 int (*)(const void *, const void *));
61 void *tfind(const void *, void * const *,
62 int (*)(const void *, const void *));
63 void *tsearch(const void *, void **, int (*)(const void *, const void *));
64 void twalk(const void *, void (*)(const void *, VISIT
, int));
67 #endif /* !_SEARCH_H_ */