(C) 1998 AROS - The Amiga Research OS


NAME
#include <proto/iffparse.h>

LONG ParseIFF (iff , mode)

LOCATION
In IFFParseBase at offset 7

SYNOPSIS
struct IFFHandle * iff
LONG mode

FUNCTION
This function is the parser itself. It has three control modes. IFFPARSE_SCAN - the parser will go through the file invoking entry and exit handlers on its way. When it returns it might be for 3 different reasons:

- It invoked a Stop entry/exit handler ( Installed by StopChunk[s] or StopOnExit )

- An error occured. (return value will be negative.)

- The parser reached EOF and returns IFFERR_EOF.

IFFPARSE_STEP - The parser steps through the file, returning to the user each time it enters (returns NULL) and each time it exits (return (IFFERR_EOC) a chunk. It will also invoke entry/exit - handlers.

IFFPARSE_RAWSTEP - same as IFFPARSE_STEP except that in this mode the parse won't invoke any handlers.

INPUTS
iff
pointer to IFFHandle struct.
mode
IFFPARSE_SCAN, IFFPARSE_STEP or IFFPARSE_RAWSTEP.

RESULT
0 if successfull or IFFERR_#?

EXAMPLE

SEE ALSO
PushChunk(), PopChunk(), EntryHandler(), ExitHandler(), PropChunk[s](), CollectionChunk[s](), StopChunk[s](), StopOnExit()

NOTES

BUGS

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
12.02.1998 turrican
Fix uninitialized variable warnings
13.02.1997 digulla
Bugfix. Loads IFF pictures now.

Added lots of debug output

03.02.1997 digulla
Iffparse.library as supplied by Nils H. Lorentzen