Lines Matching refs:tree
34 /* avl.c: Routines for manipulation an avl tree.
40 * / * The balanced binary tree fields. * /
42 * short balance; / * For the balanced tree. * /
43 * struct id_rec *left, *right; / * Tree pointers. * /
64 /* find_id returns a pointer to node in TREE that has the correct
65 ID. If there is no node in TREE with ID, NULL is returned. */
68 find_id (id_rec *tree, char *id)
72 /* Check for an empty tree. */
73 if (tree == NULL)
76 /* Recursively search the tree. */
77 cmp_result = strcmp (id, tree->id);
79 return tree; /* This is the item. */
81 return find_id (tree->left, id);
83 return find_id (tree->right, id);
87 /* insert_id inserts a NEW_ID rec into the tree whose ROOT is
88 provided. insert_id returns TRUE if the tree height from
90 recursive balanced binary tree insertion algorithm. */
215 /* If we fall through to here, the tree did not grow in height. */