Updated PCI IDs to latest snapshot.
[tangerine.git] / tools / dtdesc / c_iff / closeiff.c
blob0ce4b91a6ad22dbd13244aec955c68a6d27a0366
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 * closeiff.c - close the IFFHandle
16 #include "c_iff.h"
18 /****** c_iff/CloseIFF ******************************************************
20 * NAME
21 * CloseIFF -- Close an open IFF-file
23 * SYNOPSIS
24 * CloseIFF( TheHandle )
26 * void CloseIFF( struct IFFHandle * )
28 * FUNCTION
29 * Closes an IFF-file previously opened by OpenIFF() or NewIFF() .
31 * INPUTS
32 * TheHandle - IFFHandle to close
34 * RESULT
36 * EXAMPLE
38 * NOTES
40 * BUGS
42 * SEE ALSO
43 * OpenIFF() NewIFF()
45 *****************************************************************************
47 * Private notes:
50 void CloseIFF(struct IFFHandle *TheHandle)
52 if(TheHandle)
54 if(TheHandle->NewIFF)
56 while(TheHandle->LastNode)
58 EndChunk(TheHandle);
62 FixIFFSize(TheHandle);
64 if(TheHandle->TheFile)
66 fclose(TheHandle->TheFile);
69 free((void *) TheHandle);