--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../aros.css' --->
int __regina_faked_main( int __regina_faked_main(int argc, char *argv[]);
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.
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.
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.
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.
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.
BOOL IsReginaMsg( BOOL IsReginaMsg(struct RexxMsg *msg);
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.
msg - Non-NULL pointer to a readable RexxMsg. The message must
remain valid throughout this call.
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.
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.
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.
APIRET ReginaCleanup( );
Cleans up Regina state associated with the current execution context.
Zero when no state was released; nonzero when cleanup performed work.
Deregister external handlers before cleanup. Do not call while the interpreter is actively using the state.
APIRET RexxAddMacro( PSZ FuncName, PSZ SourceFile, ULONG Position );
This entry point is intended to register a source program in the macro space, but is not implemented.
FuncName - Macro registration name. SourceFile - Rexx source file. Position - Requested search position.
Returns RXMACRO_OK (zero) without performing the requested operation.
APIRET RexxAddQueue( PSZ QueueName, PRXSTRING EntryData, ULONG AddFlag );
Adds an RXSTRING entry to a named queue.
QueueName - Nonempty queue name. EntryData - String and length to add. AddFlag - RXQUEUE_FIFO or RXQUEUE_LIFO.
The queue operation status; a missing or empty name produces RXQUEUE_BADQNAME.
The AROS build disables external queues.
PVOID RexxAllocateMemory( ULONG size );
Allocates a buffer using the Regina API allocator.
size - Requested allocation size in bytes.
Pointer to the allocation, or NULL when allocation fails.
Release the buffer using RexxFreeMemory().
APIRET RexxCallBack( PCSZ ProcedureName, LONG ArgCount, PRXSTRING ArgList, PSHORT ReturnCode, PRXSTRING Result );
Calls a named Rexx procedure within an active interpreter session.
ProcedureName - Internal procedure to call. ArgCount, ArgList - Parameters supplied to the procedure. ReturnCode - Optional numeric result. Result - Optional RXSTRING receiving the textual 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.
Normally call from the thread executing the interpreter. A NULL Result is accepted.
APIRET RexxClearMacroSpace( );
This entry point is intended to clear the macro space, but is not implemented.
Returns RXMACRO_OK (zero) without performing the requested operation.
APIRET RexxCreateQueue( PSZ Buffer, ULONG BuffLen, PSZ RequestedName, ULONG *DupFlag );
Creates a named queue in the Regina queue subsystem.
Buffer - Receives the resulting queue name. BuffLen - Size of Buffer. RequestedName - Optional requested queue name. DupFlag - Receives the duplicate-name outcome.
The queue creation status returned by the queue subsystem.
The AROS build disables external queues with NO_EXTERNAL_QUEUES. Do not assume a named queue is shared between processes.
APIRET RexxDeleteQueue( PSZ QueueName );
Deletes a queue by name.
QueueName - Nonempty queue name.
The queue operation status; a missing or empty name produces RXQUEUE_BADQNAME.
The AROS build provides local queue handling but disables external queues.
APIRET RexxDeregisterExit( PCSZ EnvName, PCSZ ModuleName );
Removes a previously registered system exit handler.
EnvName - Name of the exit registration.
ModuleName - Module name for a module-backed registration, or NULL for
a direct handler.
The deregistration status. A null EnvName produces RXEXIT_BADTYPE.
APIRET RexxDeregisterFunction( PCSZ Name );
Removes an external Rexx function registration.
Name - Registered Rexx function name.
The deregistration status. A null Name produces RXFUNC_BADTYPE.
APIRET RexxDeregisterSubcom( PCSZ EnvName, PCSZ ModuleName );
Removes a registered Rexx subcommand environment.
EnvName - Name of the registered environment. ModuleName - Optional backing module name.
The deregistration status. Null EnvName produces RXSUBCOM_BADTYPE.
APIRET RexxDropMacro( PSZ FuncName );
This entry point is intended to remove a program from the macro space, but is not implemented.
FuncName - Macro registration name.
Returns RXMACRO_OK (zero) without performing the requested operation.
APIRET RexxFreeMemory( PVOID MemoryBlock );
Releases memory allocated by the Regina API allocator.
MemoryBlock - Pointer returned by RexxAllocateMemory() or by a Regina
interface that allocates through the same allocator.
The allocator release status. A null pointer produces RXFUNC_BADTYPE.
Do not release a buffer twice or use it after release.
APIRET RexxLoadMacroSpace( ULONG FuncCount, PSZ *FuncNames, PSZ MacroLibFile );
This entry point is intended to load macro-space entries from a file, but is not implemented.
FuncCount - Number of listed names. FuncNames - Names to load. MacroLibFile - Source file.
Returns RXMACRO_OK (zero) without performing the requested operation.
APIRET RexxPullQueue( PSZ QueueName, PRXSTRING DataBuf, PDATETIME TimeStamp, ULONG WaitFlag );
Removes an entry from the named queue.
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.
The queue operation status. Invalid WaitFlag produces RXQUEUE_BADWAITFLAG; a null DataBuf produces RXQUEUE_MEMFAIL.
The AROS build disables external queues.
APIRET RexxQueryExit( PCSZ EnvName, PCSZ ModuleName, PUSHORT Flag, PUCHAR UserArea );
Checks for a registered system exit handler.
EnvName - Registration name. ModuleName - Optional module name. Flag - Receives RXEXIT_ISREG on success, otherwise zero. UserArea - Receives the registered user data where applicable.
The query status. A null EnvName or Flag produces RXEXIT_BADTYPE.
APIRET RexxQueryFunction( PCSZ Name );
Looks up an external Rexx function registration.
Name - Rexx function name to query.
The query status. A null Name produces RXFUNC_BADTYPE.
APIRET RexxQueryMacro( PSZ FuncName, PUSHORT Position );
This entry point is intended to query a macro-space entry, but is not implemented.
FuncName - Macro name.
Position - Intended output for the search position; unchanged by this
implementation.
Returns RXMACRO_OK (zero) without performing the requested operation.
APIRET RexxQueryQueue( PSZ QueueName, ULONG *Count );
Obtains the number of entries in a named queue.
QueueName - Nonempty queue name. Count - Receives the number of entries.
The query status; a missing or empty name produces RXQUEUE_BADQNAME.
The AROS build disables external queues. Queue visibility is limited by the local queue subsystem.
APIRET RexxQuerySubcom( PCSZ EnvName, PCSZ ModuleName, PUSHORT Flag, PUCHAR UserArea );
Queries a registered Rexx command environment.
EnvName - Environment name. ModuleName - Optional module name. Flag - Receives RXSUBCOM_ISREG if found, otherwise zero. UserArea - Receives associated registration data where applicable.
The query status. A null EnvName or Flag produces RXSUBCOM_BADTYPE.
APIRET RexxRegisterExitDll( PCSZ EnvName, PCSZ ModuleName, PCSZ ProcedureName, PUCHAR UserArea, ULONG DropAuth );
Registers a system exit handler identified by a dynamic module and procedure.
EnvName - Registration name. ModuleName - Module providing the handler. ProcedureName - Exported handler name. UserArea - Optional caller data. DropAuth - RXEXIT_DROPPABLE or RXEXIT_NONDROP.
The exit-registration status. Null required names or an invalid DropAuth produce RXEXIT_BADTYPE.
The implementation validates DropAuth but does not pass it to the registration helper.
APIRET RexxRegisterExitExe( PCSZ EnvName, RexxExitHandler *EntryPoint, PUCHAR UserArea );
Registers a process-resident system exit handler for RexxStart().
EnvName - Name used to identify the exit. EntryPoint - Callback to invoke. UserArea - Optional caller data associated with the registration.
The status returned by the exit-registration interface. RXEXIT_BADTYPE is returned for a null name or callback.
APIRET RexxRegisterFunctionDll( PCSZ ExternalName, PCSZ LibraryName, PCSZ InternalName );
Registers a Rexx function backed by a named dynamic library export.
ExternalName - Rexx-visible name. LibraryName - Module containing the implementation. InternalName - Exported procedure name.
The registration status. A null required name produces RXFUNC_BADTYPE.
APIRET RexxRegisterFunctionExe( PCSZ Name, RexxFunctionHandler *EntryPoint );
Registers a direct external Rexx function handler.
Name - Rexx-callable function name. EntryPoint - Handler callback.
The registration status. A null Name or EntryPoint produces RXFUNC_BADTYPE.
APIRET RexxRegisterSubcomDll( PCSZ EnvName, PCSZ ModuleName, PCSZ ProcedureName, PUCHAR UserArea, ULONG DropAuth );
Registers a command environment implemented by a dynamically loaded procedure.
EnvName - Name of the command environment. ModuleName - Module to load. ProcedureName - Exported handler name. UserArea - Optional associated data. DropAuth - RXSUBCOM_DROPPABLE or RXSUBCOM_NONDROP.
Registration status. Missing required names or an invalid DropAuth produce RXSUBCOM_BADTYPE.
DropAuth is checked but is not passed to the registration helper.
APIRET RexxRegisterSubcomExe( PCSZ EnvName, RexxSubcomHandler *EntryPoint, PUCHAR UserArea );
Registers a direct handler for a named Rexx command environment.
EnvName - Command-environment name. EntryPoint - Subcommand handler callback. UserArea - Optional associated caller data.
The registration status; RXSUBCOM_BADTYPE is returned when EnvName or EntryPoint is NULL.
APIRET RexxReorderMacro( PSZ FuncName, ULONG Position );
This entry point is intended to change the search order of a macro- space entry, but is not implemented.
FuncName - Macro name. Position - Requested search position.
Returns RXMACRO_OK (zero) without performing the requested operation.
APIRET RexxSaveMacroSpace( ULONG FuncCount, PSZ *FuncNames, PSZ MacroLibFile );
This entry point is intended to save macro-space entries to a file, but is not implemented.
FuncCount - Number of listed names. FuncNames - Names to save. MacroLibFile - Destination file.
Returns RXMACRO_OK (zero) without performing the requested operation.
APIRET RexxSetHalt( LONG pid, LONG tid );
Requests interruption of the current Rexx interpreter context.
pid, tid - API process and thread identifiers.
RXARI_OK after setting the current context halt flag.
This implementation ignores pid and tid; it does not select a different process or thread.
APIRET RexxStart( LONG ArgCount, PRXSTRING ArgList, PCSZ ProgramName, PRXSTRING Instore, PCSZ EnvName, LONG CallType, PRXSYSEXIT Exits, PSHORT ReturnCode, PRXSTRING Result );
Starts a Rexx program from a file, source buffer, or tokenized in- storage image.
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.
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.
RXCOMMAND accepts at most one argument string. Result storage depends on the supplied RXSTRING buffer and interpreter output.
APIRET RexxVariablePool( PSHVBLOCK RequestBlockList );
Processes a linked sequence of Rexx variable-pool requests in the running interpreter.
RequestBlockList - First SHVBLOCK request. Each block selects an
operation with shvcode and reports its outcome in
shvret.
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.
For each request, inspect shvret and any returned name or value. The interface requires an active interpreter context.