Docs » Autodocs » exec.library » AVL_FindNextNodeByAddress
AVL_FindNextNodeByAddress -- Return the next node of a tree (V45)
result = AVL_FindNextNodeByAddress( node ) D0 A0 struct AVLNode *AVL_FindNextNodeByAddress(const struct AVLNode *node)
Given the pointer to a struct AVLNode, this function will return the logically next/higher/bigger entry in the tree Using this function, you can start to walk the tree in a "linear" fashion.
node - pointer to the current AVLNode
A pointer to the logically next AVLNode or NULL if there is none.
The node passed in *better*be* part of the tree or you lose big time!
avlnode = AVL_FindFirstNode(avlroot); while(avlnode) { nextavlnode = AVL_FindNextNodeByAddress(avlnode); /* look at, or remove avlnode */ /* walk the tree */ avlnode = nextavlnode; } /* while */
AVL_FindFirstNode(), AVL_RemNodeByAddress()
|