<--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../aros.css' --->

regina

Index


__regina_faked_main() IsReginaMsg() ReginaCleanup() ReginaVersion()
RexxAddMacro() RexxAddQueue() RexxAllocateMemory() RexxCallBack()
RexxClearMacroSpace() RexxCreateQueue() RexxDeleteQueue() RexxDeregisterExit()
RexxDeregisterFunction() RexxDeregisterSubcom() RexxDropMacro() RexxFreeMemory()
RexxLoadMacroSpace() RexxPullQueue() RexxQueryExit() RexxQueryFunction()
RexxQueryMacro() RexxQueryQueue() RexxQuerySubcom() RexxRegisterExitDll()
RexxRegisterExitExe() RexxRegisterFunctionDll() RexxRegisterFunctionExe() RexxRegisterSubcomDll()
RexxRegisterSubcomExe() RexxReorderMacro() RexxSaveMacroSpace() RexxSetHalt()
RexxStart() RexxVariablePool()    

__regina_faked_main()

Synopsis

int __regina_faked_main(
   int __regina_faked_main(int argc, char *argv[]);

Function

Runs Regina's command-line interpreter from the shared library.
It initializes interpreter state, processes command-line options,
and reads, executes, or tokenizes the selected Rexx input.

The regina executable calls this entry point. It is not the
RexxStart() SAA execution interface.

Inputs

argc - Number of elements in argv, as for a C program entry point.
argv - Command-line arguments, including the program name at
       argv[0]. All referenced strings must remain readable.

Result

Returns the converted numeric script result during ordinary
execution. If that result is absent or cannot be converted to an
integer, ordinary result conversion returns EXIT_SUCCESS.

Returns zero for help or version options and on successful
tokenization. In the exceptional interpreter-exit path, returns
-1 if no result is stored; otherwise uses atoi() on that result.

Notes

With no input filename, the interpreter reads from standard input.
The -c option produces tokenized output; -e executes tokenized
input. Other options follow the standalone Regina command line.

This entry point uses command-line state and shared interpreter
initialization. It does not provide per-call isolation guarantees
for embedding in arbitrary applications. Use RexxStart() for the
SAA programmatic execution interface.

Bugs

Some invalid or conflicting command-line options call exit(1)
rather than returning an error. Calling this vector from within
another program can therefore terminate that program.

The argument vector and argv[0] are not validated before use.
Invalid pointers are not a supported input condition.

IsReginaMsg()

Synopsis

BOOL IsReginaMsg(
   BOOL IsReginaMsg(struct RexxMsg *msg);

Function

Checks whether a Rexx message is associated with one of the
thread-context values currently recorded by regina.library. The
routine opens rexxsyslib.library, calls IsRexxMsg(), closes the
library, and compares rm_Private2 with the stored TSD values.

Inputs

msg - Non-NULL pointer to a readable RexxMsg. The message must
      remain valid throughout this call.

Result

TRUE when IsRexxMsg() accepts the message and rm_Private2 matches
a value in the Regina context list; FALSE otherwise.

Also returns FALSE if rexxsyslib.library cannot be opened.

Notes

IsRexxMsg() checks the RexxSys message-identity pointer, not the
contents of an arbitrary RexxMsg. This routine does not read
rm_Private1 or validate the message contents beyond these tests.

This routine traverses the context list without taking a lock.
Its result is not guaranteed during concurrent changes to that
list. A match does not confer ownership of the message or context.

Bugs

An invalid or NULL msg is unsafe: IsRexxMsg() dereferences the
supplied pointer without checking it first.

Cleanup clears a context node's TSD pointer without removing its
node. Therefore a valid RexxSys message with rm_Private2 == NULL
can be accepted as a Regina message if any cleared node remains
in the list.

ReginaCleanup()

Synopsis

APIRET ReginaCleanup(
   );

Function

Cleans up Regina state associated with the current execution context.

Result

Zero when no state was released; nonzero when cleanup performed work.

Notes

Deregister external handlers before cleanup. Do not call while the
interpreter is actively using the state.

ReginaVersion()

Synopsis

APIRET ReginaVersion(
   PRXSTRING VersionString );

Function

Returns the Regina library version and can optionally fill a version
string.

Inputs

VersionString - Optional RXSTRING output. If its length is zero,
                Regina allocates a string buffer; otherwise it writes
                into the supplied buffer up to its declared length.

Result

A numeric version code with the major version in the upper byte and a
two-digit minor component in the low byte.

Notes

VersionString.strlength excludes the terminating NUL. Release an API-
allocated version buffer with RexxFreeMemory().

RexxAddMacro()

Synopsis

APIRET RexxAddMacro(
   PSZ FuncName,
   PSZ SourceFile,
   ULONG Position );

Function

This entry point is intended to register a source program in the macro
space, but is not implemented.

Inputs

FuncName - Macro registration name.
SourceFile - Rexx source file.
Position - Requested search position.

Result

Returns RXMACRO_OK (zero) without performing the requested operation.

See also

RexxStart()


RexxAddQueue()

Synopsis

APIRET RexxAddQueue(
   PSZ QueueName,
   PRXSTRING EntryData,
   ULONG AddFlag );

Function

Adds an RXSTRING entry to a named queue.

Inputs

QueueName - Nonempty queue name.
EntryData - String and length to add.
AddFlag - RXQUEUE_FIFO or RXQUEUE_LIFO.

Result

The queue operation status; a missing or empty name produces
RXQUEUE_BADQNAME.

Notes

The AROS build disables external queues.

RexxAllocateMemory()

Synopsis

PVOID RexxAllocateMemory(
   ULONG size );

Function

Allocates a buffer using the Regina API allocator.

Inputs

size - Requested allocation size in bytes.

Result

Pointer to the allocation, or NULL when allocation fails.

Notes

Release the buffer using RexxFreeMemory().

See also

RexxFreeMemory()


RexxCallBack()

Synopsis

APIRET RexxCallBack(
   PCSZ ProcedureName,
   LONG ArgCount,
   PRXSTRING ArgList,
   PSHORT ReturnCode,
   PRXSTRING Result );

Function

Calls a named Rexx procedure within an active interpreter session.

Inputs

ProcedureName - Internal procedure to call.
ArgCount, ArgList - Parameters supplied to the procedure.
ReturnCode - Optional numeric result.
Result - Optional RXSTRING receiving the textual result.

Result

The callback status. RX_CB_NOTSTARTED indicates no active interpreter;
RX_CB_BADP, RX_CB_TOOMANYP, and RX_CB_BADN cover invalid arguments and
unknown procedures.

Notes

Normally call from the thread executing the interpreter. A NULL Result
is accepted.

See also

RexxStart()


RexxClearMacroSpace()

Synopsis

APIRET RexxClearMacroSpace(
   );

Function

This entry point is intended to clear the macro space, but is not
implemented.

Result

Returns RXMACRO_OK (zero) without performing the requested operation.

See also

RexxStart()


RexxCreateQueue()

Synopsis

APIRET RexxCreateQueue(
   PSZ Buffer,
   ULONG BuffLen,
   PSZ RequestedName,
   ULONG *DupFlag );

Function

Creates a named queue in the Regina queue subsystem.

Inputs

Buffer - Receives the resulting queue name.
BuffLen - Size of Buffer.
RequestedName - Optional requested queue name.
DupFlag - Receives the duplicate-name outcome.

Result

The queue creation status returned by the queue subsystem.

Notes

The AROS build disables external queues with NO_EXTERNAL_QUEUES. Do
not assume a named queue is shared between processes.

RexxDeleteQueue()

Synopsis

APIRET RexxDeleteQueue(
   PSZ QueueName );

Function

Deletes a queue by name.

Inputs

QueueName - Nonempty queue name.

Result

The queue operation status; a missing or empty name produces
RXQUEUE_BADQNAME.

Notes

The AROS build provides local queue handling but disables external
queues.

RexxDeregisterExit()

Synopsis

APIRET RexxDeregisterExit(
   PCSZ EnvName,
   PCSZ ModuleName );

Function

Removes a previously registered system exit handler.

Inputs

EnvName - Name of the exit registration.
ModuleName - Module name for a module-backed registration, or NULL for
             a direct handler.

Result

The deregistration status. A null EnvName produces RXEXIT_BADTYPE.

RexxDeregisterFunction()

Synopsis

APIRET RexxDeregisterFunction(
   PCSZ Name );

Function

Removes an external Rexx function registration.

Inputs

Name - Registered Rexx function name.

Result

The deregistration status. A null Name produces RXFUNC_BADTYPE.

RexxDeregisterSubcom()

Synopsis

APIRET RexxDeregisterSubcom(
   PCSZ EnvName,
   PCSZ ModuleName );

Function

Removes a registered Rexx subcommand environment.

Inputs

EnvName - Name of the registered environment.
ModuleName - Optional backing module name.

Result

The deregistration status. Null EnvName produces RXSUBCOM_BADTYPE.

RexxDropMacro()

Synopsis

APIRET RexxDropMacro(
   PSZ FuncName );

Function

This entry point is intended to remove a program from the macro space,
but is not implemented.

Inputs

FuncName - Macro registration name.

Result

Returns RXMACRO_OK (zero) without performing the requested operation.

See also

RexxStart()


RexxFreeMemory()

Synopsis

APIRET RexxFreeMemory(
   PVOID MemoryBlock );

Function

Releases memory allocated by the Regina API allocator.

Inputs

MemoryBlock - Pointer returned by RexxAllocateMemory() or by a Regina
              interface that allocates through the same allocator.

Result

The allocator release status. A null pointer produces RXFUNC_BADTYPE.

Notes

Do not release a buffer twice or use it after release.

RexxLoadMacroSpace()

Synopsis

APIRET RexxLoadMacroSpace(
   ULONG FuncCount,
   PSZ *FuncNames,
   PSZ MacroLibFile );

Function

This entry point is intended to load macro-space entries from a file,
but is not implemented.

Inputs

FuncCount - Number of listed names.
FuncNames - Names to load.
MacroLibFile - Source file.

Result

Returns RXMACRO_OK (zero) without performing the requested operation.

See also

RexxStart()


RexxPullQueue()

Synopsis

APIRET RexxPullQueue(
   PSZ QueueName,
   PRXSTRING DataBuf,
   PDATETIME TimeStamp,
   ULONG WaitFlag );

Function

Removes an entry from the named queue.

Inputs

QueueName - Nonempty queue name.
DataBuf - Receives the entry data and its length.
TimeStamp - Optional timestamp structure; valid is cleared on success.
WaitFlag - RXQUEUE_WAIT to wait, or RXQUEUE_NOWAIT to return without
           waiting.

Result

The queue operation status. Invalid WaitFlag produces
RXQUEUE_BADWAITFLAG; a null DataBuf produces RXQUEUE_MEMFAIL.

Notes

The AROS build disables external queues.

RexxQueryExit()

Synopsis

APIRET RexxQueryExit(
   PCSZ EnvName,
   PCSZ ModuleName,
   PUSHORT Flag,
   PUCHAR UserArea );

Function

Checks for a registered system exit handler.

Inputs

EnvName - Registration name.
ModuleName - Optional module name.
Flag - Receives RXEXIT_ISREG on success, otherwise zero.
UserArea - Receives the registered user data where applicable.

Result

The query status. A null EnvName or Flag produces RXEXIT_BADTYPE.

RexxQueryFunction()

Synopsis

APIRET RexxQueryFunction(
   PCSZ Name );

Function

Looks up an external Rexx function registration.

Inputs

Name - Rexx function name to query.

Result

The query status. A null Name produces RXFUNC_BADTYPE.

RexxQueryMacro()

Synopsis

APIRET RexxQueryMacro(
   PSZ FuncName,
   PUSHORT Position );

Function

This entry point is intended to query a macro-space entry, but is not
implemented.

Inputs

FuncName - Macro name.
Position - Intended output for the search position; unchanged by this
           implementation.

Result

Returns RXMACRO_OK (zero) without performing the requested operation.

See also

RexxStart()


RexxQueryQueue()

Synopsis

APIRET RexxQueryQueue(
   PSZ QueueName,
   ULONG *Count );

Function

Obtains the number of entries in a named queue.

Inputs

QueueName - Nonempty queue name.
Count - Receives the number of entries.

Result

The query status; a missing or empty name produces RXQUEUE_BADQNAME.

Notes

The AROS build disables external queues. Queue visibility is limited
by the local queue subsystem.

RexxQuerySubcom()

Synopsis

APIRET RexxQuerySubcom(
   PCSZ EnvName,
   PCSZ ModuleName,
   PUSHORT Flag,
   PUCHAR UserArea );

Function

Queries a registered Rexx command environment.

Inputs

EnvName - Environment name.
ModuleName - Optional module name.
Flag - Receives RXSUBCOM_ISREG if found, otherwise zero.
UserArea - Receives associated registration data where applicable.

Result

The query status. A null EnvName or Flag produces RXSUBCOM_BADTYPE.

RexxRegisterExitDll()

Synopsis

APIRET RexxRegisterExitDll(
   PCSZ EnvName,
   PCSZ ModuleName,
   PCSZ ProcedureName,
   PUCHAR UserArea,
   ULONG DropAuth );

Function

Registers a system exit handler identified by a dynamic module and
procedure.

Inputs

EnvName - Registration name.
ModuleName - Module providing the handler.
ProcedureName - Exported handler name.
UserArea - Optional caller data.
DropAuth - RXEXIT_DROPPABLE or RXEXIT_NONDROP.

Result

The exit-registration status. Null required names or an invalid
DropAuth produce RXEXIT_BADTYPE.

Notes

The implementation validates DropAuth but does not pass it to the
registration helper.

RexxRegisterExitExe()

Synopsis

APIRET RexxRegisterExitExe(
   PCSZ EnvName,
   RexxExitHandler *EntryPoint,
   PUCHAR UserArea );

Function

Registers a process-resident system exit handler for RexxStart().

Inputs

EnvName - Name used to identify the exit.
EntryPoint - Callback to invoke.
UserArea - Optional caller data associated with the registration.

Result

The status returned by the exit-registration interface. RXEXIT_BADTYPE
is returned for a null name or callback.

RexxRegisterFunctionDll()

Synopsis

APIRET RexxRegisterFunctionDll(
   PCSZ ExternalName,
   PCSZ LibraryName,
   PCSZ InternalName );

Function

Registers a Rexx function backed by a named dynamic library export.

Inputs

ExternalName - Rexx-visible name.
LibraryName - Module containing the implementation.
InternalName - Exported procedure name.

Result

The registration status. A null required name produces RXFUNC_BADTYPE.

RexxRegisterFunctionExe()

Synopsis

APIRET RexxRegisterFunctionExe(
   PCSZ Name,
   RexxFunctionHandler *EntryPoint );

Function

Registers a direct external Rexx function handler.

Inputs

Name - Rexx-callable function name.
EntryPoint - Handler callback.

Result

The registration status. A null Name or EntryPoint produces
RXFUNC_BADTYPE.

RexxRegisterSubcomDll()

Synopsis

APIRET RexxRegisterSubcomDll(
   PCSZ EnvName,
   PCSZ ModuleName,
   PCSZ ProcedureName,
   PUCHAR UserArea,
   ULONG DropAuth );

Function

Registers a command environment implemented by a dynamically loaded
procedure.

Inputs

EnvName - Name of the command environment.
ModuleName - Module to load.
ProcedureName - Exported handler name.
UserArea - Optional associated data.
DropAuth - RXSUBCOM_DROPPABLE or RXSUBCOM_NONDROP.

Result

Registration status. Missing required names or an invalid DropAuth
produce RXSUBCOM_BADTYPE.

Notes

DropAuth is checked but is not passed to the registration helper.

RexxRegisterSubcomExe()

Synopsis

APIRET RexxRegisterSubcomExe(
   PCSZ EnvName,
   RexxSubcomHandler *EntryPoint,
   PUCHAR UserArea );

Function

Registers a direct handler for a named Rexx command environment.

Inputs

EnvName - Command-environment name.
EntryPoint - Subcommand handler callback.
UserArea - Optional associated caller data.

Result

The registration status; RXSUBCOM_BADTYPE is returned when EnvName or
EntryPoint is NULL.

RexxReorderMacro()

Synopsis

APIRET RexxReorderMacro(
   PSZ FuncName,
   ULONG Position );

Function

This entry point is intended to change the search order of a macro-
space entry, but is not implemented.

Inputs

FuncName - Macro name.
Position - Requested search position.

Result

Returns RXMACRO_OK (zero) without performing the requested operation.

See also

RexxStart()


RexxSaveMacroSpace()

Synopsis

APIRET RexxSaveMacroSpace(
   ULONG FuncCount,
   PSZ *FuncNames,
   PSZ MacroLibFile );

Function

This entry point is intended to save macro-space entries to a file,
but is not implemented.

Inputs

FuncCount - Number of listed names.
FuncNames - Names to save.
MacroLibFile - Destination file.

Result

Returns RXMACRO_OK (zero) without performing the requested operation.

See also

RexxStart()


RexxSetHalt()

Synopsis

APIRET RexxSetHalt(
   LONG pid,
   LONG tid );

Function

Requests interruption of the current Rexx interpreter context.

Inputs

pid, tid - API process and thread identifiers.

Result

RXARI_OK after setting the current context halt flag.

Notes

This implementation ignores pid and tid; it does not select a
different process or thread.

See also

RexxStart()


RexxStart()

Synopsis

APIRET RexxStart(
   LONG ArgCount,
   PRXSTRING ArgList,
   PCSZ ProgramName,
   PRXSTRING Instore,
   PCSZ EnvName,
   LONG CallType,
   PRXSYSEXIT Exits,
   PSHORT ReturnCode,
   PRXSTRING Result );

Function

Starts a Rexx program from a file, source buffer, or tokenized in-
storage image.

Inputs

ArgCount, ArgList - Argument count and RXSTRING array.
ProgramName - Program identity or filename; must not be NULL.
Instore - Optional source/tokenized image pair.
EnvName - Optional initial command environment.
CallType - RXCOMMAND, RXSUBROUTINE, or RXFUNCTION, optionally combined
           with RXRESTRICTED.
Exits - Optional RXENDLST-terminated system-exit array.
ReturnCode - Optional program numeric result.
Result - Optional RXSTRING receiving the textual result.

Result

API status of the invocation; the program return code is reported
separately through ReturnCode. Invalid parameters produce
RXFUNC_BADTYPE or RX_START_BADP. Too many arguments produce
RX_START_TOOMANYP.

Notes

RXCOMMAND accepts at most one argument string. Result storage depends
on the supplied RXSTRING buffer and interpreter output.

RexxVariablePool()

Synopsis

APIRET RexxVariablePool(
   PSHVBLOCK RequestBlockList );

Function

Processes a linked sequence of Rexx variable-pool requests in the
running interpreter.

Inputs

RequestBlockList - First SHVBLOCK request. Each block selects an
                   operation with shvcode and reports its outcome in
                   shvret.

Result

Bitwise combination of the request status bits. RXSHV_NOAVL is
returned when no interpreter variable tree is available; a null
request list produces RXFUNC_BADTYPE.

Notes

For each request, inspect shvret and any returned name or value. The
interface requires an active interpreter context.

Docutils System Messages

System Message: ERROR/3 (/home/vsts/work/1/b/documentation/html/documentation/developers/autodocs/regina.en.rst, line 100); backlink

Unknown target name: "rexx".