Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / iffparse / currentchunk.c
blob72df3f4236fcbc40dbca30166c7273a23135f605
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_LH1(struct ContextNode *, CurrentChunk,
15 /* SYNOPSIS */
16 AROS_LHA(struct IFFHandle *, iff, A0),
18 /* LOCATION */
19 struct Library *, IFFParseBase, 29, IFFParse)
21 /* FUNCTION
22 Returns the top context node for the give IFFHandle struct.
23 The top contexte is the node most recently pushed onto the
24 context stack
26 INPUTS
27 iff - pointer to IFFHandle struct.
29 RESULT
30 top - Pointer to top contextnode or NULL if none.
32 NOTES
34 EXAMPLE
36 BUGS
38 SEE ALSO
39 PushChunk(), PopChunk(), ParseIFF(), ParentChunk()
41 INTERNALS
42 " .. or NULL if none" (see RESULT) is truth with slight modifications,
43 since the default context node exists as long as the iffhandle
44 itself. However, the user is never given a pointer to this node.
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 struct ContextNode *cn;
52 (void) IFFParseBase;
54 if (iff->iff_Depth)
55 cn = TopChunk(iff);
56 else
57 /* If iffhandle is not opened yet, ther will be no contextnodes */
58 cn = NULL;
60 return (cn);
63 AROS_LIBFUNC_EXIT
64 } /* CurrentChunk */