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(struct CollectionItem
*, FindCollection
,
16 AROS_LHA(struct IFFHandle
*, iff
, A0
),
17 AROS_LHA(LONG
, type
, D0
),
18 AROS_LHA(LONG
, id
, D1
),
21 struct Library
*, IFFParseBase
, 27, IFFParse
)
24 Returns a pointer to a list of CollectionItems the installed
25 CollectionChunk of that type and ID.
28 iff - pointer to an IFFHandle struct.
29 type - type code to search for.
30 id - id code to search for.
34 ci - pointer to the last collection chunk encountered
35 with pointers to previous ones.
44 CollectionChunk(), CollectionChunks()
48 *****************************************************************************/
52 struct LocalContextItem
*lci
;
54 DEBUG_FINDCOLLECTION(dprintf("FindCollection: iff 0x%lx type 0x%08lx (%c%c%c%c) id 0x%08lx (%c%c%c%c)\n",
55 iff
, type
, dmkid(type
), id
, dmkid(id
)));
57 if (!(lci
= FindLocalItem(
63 DEBUG_FINDCOLLECTION(dprintf("FindCollection: return NULL\n"));
67 /* The userdata of the found LCI contains a struct CIPtr,
68 which is just a pointer to the first CollectionItem */
72 ((struct CIPtr
*)LocalItemData(lci
) )->FirstCI
77 } /* FindCollection */