2 * c_iff - a portable IFF-parser
4 * Copyright (C) 2000, 2001 Joerg Dietrich
6 * This is the AROS-version of c_iff.
7 * It is distributed under the AROS Public License.
8 * But I reserve the right to distribute
9 * my own version under other licenses.
13 * writechunkdata.c - write data to the actual chunk
18 /****** c_iff/WriteChunkData ************************************************
21 * WriteChunkData -- Write some data to the current chunk
24 * Size = WriteChunkData( TheHandle,Buffer,Size )
26 * long WriteChunkData( struct IFFHandle *,char *,size_t )
29 * Writes Buffer into the current chunk.
32 * TheHandle - IFFHandle to write to
33 * Buffer - the buffer containing the data
34 * Size - number of bytes to be written
37 * Size - number of bytes written to the IFF-file
48 *****************************************************************************
53 long WriteChunkData(struct IFFHandle
*TheHandle
,
58 struct ChunkNode
*CN
, *PN
;
60 if(!(TheHandle
&& Buffer
))
65 Ret
=fwrite(Buffer
, 1, Size
, TheHandle
->TheFile
);
69 CN
=TheHandle
->LastNode
;
82 TheHandle
->IFFSize
+=Ret
;