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

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: stoponexit.c,v 1.2 1997/02/03 18:38:03 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, StopOnExit,
  16.  
  17. /*  SYNOPSIS */
  18.     AROS_LHA(struct IFFHandle *, iff, A0),
  19.     AROS_LHA(LONG              , type, D0),
  20.     AROS_LHA(LONG              , id, D1),
  21.  
  22. /*  LOCATION */
  23.     struct Library *, IFFParseBase, 25, IFFParse)
  24.  
  25. /*  FUNCTION
  26.     Inserts an exit handler for the given type and id, that will cause the parser
  27.     to stop when such a chunk is left.
  28.  
  29.     INPUTS
  30.      iff   - Pointer to IFFHandle struct. (does not need to be open).
  31.     type  - IFF chunk type declarator for chunk to stop at.
  32.     id    -  IFF chunk id identifier for chunk to stop at.
  33.  
  34.     RESULT
  35.     error  -  0 if successfull, IFFERR_#? otherwise.
  36.  
  37.     NOTES
  38.  
  39.     EXAMPLE
  40.  
  41.     BUGS
  42.  
  43.     SEE ALSO
  44.     ParseIFF()
  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.     /* Install an ExitHandler */
  58.     return
  59.     (
  60.     ExitHandler
  61.     (
  62.         iff,
  63.         type,
  64.         id,
  65.         IFFSLI_TOP,
  66.         &IPB(IFFParseBase)->stophook,
  67.         NULL
  68.     )
  69.     );
  70.  
  71.     AROS_LIBFUNC_EXIT
  72. } /* StopOnExit */
  73.