2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Graphics function FreeCopList()
8 #include <exec/types.h>
9 #include <graphics/copper.h>
10 #include <proto/exec.h>
11 #include "graphics_intern.h"
13 /*****************************************************************************
16 #include <proto/graphics.h>
18 AROS_LH1(void, FreeCopList
,
21 AROS_LHA(struct CopList
*, coplist
, A0
),
24 struct GfxBase
*, GfxBase
, 91, Graphics
)
27 Deallocate all memory associated with this copper list.
30 coplist - pointer to a CopList structure
47 *****************************************************************************/
51 struct CopList
* NextCopList
= coplist
;
52 while (NULL
!= NextCopList
)
54 coplist
= NextCopList
;
55 /* get the pointer to the next CopList BEFORE we return it to free
58 NextCopList
= coplist
-> Next
;
59 FreeMem(coplist
->CopIns
, sizeof(struct CopIns
) * coplist
->MaxCount
);
60 FreeMem(coplist
, sizeof(struct CopList
));