Fixed compatibility of output.
[AROS.git] / compiler / alib / libdeletepool.c
blobce1fd6174440b83c03fc5a831e8bada01ecbd7f9
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Original version from libnix
4 $Id$
5 */
7 #define AROS_LIBREQ(base,ver) /* We test for versions manually */
9 #include "pool.h"
11 /*****************************************************************************
13 NAME */
14 #include <proto/alib.h>
16 VOID LibDeletePool (
18 /* SYNOPSIS */
19 APTR pool)
21 /* FUNCTION
23 INPUTS
25 RESULT
27 NOTES
29 EXAMPLE
31 BUGS
33 SEE ALSO
35 INTERNALS
37 HISTORY
38 06.12.96 digulla Created after original from libnix
40 ******************************************************************************/
42 # define poolHeader ((POOL*)pool)
43 if (SysBase->LibNode.lib_Version>=39)
44 DeletePool(poolHeader);
45 else
47 if (poolHeader != NULL)
49 ULONG * poolMem,
50 size;
52 while ((poolMem = (ULONG *)RemHead (
53 (struct List *)&poolHeader->PuddleList)
54 )!=NULL
57 size = *--poolMem;
58 FreeMem (poolMem, size);
61 FreeMem (poolHeader, sizeof (POOL));
64 } /* LibDeletePool */