| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.10

 

tree_find_gt

#include "sfltree.h"
void *tree_find_gt (TREE **root, void *tree, TREE_COMPARE *comp)

Synopsis

Finds node with data greater than that provided.

Source Code - (sfltree.c)

{
    TREE
       *current = *root,
       *found;

    found = NULL;
    while (current != TREE_NULL)
        switch ((comp) (current, tree))
          {
            case 1 : found = current;
                     current = current-> left; break;
            default: current = current-> right;
          }

    return found;
}

| << | < | > | >> iMatix Copyright © 1996-99 iMatix Corporation