5 Copyright © 1995-2001, 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 struct FileHandle
*rm_Stdin
; /* Input filehandle to use */
35 struct FileHandle
*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 /* The command for in rm_Action */
51 #define RXCOMM 0x01000000
52 #define RXFUNC 0x02000000
53 #define RXCLOSE 0x03000000
54 #define RXQUERY 0x04000000
55 #define RXADDFH 0x07000000
56 #define RXADDLIB 0x08000000
57 #define RXREMLIB 0x09000000
58 #define RXADDCON 0x0A000000
59 #define RXREMCON 0x0B000000
60 #define RXTCOPN 0x0C000000
61 #define RXTCCLS 0x0D000000
63 /* Some commands added for AROS and regina only */
64 #define RXADDRSRC 0xF0000000 /* Will register a resource node to call the clean up function
65 * from when the rexx script finishes
66 * The rexx implementation is free to use the list node fields
67 * for their own purpose. */
68 #define RXREMRSRC 0xF1000000 /* Will unregister an earlier registered resource node */
69 #define RXCHECKMSG 0xF2000000 /* Check if private fields are from the Rexx interpreter */
70 #define RXSETVAR 0xF3000000 /* Set a variable with a given to a given value */
71 #define RXGETVAR 0xF4000000 /* Get the value of a variable with the given name */
73 #define RXCODEMASK 0xFF000000
74 #define RXARGMASK 0x0000000F
76 /* Flags that can be combined with the commands */
78 #define RXFB_RESULT 17
79 #define RXFB_STRING 18
81 #define RXFB_NONRET 20
82 #define RXFB_FUNCLIST 5
84 /* Convert from bit number to number */
85 #define RXFF_NOIO (1<<RXFB_NOIO)
86 #define RXFF_RESULT (1<<RXFB_RESULT)
87 #define RXFF_STRING (1<<RXFB_STRING)
88 #define RXFF_TOKEN (1<<RXFB_TOKEN)
89 #define RXFF_NONRET (1<<RXFB_NONRET)
95 UBYTE ra_Depricated1
; /* Was ra_Flags but not used anymore */
96 UBYTE ra_Depricated2
; /* Was ra_Hash but not used anymore */
103 WORD rr_Func
; /* Library offset of clean up function */
104 APTR rr_Base
; /* Library base of clean up function */
105 LONG rr_Size
; /* Total size of structure */
106 LONG rr_Arg1
; /* Meaning depends on type of Resource */
107 LONG rr_Arg2
; /* Meaning depends on type of Resource */
110 /* Types for the resource nodes */
112 #define RRT_LIB 1 /* A function library */
113 /*#define RRT_PORT 2 Not used */
114 /*#define RRT_FILE 3 Not used */
115 #define RRT_HOST 4 /* A function host */
116 #define RRT_CLIP 5 /* A clip on the clip list */
118 #endif /* REXX_STORAGE_H */