Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / muiscreen / closepubfile.c
blob16093d0372b1518e687a715d2add784b3286bf71
1 /*
2 Copyright © 2009, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <libraries/muiscreen.h>
7 #include <proto/dos.h>
8 #include <proto/iffparse.h>
9 #define DEBUG 1
10 #include <aros/debug.h>
12 /*****************************************************************************
14 NAME */
15 #include <proto/muiscreen.h>
17 AROS_LH1(void, MUIS_ClosePubFile,
19 /* SYNOPSIS */
20 AROS_LHA(APTR, pf, A0),
22 /* LOCATION */
23 struct Library *, MUIScreenBase, 0x30, MUIScreen)
25 /* FUNCTION
27 INPUTS
29 RESULT
31 NOTES
33 EXAMPLE
35 BUGS
37 SEE ALSO
39 INTERNALS
41 ******************************************************************************/
44 AROS_LIBFUNC_INIT
46 D(bug("MUIS_ClosePubFile(%p)\n", pf));
48 struct IFFHandle *iff = (struct IFFHandle *) pf;
50 if (iff)
52 if(iff->iff_Flags & IFFF_WRITE)
53 PopChunk(iff);
55 CloseIFF(iff);
56 Close((BPTR) iff->iff_Stream);
57 FreeIFF(iff);
60 AROS_LIBFUNC_EXIT