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

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: propchunks.c,v 1.1 1997/02/03 16:44:27 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, PropChunks,
  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, 20, IFFParse)
  24.  
  25. /*  FUNCTION
  26.     Does multiple PropChunk() calls on the supplied list.
  27.     An easy way to install several prop chunk handlers
  28.  
  29.  
  30.     INPUTS
  31.     iff      - pointer to an IFFHandle struct.
  32.     propArray  - pointer to an array of longword chunk types and identifiers.
  33.     numPairs  - number of type/id pairs in the propArray.
  34.  
  35.  
  36.     RESULT
  37.     error       - 0 if successfull, IFFERR_#? otherwise.
  38.  
  39.  
  40.     NOTES
  41.  
  42.     EXAMPLE
  43.  
  44.     BUGS
  45.  
  46.     SEE ALSO
  47.  
  48.     INTERNALS
  49.  
  50.     HISTORY
  51.   27-11-96    digulla automatically created from
  52.       iffparse_lib.fd and clib/iffparse_protos.h
  53.  
  54. *****************************************************************************/
  55. {
  56.     AROS_LIBFUNC_INIT
  57.     AROS_LIBBASE_EXT_DECL(struct Library *,IFFParseBase)
  58.  
  59.     LONG count;
  60.     LONG err;
  61.  
  62.     for (count = 0; count < numPairs; count ++ )
  63.     {
  64.     if ((err = PropChunk(iff, propArray[0], propArray [1])))
  65.         return (err);
  66.     propArray = &propArray[2];
  67.     }
  68.     return (NULL);
  69.  
  70.     AROS_LIBFUNC_EXIT
  71. } /* PropChunks */
  72.