NAME
    OpenIFF -- Prepare an iffhandle to read or write a new iff stream.
SYNOPSIS
    error = OpenIFF (iff, rwmode)
     d0              a0     d0
    LONG             error;
    struct iffhandle *iff;
    LONG             rwmode;
FUNCTION
    Initializes an iffhandle struct for a new read or write.  the
    direction of the I/O is given by the value of rwmode, which can be
    either IFFF_READ or IFFF_WRITE.
    As part of its initialization procedure, OpenIFF() calls the client-
    supplied stream hook vector.  The iffstreamcmd packet will contain
    the following:
            sc_Command:     IFFCMD_INIT
            sc_Buf:         (Not applicable)
            sc_NBytes:      (Not applicable)
    This operation is permitted to fail.  DO NOT write to this structure.
INPUTS
    iff     - pointer to iffhandle struct.
    rwmode  - IFFF_READ or IFFF_WRITE
RESULT
    error   - contains an error code or 0 if successful.
EXAMPLE
NOTES
BUGS
SEE ALSO
    closeiff(), initiff()