wip commit. acpi button driver.
[AROS.git] / compiler / arossupport / clonerastport.c
blob915af6262b1c73dfb826f666657c314fe56b288d
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function CloneRastPort()
6 Lang: english
7 */
9 #include <exec/memory.h>
10 #include <proto/exec.h>
12 /*****************************************************************************
14 NAME */
15 #include <graphics/rastport.h>
16 #include <proto/arossupport.h>
18 struct RastPort *CloneRastPort(
20 /* SYNOPSIS */
21 struct RastPort *rp)
23 /* FUNCTION
24 This function creates a copy of a RastPort.
26 INPUTS
27 rp - The RastPort to clone.
29 RESULT
30 A pointer to a RastPort with the same attributes as the RastPort
31 which was specified or NULL if there was not enough memory to perform
32 the operation.
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
41 CreateRastPort(), FreeRastPort()
43 INTERNALS
45 HISTORY
46 29-10-95 digulla automatically created from
47 graphics_lib.fd and clib/graphics_protos.h
49 *****************************************************************************/
51 struct RastPort *newRP = AllocMem (sizeof (struct RastPort), MEMF_ANY);
53 if (newRP)
54 CopyMem (rp, newRP, sizeof (struct RastPort));
56 return newRP;
58 } /* CloneRastPort */