Tabs to spaces, more consistent formatting.
[AROS.git] / workbench / libs / iffparse / freelocalitem.c
blob2f00c83c407b2c071879df0f3fa6e38ceec602df
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_LH1(void, FreeLocalItem,
15 /* SYNOPSIS */
16 AROS_LHA(struct LocalContextItem *, localItem, A0),
18 /* LOCATION */
19 struct Library *, IFFParseBase, 34, IFFParse)
21 /* FUNCTION
22 Frees a local context item previously allocated by AllocLocalItem.
23 This functioned should always be calles by custom LCI purge hooks.
25 INPUTS
26 localItem - pointer to LocalContextItem struct.
28 RESULT
30 NOTES
32 EXAMPLE
34 BUGS
36 SEE ALSO
37 AllocLocalItem()
39 INTERNALS
41 *****************************************************************************/
43 AROS_LIBFUNC_INIT
45 if (localItem != NULL)
47 /* If the LCI has supplied userdata, then free it */
48 if ( GetIntLCI(localItem)->lci_UserData )
50 FreeMem
52 GetIntLCI(localItem)->lci_UserData,
53 GetIntLCI(localItem)->lci_UserDataSize
58 /* Free the LCI itself */
59 FreeMem(localItem, sizeof (struct IntLocalContextItem));
62 AROS_LIBFUNC_EXIT
63 } /* FreeLocalItem */