[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


   NAME
        WriteChunkBytes -- write data from a buffer into the current chunk.
                           (V36)

   SYNOPSIS
        error = WriteChunkBytes(iff, buf, numBytes);
        D0                      A0   A1   D0

        long writechunkbytes(struct iffhandle *, aptr, long);

   FUNCTION
        Writes "numBytes" bytes from the specified buffer into the current
        chunk. If the current chunk was pushed with IFFSIZE_UNKNOWN, the size
        of the chunk gets increased by the size of the buffer written. If
        the size was specified for this chunk, attempts to write past the end
        of the chunk will be truncated.

   INPUTS
        iff - pointer to iffhandle structure.
        buf - pointer to buffer area with bytes to be written.
        numBytes - number of bytes to write.

   RESULT
        error - (positive) number of bytes written if successful or a
                (negative) IFFERR_#? error code if unsuccessful.

   SEE ALSO
        pushchunk(), popchunk(), writechunkrecords(), <libraries/iffparse.h>