remove definition of ARM_PERIIOBASE
[AROS.git] / rom / devs / console / getconsnip.c
blob0464d899c5496f9c62b796739d40ee9def5c3f9f
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
7 #include <proto/console.h>
8 #include <proto/exec.h>
10 #include "console_gcc.h"
12 AROS_LH0(APTR, GetConSnip, struct ConsoleBase *, ConsoleDevice, 9, Console)
14 AROS_LIBFUNC_INIT
16 APTR data = NULL;
18 ObtainSemaphore(&ConsoleDevice->copyBufferLock);
19 if (ConsoleDevice->copyBuffer)
21 /* OS2-3.x C:conclip calls FreeVec(). NUL-terminated */
22 data = AllocVec(ConsoleDevice->copyBufferSize + 1, MEMF_CLEAR);
23 if (data)
24 CopyMem(ConsoleDevice->copyBuffer, data,
25 ConsoleDevice->copyBufferSize);
27 ReleaseSemaphore(&ConsoleDevice->copyBufferLock);
29 return data;
31 AROS_LIBFUNC_EXIT