childs -> children.
[AROS.git] / workbench / libs / icon / freefreelist.c
blob3d9085b853d71aa3a77a888061c52bd544eef1c5
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include "icon_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <proto/icon.h>
15 AROS_LH1(void, FreeFreeList,
17 /* SYNOPSIS */
18 AROS_LHA(struct FreeList *, freelist, A0),
20 /* LOCATION */
21 struct IconBase *, IconBase, 9, Icon)
23 /* FUNCTION
24 Frees all memory chunks in the freelist (previously inserted into
25 it via AddFreeList()).
27 INPUTS
28 freelist - pointer to FreeList struct. It is safe to use NULL.
30 RESULT
32 NOTES
34 EXAMPLE
36 BUGS
38 SEE ALSO
39 AddFreeList()
41 INTERNALS
43 HISTORY
44 2006-04-10 Test for NULL pointer added
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 if ( ! freelist) return;
52 while (!IsListEmpty(&freelist->fl_MemList))
54 struct MemList *node = (struct MemList*)freelist->fl_MemList.lh_Head;
55 Remove ((struct Node*)node);
56 FreeEntry (node);
59 AROS_LIBFUNC_EXIT
60 } /* FreeFreeList */