add more arm feature flags
[AROS.git] / workbench / libs / rexxsupport / freemem.c
blob1c60f5016cb89a56f964bfdfd8573a1d5e0e8b0e
1 /*
2 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Rexx stub for FreeMem system function
6 Lang: English
7 */
9 #include <proto/exec.h>
10 #include <proto/rexxsyslib.h>
11 #include <exec/types.h>
12 #include <rexx/storage.h>
13 #include <rexx/errors.h>
15 #include <ctype.h>
16 #include <stdlib.h>
18 #include "rexxsupport_intern.h"
19 #include "rxfunctions.h"
21 LONG rxsupp_freemem(struct Library *RexxSupportBase, struct RexxMsg *msg, UBYTE **argstring)
23 char *end;
24 ULONG size;
25 void *mem;
27 *argstring = NULL;
28 if (LengthArgstring(ARG1(msg)) != sizeof(void *))
29 return ERR10_018;
31 mem = *(void **)ARG1(msg);
32 size = strtoul(ARG2(msg), &end, 10);
33 while (isspace(*end)) end++;
34 if (*end != 0)
35 return ERR10_018;
37 FreeMem(mem, size);
38 *argstring = CreateArgstring("1", 1);
39 return 0;