2 Copyright © 1995-2004, 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 *****************************************************************************/
51 AROS_LIBBASE_EXT_DECL(struct Library
*,IFFParseBase
)
53 struct LocalContextItem
*lci
;
55 DEBUG_FINDCOLLECTION(dprintf("FindCollection: iff 0x%lx type 0x%08lx (%c%c%c%c) id 0x%08lx (%c%c%c%c)\n",
56 iff
, type
, dmkid(type
), id
, dmkid(id
)));
58 if (!(lci
= FindLocalItem(
64 DEBUG_FINDCOLLECTION(dprintf("FindCollection: return NULL\n"));
68 /* The userdata of the found LCI contains a struct CIPtr,
69 which is just a pointer to the first CollectionItem */
73 ((struct CIPtr
*)LocalItemData(lci
) )->FirstCI
78 } /* FindCollection */