New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / workbench / libs / iffparse / stoponexit.c
blobe18a8916881ae71ffa93fc685114aeaff3abb011
1 /*
2 Copyright © 1995-2004, 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, StopOnExit,
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, 25, IFFParse)
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.
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.
34 RESULT
35 error - 0 if successfull, IFFERR_#? otherwise.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 ParseIFF()
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
51 AROS_LIBBASE_EXT_DECL(struct Library *,IFFParseBase)
53 DEBUG_STOPONEXIT(dprintf("StopOnExit: iff 0x%lx type 0x%08lx (%c%c%c%c) id 0x%08lx (%c%c%c%c)\n",
54 iff, type, dmkid(type), id, dmkid(id)));
56 #if DEBUG
57 bug ("StopOnExit (iff=%p, type=%c%c%c%c, id=%c%c%c%c)\n",
58 iff,
59 dmkid(type),
60 dmkid(id)
62 #endif
64 /* Install an ExitHandler */
65 return
67 ExitHandler
69 iff,
70 type,
71 id,
72 IFFSLI_TOP,
73 &(IPB(IFFParseBase)->exitcontexthook),
74 iff
78 AROS_LIBFUNC_EXIT
79 } /* StopOnExit */
82 /**********************/
83 /* Exit entry-handler */
84 /**********************/
86 LONG ExitContextFunc
88 struct Hook *hook,
89 APTR obj,
90 APTR p
93 return (IFFERR_EOC);