2 * Written by J.T. Conklin <jtc@NetBSD.org>
5 * $NetBSD: search.h,v 1.16 2005/02/03 04:39:32 perry Exp $
11 #include <sys/cdefs.h>
12 #include <sys/_types.h>
14 #ifndef _SIZE_T_DECLARED
15 typedef __size_t size_t;
16 #define _SIZE_T_DECLARED
19 typedef struct entry {
35 #ifdef _SEARCH_PRIVATE
36 typedef struct __posix_tnode {
38 struct __posix_tnode *llink, *rlink;
43 struct que_elem *next;
44 struct que_elem *prev;
47 typedef void posix_tnode;
52 struct __hsearch *__hsearch;
59 ENTRY *hsearch(ENTRY, ACTION);
60 void insque(void *, void *);
61 void *lfind(const void *, const void *, size_t *, size_t,
62 int (*)(const void *, const void *));
63 void *lsearch(const void *, void *, size_t *, size_t,
64 int (*)(const void *, const void *));
66 void *tdelete(const void * __restrict, posix_tnode ** __restrict,
67 int (*)(const void *, const void *));
69 tfind(const void *, posix_tnode * const *,
70 int (*)(const void *, const void *));
72 tsearch(const void *, posix_tnode **,
73 int (*)(const void *, const void *));
74 void twalk(const posix_tnode *, void (*)(const posix_tnode *, VISIT, int));
77 int hcreate_r(size_t, struct hsearch_data *);
78 void hdestroy_r(struct hsearch_data *);
79 int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
84 #endif /* !_SEARCH_H_ */