Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / iffparse / stopchunk.c
blob7a3578e190c65d78381b0a75a051314276f4998c
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(LONG, StopChunk,
15 /* SYNOPSIS */
16 AROS_LHA(struct IFFHandle *, iff, A0),
17 AROS_LHA(LONG , type, D0),
18 AROS_LHA(LONG , id, D1),
20 /* LOCATION */
21 struct Library *, IFFParseBase, 21, IFFParse)
23 /* FUNCTION
24 Inserts an entry handler for the given type and id, that will cause the parser
25 to stop when such a chunk is entered.
27 INPUTS
28 iff - Pointer to IFFHandle struct. (does not need to be open).
29 type - IFF chunk type declarator for chunk to stop at.
30 id - IFF chunk id identifier for chunk to stop at.
32 RESULT
33 error - 0 if successfull, IFFERR_#? otherwise.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
42 StopChunks(), ParseIFF()
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 DEBUG_STOPCHUNK(dprintf("StopChunk: iff 0x%lx type 0x%08lx (%c%c%c%c) id 0x%08lx (%c%c%c%c)\n",
51 iff, type, dmkid(type), id, dmkid(id)));
53 /* Install an EntryHandler */
54 return
56 EntryHandler
58 iff,
59 type,
60 id,
61 IFFSLI_TOP,
62 &(IPB(IFFParseBase)->stophook),
63 iff
67 AROS_LIBFUNC_EXIT
68 } /* StopChunk */