Added empty bootstrap.c and its build target
[AROS.git] / workbench / libs / rexxsupport / getpkt.c
blob0f23463b8c2f589236ce95e5c1bb174181dc6ffc
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 <string.h>
20 #include "rexxsupport_intern.h"
21 #include "portnode.h"
23 LONG rxsupp_getpkt(struct Library *RexxSupportBase, struct RexxMsg *msg, UBYTE **argstring)
25 struct PortNodeData *data;
26 struct Message *msg2;
28 data = (struct PortNodeData *)FindName(&RSBI(RexxSupportBase)->openports, ARG1(msg));
29 if (data != NULL)
31 msg2 = GetMsg(data->port);
32 AddTail(&data->msgs, (struct Node *)msg2);
33 *argstring = CreateArgstring((UBYTE *)&msg2, sizeof(struct Message *));
34 return RC_OK;
36 else
38 *argstring = NULL;
39 return ERR10_018;