Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / iffparse / stopchunks.c
blobe33d4f00b3bc11144d1a93d80533e8199598ebda
1 /*
2 Copyright © 1995-2007, 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_LH3(LONG, StopChunks,
15 /* SYNOPSIS */
16 AROS_LHA(struct IFFHandle *, iff, A0),
17 AROS_LHA(const LONG *, propArray, A1),
18 AROS_LHA(LONG , numPairs, D0),
20 /* LOCATION */
21 struct Library *, IFFParseBase, 22, IFFParse)
23 /* FUNCTION
24 Declares multiple stop chunks from th typ/id pairs supplied.
26 INPUTS
27 iff - pointer to an IFFHandle struct.
28 propArray - pointer to an array of longword chunk types and identifiers.
29 numPairs - number of type/id pairs in the propArray.
31 RESULT
32 error - 0 if successfull, IFFERR_#? otherwise.
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
41 StopChunk()
43 INTERNALS
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
49 LONG count;
50 LONG err;
52 DEBUG_STOPCHUNKS(dprintf("StopChunks: iff 0x%lx array 0x%lx num %d\n",
53 iff, propArray, numPairs));
55 for (count = 0; count < numPairs; count ++ )
57 if ((err = StopChunk(iff, propArray[0], propArray[1])))
58 return (err);
59 propArray = &propArray[2];
62 return 0;
64 AROS_LIBFUNC_EXIT
65 } /* StopChunks */