home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / workbench / libs / iffparse / collectionchunks.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-03  |  1.5 KB  |  70 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: collectionchunks.c,v 1.1 1997/02/03 16:44:22 digulla Exp $
  4.  
  5.     Desc:
  6.     Lang: english
  7. */
  8. #include "iffparse_intern.h"
  9.  
  10. /*****************************************************************************
  11.  
  12.     NAME */
  13. #include <proto/iffparse.h>
  14.  
  15.     AROS_LH3(LONG, CollectionChunks,
  16.  
  17. /*  SYNOPSIS */
  18.     AROS_LHA(struct IFFHandle *, iff, A0),
  19.     AROS_LHA(LONG             *, propArray, A1),
  20.     AROS_LHA(LONG              , numPairs, D0),
  21.  
  22. /*  LOCATION */
  23.     struct Library *, IFFParseBase, 24, IFFParse)
  24.  
  25. /*  FUNCTION
  26.     Does multiple CollectionChunk() calls on the supplied list.
  27.     An easy way to install several collction chunks.
  28.  
  29.     INPUTS
  30.     iff      - pointer to an IFFHandle struct.
  31.     propArray  - pointer to an array of longword chunk types and identifiers.
  32.     numPairs  - number of type/id pairs in the propArray.
  33.  
  34.     RESULT
  35.     error       - 0 if successfull, IFFERR_#? otherwise.
  36.  
  37.     NOTES
  38.  
  39.     EXAMPLE
  40.  
  41.     BUGS
  42.  
  43.     SEE ALSO
  44.     CollectionChunk()
  45.  
  46.     INTERNALS
  47.  
  48.     HISTORY
  49.   27-11-96    digulla automatically created from
  50.       iffparse_lib.fd and clib/iffparse_protos.h
  51.  
  52. *****************************************************************************/
  53. {
  54.     AROS_LIBFUNC_INIT
  55.     AROS_LIBBASE_EXT_DECL(struct Library *,IFFParseBase)
  56.  
  57.     LONG count;
  58.     LONG err;
  59.  
  60.     for (count = 0; count < numPairs; count ++ )
  61.     {
  62.     if ((err = CollectionChunk(iff, propArray[0], propArray [1])))
  63.         return (err);
  64.     propArray = &propArray[2];
  65.     }
  66.     return (NULL);
  67.  
  68.     AROS_LIBFUNC_EXIT
  69. } /* CollectionChunks */
  70.