(C) 1998 AROS - The Amiga Research OS


NAME
#include <proto/iffparse.h>

LONG PopChunk (iff)

LOCATION
In IFFParseBase at offset 15

SYNOPSIS
struct IFFHandle * iff

FUNCTION
Pops a context node of the context stack. Usually called in write mode to signal the end of a chunk.

INPUTS
iff
pointer to IFFHandle struct.

RESULT
error - 0 if successfull, IFFERR_#? otherwise.

EXAMPLE

SEE ALSO
PushChunk()

NOTES

BUGS

INTERNALS
Frees a contextnode an all its related LCIs and removes it from the stack-list If we are in write mode, we will update the cn_Size in the chunk according t cn_Scan, and we will also insert an align byte if necessary

If the stream was of PushChunked() as IFFSIZE_UNKNOWN, we have to seek backwards and write the correct size. Since non RSEEK streams are automagically buffered by WriteStream, we don't have to fiddle with it here. However if the stream is buffered, we MUST see if we are about to pop the chunk that started the Buffering (in PushChunk)

HISTORY
20.10.1998 hkiel
Amiga Research OS
03.02.1997 digulla
Some major hacks because we don't have A6 - The IFFParseBase must be passed to the hooks in hook->h_Data.
03.02.1997 digulla
Iffparse.library as supplied by Nils H. Lorentzen