Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / iffparse / setlocalitempurge.c
blob09e7acd4fabfcdc4f7155596dc67fdeffb209077
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_LH2(void, SetLocalItemPurge,
15 /* SYNOPSIS */
16 AROS_LHA(struct LocalContextItem *, localItem, A0),
17 AROS_LHA(struct Hook *, purgeHook, A1),
19 /* LOCATION */
20 struct Library *, IFFParseBase, 33, IFFParse)
22 /* FUNCTION
23 Inserts a custom purge hook for the given local context item.
24 The purge hook will be freed when the system wants to delete a local
25 context item.
27 INPUTS
28 localItem - pointer to a local context item.
29 purgeHook - pointer to a hook sructure initialized with the purge function.
31 RESULT
33 NOTES
34 The purgehook must call FreeLocalItem() on the local context item after
35 doing its own resource freeing.
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 AllocLocalItem(), FreeLocalItem()
45 INTERNALS
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
51 DEBUG_SETLOCALEITEMPURGE(dprintf("SetLocalItemPurge: localItem %p purgeHook %p\n", localItem, purgeHook));
53 (void) IFFParseBase;
55 /* Self - explaining */
56 GetIntLCI(localItem)->lci_PurgeHook = purgeHook;
58 DEBUG_SETLOCALEITEMPURGE(dprintf("SetLocalItemPurge: done\n"));
60 AROS_LIBFUNC_EXIT
61 } /* SetLocalItemPurge */