|
| iMatix home page | << | < | > | >> |
SFLVersion 2.10 |
#include "sfltree.h" void *tree_find_le (TREE **root, void *tree, TREE_COMPARE *comp)
Finds node with data less than or equal to that provided.
{
TREE
*current = *root,
*found;
found = NULL;
while (current != TREE_NULL)
switch ((comp) (current, tree))
{
case 1 : current = current-> left; break;
default: found = current;
current = current-> right;
}
return found;
}
| | << | < | > | >> |
|