We port registry by importing the (public domain) openbsd implementation of the tfind/tsearch POSIX binary tree search functions. These are only necessary when building on non-posix platforms
15 lines
451 B
C
15 lines
451 B
C
#if defined(_MSC_VER)
|
|
/* find or insert datum into search tree */
|
|
void *tsearch(const void *vkey, void **vrootp,
|
|
int (*compar)(const void *, const void *));
|
|
|
|
/* delete node with given key */
|
|
void * tdelete(const void *vkey, void **vrootp,
|
|
int (*compar)(const void *, const void *));
|
|
|
|
/* Walk the nodes of a tree */
|
|
void twalk(const void *vroot, void (*action)(const void *, VISIT, int));
|
|
|
|
#else
|
|
#include <search.h>
|
|
#endif
|