[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

This mode causes the parser to progress through the stream step by step,
rather than in the automated fashion provided by iffparse_scan.  in this
mode, parseiff() will return upon every entry to and departure from a
context.

When the parser enters a context, parseiff() will return zero.
currentchunk() will report the type and id of the chunk just entered, and
the stream will be positioned to read the first byte in the chunk.  When
entering a form, list, cat or prop chunk, the longword containing the type
(e.g., ilbm, ftxt, etc.) is read by the parser.  in this case, the stream
will be positioned to read the byte immediately following the type.)

When the parser leaves a context, parseiff() will return the value
IFFERR_EOC.  This is not strictly an error, but an indication that you are
about to leave the current context.  currentchunk() will report the type
and ID of the chunk you are about to leave.  The stream is not positioned
predictably within the chunk.

The parser does not call any installed chunk handlers when using this mode
(e.g., property chunks declared with propchunk() will not be collected).

See the example program, sift.c, for a demonstration of iffparse_rawstep.