2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 #include "iffparse_intern.h"
8 /*****************************************************************************
11 #include <proto/iffparse.h>
13 AROS_LH3(void, StoreItemInContext
,
16 AROS_LHA(struct IFFHandle
*, iff
, A0
),
17 AROS_LHA(struct LocalContextItem
*, localItem
, A1
),
18 AROS_LHA(struct ContextNode
*, contextNode
, A2
),
21 struct Library
*, IFFParseBase
, 37, IFFParse
)
24 Stores the given local context item into the given context node.
25 If a LCI with the some id, type and class identifier allready exists
26 in the context node, the old one will be purged, and the new one
30 iff - pointer to IFFHandle struct.
31 localItem - pointer to LCI to install.
32 contextNode - pointer to the context node in which the LCI will be stored.
47 *****************************************************************************/
51 struct LocalContextItem
*node
,
54 struct MinList
*lcilist
;
58 DEBUG_STOREITEMINCONTEXT(dprintf("StoreItemInContext: iff 0x%lx item 0x%lx context 0x%lx\n",
59 iff
, localItem
, contextNode
));
61 lcilist
= &( GetIntCN(contextNode
)->cn_LCIList
);
63 /* Check if there are other similar LCIs stored */
64 node
= (struct LocalContextItem
*)lcilist
->mlh_Head
;
66 while ((nextnode
= (struct LocalContextItem
*)node
->lci_Node
.mln_Succ
))
70 ( node
->lci_ID
== localItem
->lci_ID
)
72 ( node
->lci_Type
== localItem
->lci_Type
)
74 ( node
->lci_Ident
== localItem
->lci_Ident
)
76 PurgeLCI(node
, IPB(IFFParseBase
));
85 (struct List
*)lcilist
,
86 (struct Node
*)localItem
92 } /* StoreItemInContext */