New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / workbench / libs / iffparse / freeiff.c
blob329c2b6e8adb626dc21e10ea44d5b744b8309420
1 /*
2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "iffparse_intern.h"
8 /*****************************************************************************
10 NAME */
11 #include <proto/iffparse.h>
13 AROS_LH1(void, FreeIFF,
15 /* SYNOPSIS */
16 AROS_LHA(struct IFFHandle *, iff, A0),
18 /* LOCATION */
19 struct Library *, IFFParseBase, 9, IFFParse)
21 /* FUNCTION
22 Frees an IFFHandle struct previously allocated by AllocIFF.
24 INPUTS
25 iff - pointer to an IFFHandle struct.
26 RESULT
28 NOTES
30 EXAMPLE
32 BUGS
34 SEE ALSO
35 AllocIFF(), CloseIFF()
37 INTERNALS
39 *****************************************************************************/
41 AROS_LIBFUNC_INIT
42 AROS_LIBBASE_EXT_DECL(struct Library *,IFFParseBase)
43 struct IntContextNode * cn;
44 struct LocalContextItem * node,
45 * nextnode;
47 if (iff != NULL)
50 We should free the LCIs of the default context-node
51 ( CollectionItems and such )
53 cn = (struct IntContextNode*)RootChunk (iff);
55 node = (struct LocalContextItem*)cn->cn_LCIList.mlh_Head;
57 while ((nextnode = (struct LocalContextItem*)node->lci_Node.mln_Succ))
59 PurgeLCI (node, IPB(IFFParseBase));
61 node = nextnode;
64 FreeMem (iff, sizeof (struct IntIFFHandle));
67 AROS_LIBFUNC_EXIT
68 } /* FreeIFF */