5 Copyright © 1995-2016, The AROS Development Team. All rights reserved.
8 Desc: ARexx data structures
13 # include <exec/types.h>
16 # include <exec/ports.h>
18 #ifndef DOS_DOSEXTENS_H
19 # include <dos/dosextens.h>
24 struct Message rm_Node
;
25 IPTR rm_Private1
; /* Was rm_TaskBlock */
26 IPTR rm_Private2
; /* Was rm_LibBase */
27 LONG rm_Action
; /* What to do ? */
28 LONG rm_Result1
; /* The first result as a number */
29 IPTR rm_Result2
; /* The second result, most of the time an argstring */
30 IPTR rm_Args
[16]; /* 16 possible arguments for function calls */
31 struct MsgPort
*rm_PassPort
;
32 STRPTR rm_CommAddr
; /* The starting host environment */
33 STRPTR rm_FileExt
; /* The file extension for macro files */
34 BPTR rm_Stdin
; /* Input filehandle to use */
35 BPTR rm_Stdout
; /* Output filehandle to use */
36 LONG rm_Unused1
; /* Was rm_avail */
38 /* AROS comment: rm_Private1 and rm_Private2 are implementation specific.
39 * When sending a message that is meant to be handled in the same environment as
40 * another message one received from somewhere, these fields have to be copied
44 /* Shortcuts for the arguments */
45 #define ARG0(msg) ((UBYTE *)msg->rm_Args[0])
46 #define ARG1(msg) ((UBYTE *)msg->rm_Args[1])
47 #define ARG2(msg) ((UBYTE *)msg->rm_Args[2])
48 #define RXARG(msg,n) ((UBYTE *)msg->rm_Args[n])
50 /* Maximum arguments */
53 /* The command for in rm_Action */
54 #define RXCOMM 0x01000000
55 #define RXFUNC 0x02000000
56 #define RXCLOSE 0x03000000
57 #define RXQUERY 0x04000000
58 #define RXADDFH 0x07000000
59 #define RXADDLIB 0x08000000
60 #define RXREMLIB 0x09000000
61 #define RXADDCON 0x0A000000
62 #define RXREMCON 0x0B000000
63 #define RXTCOPN 0x0C000000
64 #define RXTCCLS 0x0D000000
66 /* Some commands added for AROS and regina only */
67 #define RXADDRSRC 0xF0000000 /* Will register a resource node to call the clean up function
68 * from when the rexx script finishes
69 * The rexx implementation is free to use the list node fields
70 * for their own purpose. */
71 #define RXREMRSRC 0xF1000000 /* Will unregister an earlier registered resource node */
72 #define RXCHECKMSG 0xF2000000 /* Check if private fields are from the Rexx interpreter */
73 #define RXSETVAR 0xF3000000 /* Set a variable with a given to a given value */
74 #define RXGETVAR 0xF4000000 /* Get the value of a variable with the given name */
76 #define RXCODEMASK 0xFF000000
77 #define RXARGMASK 0x0000000F
79 /* Flags that can be combined with the commands */
81 #define RXFB_RESULT 17
82 #define RXFB_STRING 18
84 #define RXFB_NONRET 20
85 #define RXFB_FUNCLIST 5
87 /* Convert from bit number to number */
88 #define RXFF_NOIO (1<<RXFB_NOIO)
89 #define RXFF_RESULT (1<<RXFB_RESULT)
90 #define RXFF_STRING (1<<RXFB_STRING)
91 #define RXFF_TOKEN (1<<RXFB_TOKEN)
92 #define RXFF_NONRET (1<<RXFB_NONRET)
98 UBYTE ra_Deprecated1
; /* Was ra_Flags but not used anymore */
99 UBYTE ra_Deprecated2
; /* Was ra_Hash but not used anymore */
106 WORD rr_Func
; /* Library offset of clean up function */
107 APTR rr_Base
; /* Library base of clean up function */
108 LONG rr_Size
; /* Total size of structure */
109 SIPTR rr_Arg1
; /* Meaning depends on type of Resource */
110 SIPTR rr_Arg2
; /* Meaning depends on type of Resource */
113 /* Types for the resource nodes */
115 #define RRT_LIB 1 /* A function library */
116 /*#define RRT_PORT 2 Not used */
117 /*#define RRT_FILE 3 Not used */
118 #define RRT_HOST 4 /* A function host */
119 #define RRT_CLIP 5 /* A clip on the clip list */
121 #endif /* REXX_STORAGE_H */