r4493@vps: verhaegs | 2007-04-19 14:44:00 -0400
[AROS.git] / rom / graphics / freecprlist.c
blobbe1c048ae23ccefc50abc2b13128b155c10f0695
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function FreeCprList()
6 Lang: english
7 */
8 #include <graphics/copper.h>
9 #include <proto/exec.h>
10 #include "graphics_intern.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/graphics.h>
17 AROS_LH1(void, FreeCprList,
19 /* SYNOPSIS */
20 AROS_LHA(struct cprlist *, cprList, A0),
22 /* LOCATION */
23 struct GfxBase *, GfxBase, 94, Graphics)
25 /* FUNCTION
26 Deallocate all memory associated with this cprlist structure
28 INPUTS
29 cprlist - pointer to a cprlist structure
31 RESULT
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
40 graphics/copper.h
42 INTERNALS
44 HISTORY
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
49 AROS_LIBBASE_EXT_DECL(struct GfxBase *,GfxBase)
51 struct cprlist * NextCprList = cprList;
52 while (NULL != NextCprList)
54 cprList = NextCprList;
55 NextCprList = NextCprList->Next;
56 FreeMem(cprList->start, cprList->MaxCount << 2 );
57 FreeMem(cprList, sizeof(struct cprlist));
60 AROS_LIBFUNC_EXIT
61 } /* FreeCprList */