00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _SEARCH_H_
00010 #define _SEARCH_H_
00011
00012 #include <sys/cdefs.h>
00013 #include <sys/types.h>
00014
00015 typedef enum {
00016 preorder,
00017 postorder,
00018 endorder,
00019 leaf
00020 } VISIT;
00021
00022 #ifdef _SEARCH_PRIVATE
00023 typedef struct node {
00024 char *key;
00025 struct node *llink, *rlink;
00026 } node_t;
00027 #endif
00028
00029 __BEGIN_DECLS
00030 void *tdelete(const void * __restrict, void ** __restrict,
00031 int (*)(const void *, const void *));
00032 void *tfind(const void *, void * const *,
00033 int (*)(const void *, const void *));
00034 void *tsearch(const void *, void **, int (*)(const void *, const void *));
00035 void twalk(const void *, void (*)(const void *, VISIT, int));
00036 void tdestroy(void *, void (*)(void *));
00037 __END_DECLS
00038
00039 #endif