2 * Written by J.T. Conklin <jtc@NetBSD.org>
5 * $NetBSD: search.h,v 1.16 2005/02/03 04:39:32 perry Exp $
12 #include <sys/cdefs.h>
13 #include <sys/_types.h>
15 #ifndef _SIZE_T_DECLARED
16 typedef __size_t size_t;
17 #define _SIZE_T_DECLARED
20 typedef struct entry {
36 #ifdef _SEARCH_PRIVATE
37 typedef struct __posix_tnode {
39 struct __posix_tnode *llink, *rlink;
44 struct que_elem *next;
45 struct que_elem *prev;
48 typedef void posix_tnode;
53 struct __hsearch *__hsearch;
60 ENTRY *hsearch(ENTRY, ACTION);
61 void insque(void *, void *);
62 void *lfind(const void *, const void *, size_t *, size_t,
63 int (*)(const void *, const void *));
64 void *lsearch(const void *, void *, size_t *, size_t,
65 int (*)(const void *, const void *));
67 void *tdelete(const void * __restrict, posix_tnode ** __restrict,
68 int (*)(const void *, const void *));
70 tfind(const void *, posix_tnode * const *,
71 int (*)(const void *, const void *));
73 tsearch(const void *, posix_tnode **,
74 int (*)(const void *, const void *));
75 void twalk(const posix_tnode *, void (*)(const posix_tnode *, VISIT, int));
78 int hcreate_r(size_t, struct hsearch_data *);
79 void hdestroy_r(struct hsearch_data *);
80 int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
85 #endif /* !_SEARCH_H_ */