1
0
mirror of https://github.com/deadw00d/AROS.git synced 2025-12-08 14:34:41 +00:00
Files
AROS-v0/compiler/arossupport/clonerastport.c
Matthias Rustler 2dd7a55cbf compiler: detabbed
2021-05-02 14:18:58 +02:00

57 lines
1.2 KiB
C

/*
Copyright (C) 1995-2011, The AROS Development Team. All rights reserved.
Desc: Graphics function CloneRastPort()
*/
#include <exec/memory.h>
#include <proto/exec.h>
/*****************************************************************************
NAME */
#include <graphics/rastport.h>
#include <proto/arossupport.h>
struct RastPort *CloneRastPort(
/* SYNOPSIS */
struct RastPort *rp)
/* FUNCTION
This function creates a copy of a RastPort.
INPUTS
rp - The RastPort to clone.
RESULT
A pointer to a RastPort with the same attributes as the RastPort
which was specified or NULL if there was not enough memory to perform
the operation.
NOTES
EXAMPLE
BUGS
SEE ALSO
CreateRastPort(), FreeRastPort()
INTERNALS
HISTORY
29-10-95 digulla automatically created from
graphics_lib.fd and clib/graphics_protos.h
*****************************************************************************/
{
struct RastPort *newRP = AllocMem (sizeof (struct RastPort), MEMF_ANY);
if (newRP)
CopyMem (rp, newRP, sizeof (struct RastPort));
return newRP;
} /* CloneRastPort */