13.5.2 Starting at the Last Node [ToC] [Index]     [Skip Back] [Skip Fwd]     [Prev] [Up] [Next]

This is the same as starting from the least item, except that we descend to the right.

506. <PBST traverser last initializer 506> =
void *
pbst_t_last (struct pbst_traverser *trav, struct pbst_table *tree)
{ assert (tree != NULL && trav != NULL); trav->pbst_table = tree; trav->pbst_node = tree->pbst_root; if (trav->pbst_node != NULL)
    { while (trav->pbst_node->pbst_link[1] != NULL) trav->pbst_node = trav->pbst_node->pbst_link[1]; return trav->pbst_node->pbst_data; } else
    return NULL; }

This code is included in 504 and 548.