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

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: setlocalitempurge.c,v 1.1 1997/02/03 16:44:28 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_LH2(void, SetLocalItemPurge,
  16.  
  17. /*  SYNOPSIS */
  18.     AROS_LHA(struct LocalContextItem *, localItem, A0),
  19.     AROS_LHA(struct Hook             *, purgeHook, A1),
  20.  
  21. /*  LOCATION */
  22.     struct Library *, IFFParseBase, 33, IFFParse)
  23.  
  24. /*  FUNCTION
  25.     Inserts a custom purge hook for the given local context item.
  26.     The purge hook will be freed when the system wants to delete a local
  27.     context item.
  28.  
  29.     INPUTS
  30.     localItem  -  pointer to a local context item.
  31.     purgeHook  -  pointer to a hook sructure initialized with the purge function.
  32.  
  33.     RESULT
  34.  
  35.     NOTES
  36.     The purgehook must call FreeLocalItem() on the local context item after
  37.     doing its own resource freeing.
  38.  
  39.  
  40.     EXAMPLE
  41.  
  42.     BUGS
  43.  
  44.     SEE ALSO
  45.     AllocLocalItem(), FreeLocalItem()
  46.  
  47.     INTERNALS
  48.  
  49.     HISTORY
  50.   27-11-96    digulla automatically created from
  51.       iffparse_lib.fd and clib/iffparse_protos.h
  52.  
  53. *****************************************************************************/
  54. {
  55.     AROS_LIBFUNC_INIT
  56.     AROS_LIBBASE_EXT_DECL(struct Library *,IFFParseBase)
  57.  
  58.     /* Self - explaining */
  59.     GetIntLCI(localItem)->lci_PurgeHook = purgeHook;
  60.  
  61.     return;
  62.  
  63.     AROS_LIBFUNC_EXIT
  64. } /* SetLocalItemPurge */
  65.