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

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: freelocalitem.c,v 1.1 1997/02/03 16:44:24 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_LH1(void, FreeLocalItem,
  16.  
  17. /*  SYNOPSIS */
  18.     AROS_LHA(struct LocalContextItem *, localItem, A0),
  19.  
  20. /*  LOCATION */
  21.     struct Library *, IFFParseBase, 34, IFFParse)
  22.  
  23. /*  FUNCTION
  24.     Frees a local context item previously allocated by AllocLocalItem.
  25.     This functioned should always be calles by custom LCI purge hooks.
  26.  
  27.     INPUTS
  28.     localItem    -    pointer to LocalContextItem struct.
  29.  
  30.     RESULT
  31.  
  32.     NOTES
  33.  
  34.     EXAMPLE
  35.  
  36.     BUGS
  37.  
  38.     SEE ALSO
  39.     AllocLocalItem()
  40.  
  41.     INTERNALS
  42.  
  43.     HISTORY
  44.   27-11-96    digulla automatically created from
  45.       iffparse_lib.fd and clib/iffparse_protos.h
  46.  
  47. *****************************************************************************/
  48. {
  49.     AROS_LIBFUNC_INIT
  50.     AROS_LIBBASE_EXT_DECL(struct Library *,IFFParseBase)
  51.  
  52.     /* If the LCI has supplied userdata, then free it */
  53.     if ( GetIntLCI(localItem)->lci_UserData )
  54.     FreeMem
  55.     (
  56.         GetIntLCI(localItem)->lci_UserData,
  57.         GetIntLCI(localItem)->lci_UserDataSize
  58.     );
  59.  
  60.  
  61.     /* Free the LCI itself */
  62.     FreeMem(localItem, sizeof (struct IntLocalContextItem));
  63.  
  64.     AROS_LIBFUNC_EXIT
  65. } /* FreeLocalItem */
  66.