revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / iffparse / collectionchunk.c
blobd3325165a561a10782a607f2f6015d723d5cc50e
1 /*
2 Copyright © 1995-2016, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define DEBUG 0
7 #include <aros/debug.h>
8 #include "iffparse_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <proto/iffparse.h>
15 AROS_LH3(LONG, CollectionChunk,
17 /* SYNOPSIS */
18 AROS_LHA(struct IFFHandle *, iff, A0),
19 AROS_LHA(LONG , type, D0),
20 AROS_LHA(LONG , id, D1),
22 /* LOCATION */
23 struct Library *, IFFParseBase, 23, IFFParse)
25 /* FUNCTION
26 Installs an entry handler with the given type and id, so that
27 chunks encountered with the same type and id will be stored.
28 This is quite like PropChunk(), but CollectionChunk() will
29 store the contents of multiple chunks with the same type and id.
30 To retrieve the stored collection of chunks one uses FindCollection().
31 Remember: the collection is only valid inside the current property scope.
33 INPUTS
34 iff - Pointer to IFFHandle struct. (does not need to be open).
35 type - IFF chunk type declarator for chunk to collect.
36 id - IFF chunk id identifier for chunk to collect.
38 RESULT
39 error - 0 if successful. IFFERR_#? otherwise.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 CollectionChunks(), FindCollection(), PropChunk()
50 INTERNALS
52 *****************************************************************************/
54 AROS_LIBFUNC_INIT
56 DEBUG_COLLECTIONCHUNK(dprintf("CollectionChunk: iff 0x%lx type 0x%08lx (%c%c%c%c) id 0x%08lx (%c%c%c%c)\n",
57 iff, type, dmkid(type), id, dmkid(id)));
59 return
61 EntryHandler
63 iff,
64 type,
65 id,
66 IFFSLI_TOP,
67 &(IPB(IFFParseBase)->collectionhook),
68 iff
72 AROS_LIBFUNC_EXIT
73 } /* CollectionChunk */