Gets the last node in a list.
Node *LastNode( const List *l )
This macro returns a pointer to the last node in a list. If the list is empty, the macro returns a pointer to the head (beginning-of-list) anchor. To determine if the return value is an actual node rather than the head anchor, call the IsNodeB()
procedure.
Example 1: Example 15-3 Use of LastNode in reverse list traversal
for (n = LastNode(list); IsNodeB(list, n); n = PrevNode( n )) { . . . };
The macro returns a pointer to last node in the list or, if the list is empty, a pointer to the head (beginning-of-list) anchor.
Macro implemented in list.h V20.