UBYTE * CreateArgstring(
CONST UBYTE * string,
ULONG length );
This function will create a RexxArg structure and copy the supplied
string into it.
string - String to copy into the RexxArg structure
length - Length of the string to copy.
Will return a pointer the string part of the allocated RexxArg
Pointer to the string returned by this function may be used as a
null terminated C string but should be considered read-only.
struct RexxMsg * CreateRexxMsg(
struct MsgPort * port,
UBYTE * extension,
UBYTE * host );
Creation and initialization of a RexxMsg structure
port - ReplyPort where the message is replied when it has been
extension - The filename extension to use when searching for macros
host - Name of the port to use as the initial command host
(e.g. as used in the ADDRESS Rexx statement). When NULL
is given "REXX" will be used.
Pointer to the freshly allocated RexxMsg.
struct RexxMsg * msgptr,
ULONG mask );
This function will convert the value(s) provided in rm_Args of the
RexxMsg. The input can be either a string or a number.
msgptr - RexxMsg to create the RexxArgs for.
count - The number of ARGs in the rm_Args structure field that is
filled with a value and has to be converted.
mask - Bits 0 to 'count' from this mask indicate whether the
corresponding value in rm_Args is a string or a number. When
the bit is cleared the value is a pointer to a string. When
it is set it is treated as a signed integer.
Returns TRUE if succeeded, FALSE otherwise. When FALSE is returned all
memory already allocated will be freed before returning.
This code will convert a string and a number to RexxArgs:
struct RexxMsg *rm;
rm->rm_Args = "Test";
rm->rm_Args = (UBYTE *)5;
if (!FillRexxMsg(rm, 2, 1<<1))