grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / rexxsupport / baddr.c
blob51dbb4057ff7274c257e5f3d2082815a9f138b17
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Convert BCPL address to C pointer
6 Lang: English
7 */
9 #include <proto/exec.h>
10 #include <proto/rexxsyslib.h>
11 #include <exec/types.h>
12 #include <exec/memory.h>
13 #include <rexx/storage.h>
14 #include <rexx/errors.h>
16 #include <ctype.h>
17 #include <stdlib.h>
19 #include "rexxsupport_intern.h"
20 #include "rxfunctions.h"
22 LONG rxsupp_baddr(struct Library *RexxSupportBase, struct RexxMsg *msg, UBYTE **argstring)
24 void *ptr;
26 *argstring = NULL;
28 if (LengthArgstring(ARG1(msg)) != sizeof(void *))
29 return ERR10_018;
31 ptr = BADDR(*(BPTR *)ARG1(msg));
33 *argstring = CreateArgstring((UBYTE *)&ptr, sizeof(void *));
34 return RC_OK;