2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 #include "iffparse_intern.h"
8 /*****************************************************************************
11 #include <proto/iffparse.h>
13 AROS_LH1(struct ContextNode
*, ParentChunk
,
16 AROS_LHA(struct ContextNode
*, contextNode
, A0
),
19 struct Library
*, IFFParseBase
, 30, IFFParse
)
22 Returns a pointer to the parent context node to the given
23 one on the context node stack. The parent context node
24 represents the chunk enclosing the chunk given.
25 This can be use together with CurrentChunk() to iterate the
26 context node stack top-down.
29 contextNode - pointer to a context node.
32 parent - pointer to the parent context node or NULL if none.
45 *****************************************************************************/
49 struct ContextNode
*parentcn
;
53 /* Get the parent of this contextnode. The contextstack
54 is simulated via AddHead/RemHead so we should use
55 .mln_Succ to get the parent
57 parentcn
= (struct ContextNode
*)contextNode
->cn_Node
.mln_Succ
;
59 /* If the parent of the found node is 0 (mlh_Tail field
60 in struct MinList, then parentcn is the default contextnode,
61 which the user not should have access to
64 if (!parentcn
->cn_Node
.mln_Succ
)