New attempt to get the svn revision into the AboutAROS requester.
[cake.git] / rom / graphics / freevportcoplists.c
blob9bb67f944c92a8a94f07805693820ece21aeaedd
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function FreeVPortCopLists()
6 Lang: english
7 */
8 #include <graphics/copper.h>
9 #include <graphics/view.h>
10 #include <proto/exec.h>
11 #include "graphics_intern.h"
13 /*****************************************************************************
15 NAME */
16 #include <proto/graphics.h>
18 AROS_LH1(void, FreeVPortCopLists,
20 /* SYNOPSIS */
21 AROS_LHA(struct ViewPort *, vp, A0),
23 /* LOCATION */
24 struct GfxBase *, GfxBase, 90, Graphics)
26 /* FUNCTION
27 Deallocate all memory associated with the CopList structures
28 for display, color, sprite and the user copper list. The
29 corresponding fields in this structure will be set to NULL.
31 INPUTS
32 vp - pointer to a ViewPort structure
34 RESULT
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 graphics/view.h
45 INTERNALS
47 HISTORY
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
53 if (NULL != vp->DspIns)
55 FreeCopList(vp->DspIns);
56 vp->DspIns = NULL;
59 if (NULL != vp->SprIns)
61 FreeCopList(vp->SprIns);
62 vp->SprIns = NULL;
65 if (NULL != vp->ClrIns)
67 FreeCopList(vp->ClrIns);
68 vp->ClrIns = NULL;
71 if (NULL != vp->UCopIns)
73 if (NULL != vp->UCopIns->FirstCopList)
74 FreeCopList(vp->UCopIns->FirstCopList);
76 FreeMem(vp->UCopIns, sizeof(struct UCopList));
77 vp->UCopIns = NULL;
81 AROS_LIBFUNC_EXIT
82 } /* FreeVPortCopLists */