Don't call ReadArgs() if started from WB.
[tangerine.git] / compiler / alib / libdeletepool.c
blobba01cb8835668dd617c461033750acb19a6b4b9b
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 Original version from libnix
4 $Id$
5 */
7 #include "pool.h"
9 /*****************************************************************************
11 NAME */
12 #include <proto/alib.h>
14 VOID LibDeletePool (
16 /* SYNOPSIS */
17 APTR pool)
19 /* FUNCTION
21 INPUTS
23 RESULT
25 NOTES
27 EXAMPLE
29 BUGS
31 SEE ALSO
33 INTERNALS
35 HISTORY
36 06.12.96 digulla Created after original from libnix
38 ******************************************************************************/
40 # define poolHeader ((POOL*)pool)
41 AROS_GET_SYSBASE_OK
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 */