New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / workbench / libs / iffparse / parentchunk.c
blobb4085f836d156baa362f053f15dfe79be089c67d
1 /*
2 Copyright © 1995-2004, 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 *, ParentChunk,
15 /* SYNOPSIS */
16 AROS_LHA(struct ContextNode *, contextNode, A0),
18 /* LOCATION */
19 struct Library *, IFFParseBase, 30, IFFParse)
21 /* FUNCTION
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.
28 INPUTS
29 contextNode - pointer to a context node.
31 RESULT
32 parent - pointer to the parent context node or NULL if none.
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
41 CurrentChunk()
43 INTERNALS
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
48 AROS_LIBBASE_EXT_DECL(struct Library *,IFFParseBase)
50 struct ContextNode *parentcn;
52 (void) IFFParseBase;
54 /* Get the parent of this contextnode. The contextstack
55 is simulated via AddHead/RemHead so we should use
56 .mln_Succ to get the parent
58 parentcn = (struct ContextNode*)contextNode->cn_Node.mln_Succ;
60 /* If the parent of the found node is 0 (mlh_Tail field
61 in struct MinList, then parentcn is the default contextnode,
62 which the user not should have access to
65 if (!parentcn->cn_Node.mln_Succ)
66 parentcn = NULL;
68 return (parentcn);
70 AROS_LIBFUNC_EXIT
71 } /* ParentChunk */