http://www.aros.org AROS-Exec AROS-Exec Archives Power2People
kitty mascottop logo menu

rexxsyslib

Index


ClearRexxMsg() CreateArgstring() CreateRexxMsg() DeleteArgstring()
DeleteRexxMsg() FillRexxMsg() IsRexxMsg() LengthArgstring()
LockRexxBase() UnlockRexxBase()    

ClearRexxMsg()

Synopsis

VOID ClearRexxMsg(
         struct RexxMsg * msgptr,
         ULONG count );

Function

This function will clear a specified number of arguments by calling
DeleteArgstring on them.

Inputs

msgptr - RexxMsg to clear the arguments from
count  - The number of arguments in the message to clear

Result

void

CreateArgstring()

Synopsis

UBYTE * CreateArgstring(
         CONST UBYTE * string,
         ULONG length );

Function

This function will create a RexxArg structure and copy the supplied
string into it.

Inputs

string - String to copy into the RexxArg structure
length - Length of the string to copy.

Result

A pointer to the string part of the allocated RexxArg structure.

Notes

Pointer to the string returned by this function may be used as a
null terminated C string but should be considered read-only.

CreateRexxMsg()

Synopsis

struct RexxMsg * CreateRexxMsg(
         struct MsgPort * port,
         UBYTE          * extension,
         UBYTE          * host );

Function

Creation and initialization of a RexxMsg structure

Inputs

port      - ReplyPort where the message is replied when it has been
            handled
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.

Result

Pointer to the freshly allocated RexxMsg.

DeleteArgstring()

Synopsis

VOID DeleteArgstring(
         UBYTE * argstring );

Function

Deletes a RexxArg structure previously created with CreateArgstring

Inputs

Pointer to the string part of the RexxArg structure returned from
CreateArgstring

Result

void

DeleteRexxMsg()

Synopsis

VOID DeleteRexxMsg(
         struct RexxMsg * packet );

Function

Deletes a RexxMsg structure

Inputs

packet - The RexxMsg to delete.

Result

void

FillRexxMsg()

Synopsis

BOOL FillRexxMsg(
         struct RexxMsg * msgptr,
         ULONG count,
         ULONG mask );

Function

This function will convert the value(s) provided in rm_Args of the
RexxMsg. The input can be either a string or a number.

Inputs

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.

Result

Returns TRUE if succeeded, FALSE otherwise. When FALSE is returned all
memory already allocated will be freed before returning.

Example

This code will convert a string and a number to RexxArgs:

struct RexxMsg *rm;

...

rm->rm_Args[0] = "Test";
rm->rm_Args[1] = (UBYTE *)5;

if (!FillRexxMsg(rm, 2, 1<<1))
...

IsRexxMsg()

Synopsis

BOOL IsRexxMsg(
         struct RexxMsg * msgptr );

Function

Test to see if given Message is a RexxMsg

Inputs

msgptr - Message to test

Result

TRUE if it is one, FALSE otherwise

LengthArgstring()

Synopsis

ULONG LengthArgstring(
         UBYTE * argstring );

Function

This will return the length of a string created with CreateArgstring

Inputs

argstring - Pointer to the string part of a RexxArg structure returned
            from CreateArgstring

Result

length of the argstring

LockRexxBase()

Synopsis

VOID LockRexxBase(
         ULONG resource );

UnlockRexxBase()

Synopsis

VOID UnlockRexxBase(
         ULONG resource );

Copyright © 1995-2024, The AROS Development Team. All rights reserved.
Amiga®, AmigaOS®, Workbench and Intuition are trademarks of Amiga Inc. All other trademarks belong to their respective owners.