Changed expected test result: we expect a text file without a custom icon
[AROS.git] / tools / dtdesc / c_iff / skipchunkdata.c
blobccf4cab8caad889c6a5a4095cf9329eeb5b8569f
1 /*
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 * skipchunkdata.c - skip the data of the actual chunk
16 #include "c_iff.h"
18 /****** c_iff/SkipChunkData *************************************************
20 * NAME
21 * SkipChunkData -- Skip the entire current chunk
23 * SYNOPSIS
24 * Success = SkipChunkData( TheHandle )
26 * int SkipChunkData( struct IFFHandle * )
28 * FUNCTION
29 * Skips the entire current chunk.
30 * You can continue to ReadChunkHeader() the next chunk.
32 * INPUTS
33 * TheHandle - IFFHandle to skip
35 * RESULT
36 * Success - TRUE when successfully skiped to the end of the chunk
37 * otherwise FALSE
39 * EXAMPLE
41 * NOTES
42 * To skip a chunk you have to start this chunk with
43 * ReadChunkHeader() .
45 * BUGS
47 * SEE ALSO
48 * ReadChunkHeader() ReadChunkData()
50 *****************************************************************************
52 * Private notes:
55 int SkipChunkData(struct IFFHandle *TheHandle)
57 if(!TheHandle)
59 return(FALSE);
62 if(!TheHandle->BytesLeftInChunk)
64 return(TRUE);
67 if(fseek(TheHandle->TheFile, TheHandle->BytesLeftInChunk, SEEK_CUR))
69 return(FALSE);
72 TheHandle->ChunkID=INVALID_ID;
73 TheHandle->BytesLeftInChunk=0;
75 return(TRUE);