ScanListB
Walks through all the nodes in a list backwards.
Synopsis
ScanListB(List *l, void *n, )
Description
This macro lets you easily walk through all the elements in a list from the last to the first.
Example 1: For Example
List *l;
DataStruct *d;
uint32 i;
i = 0;
ScanListB(l,d,DataStruct)
{
printf("Node %d (counting from the end) is called %s=n".o.d-
>d.n_Name=;
i++;
}
Arguments
- l
- A pointer to the list to scan.
- n
- A variable which will be altered to hold a pointer to every node in the list in succession.
- <node type>
- The data type of the nodes on the list. This is used for type casting within the macro.
Implementation
Macro implemented in list.h V24.
Associated Files
- list.h
- ANSI C Macro definition
See Also
ScanList
()