version 1.6, 2011/05/18 19:36:36 |
version 1.7, 2012/06/25 22:32:45 |
Line 21 __RCSID("$NetBSD$"); |
|
Line 21 __RCSID("$NetBSD$"); |
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <search.h> |
#include <search.h> |
|
|
/* find a node, or return 0 */ |
/* find a node by key "vkey" in tree "vrootp", or return 0 */ |
void * |
void * |
tfind(vkey, vrootp, compar) |
tfind(const void *vkey, void * const *vrootp, |
const void *vkey; /* key to be found */ |
int (*compar)(const void *, const void *)) |
void * const *vrootp; /* address of the tree root */ |
|
int (*compar)(const void *, const void *); |
|
{ |
{ |
node_t * const *rootp = (node_t * const*)vrootp; |
node_t * const *rootp = (node_t * const*)vrootp; |
|
|