Site Tools


documentation:development:opera:pf25:ppgfldr:pgsfldr:spr:01spr118

ScanList

Walks through all the nodes in a list.

Synopsis

ScanList ( const List *1, void *n, <node type>)

Description

This macro lets you easily walk through all the elements in a list from the first to the last.

Example 1: For Example

List       *l;
DataStruct *d;
uint32      i;
 
i = 0;
ScanList(l,d,DataStruct)
{
    printf("Node %d is called %s\n",i,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 V22.

Associated Files

  • list.h ANSI C Macro definition

See Also

ScanListB()


documentation/development/opera/pf25/ppgfldr/pgsfldr/spr/01spr118.txt · Last modified: 2022/10/10 16:53 by 127.0.0.1