Gets the previous node in a list.
Node *PrevNode( const Node *node )
This macro returns a pointer to the previous node in a list. If the current node is the first node in the list, the result is a pointer to the head (beginning-of-list) anchor. To determine whether the return value is an actual node rather than the head anchor, use the IsNodeB()
procedure.
Example 1: Use of PrevNode in reverse list traversal
for (n = LastNode( l ); IsNodeB( l, n ); n = PrevNode( n )) { . . . };
The macro returns a pointer to the previous node in the list or, if the current node is the first node in the list, to the head (beginning-of-list) anchor.
Macro implemented in list.h V20.
FirstNode
(), IsListEmpty(), IsNode(), IsNodeB(), LastNode(), ScanList()