Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / iffparse / initiff.c
blobb579379ba2140132346b212e59cc6edec2875e17
1 /*
2 Copyright © 1995-2007, 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_LH3(void, InitIFF,
15 /* SYNOPSIS */
16 AROS_LHA(struct IFFHandle *, iff, A0),
17 AROS_LHA(LONG , flags, D0),
18 AROS_LHA(struct Hook *, streamHook, A1),
20 /* LOCATION */
21 struct Library *, IFFParseBase, 38, IFFParse)
23 /* FUNCTION
24 Initializes an IFFHandle with a custom stream handler and
25 flags describing seekability of the stream.
27 INPUTS
28 iff - pointer to IFFHandle struct.
29 flags - stream I/O flags for the IFFHandle.
30 streamHook - pointer to a Hook structure initialized with the streamhandler
31 to be called.
33 RESULT
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
42 utility/hooks.h
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 DEBUG_INITIFF(dprintf("InitIFF: iff %p flags 0x%lx streamHook %p\n",
51 iff, flags, streamHook));
53 (void) IFFParseBase;
55 /* Change the flags IFF flags to the supplied ones */
56 iff->iff_Flags |= flags;
58 /* Put the pointer to the streamHook into the iffhandle */
59 GetIntIH(iff)->iff_StreamHandler = streamHook;
61 DEBUG_INITIFF(dprintf("InitIFF: donen"));
63 AROS_LIBFUNC_EXIT
64 } /* InitIFF */