add more arm feature flags
[AROS.git] / workbench / libs / rexxsupport / reply.c
bloba56d7d0ec7cf1fda2121d0871726c83283479dd5
1 /*
2 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Rexx function to wait for a packet on a port
6 Lang: English
7 */
9 #include <proto/exec.h>
10 #include <proto/rexxsyslib.h>
11 #include <proto/alib.h>
13 #include <exec/types.h>
14 #include <exec/memory.h>
15 #include <rexx/storage.h>
16 #include <rexx/errors.h>
18 #include <stdlib.h>
20 #include "rexxsupport_intern.h"
21 #include "portnode.h"
23 LONG rxsupp_reply(struct Library *RexxSupportBase, struct RexxMsg *msg, UBYTE **argstring)
25 struct RexxMsg *msg2 = *(struct RexxMsg **)ARG1(msg);
27 if (msg2 == NULL)
29 *argstring = NULL;
30 return ERR10_018;
33 if ((msg->rm_Action & RXARGMASK) == 2 && IsRexxMsg(msg2))
35 char *end;
36 int code = strtoul(ARG1(msg), &end, 10);
37 if ((*end != 0) || code<0)
39 *argstring = NULL;
40 return ERR10_018;
42 else
44 msg2->rm_Result1 = code;
45 msg2->rm_Result2 = (IPTR)NULL;
49 Remove((struct Node *)msg2);
50 ReplyMsg((struct Message *)msg2);
51 *argstring = CreateArgstring("1", 1);
52 return RC_OK;