#include <string.h>
#include <signal.h>
#include <stdlib.h>
#include "RexxCore.h"
#include "RexxMemory.hpp"
#include "StringClass.hpp"
#include "DirectoryClass.hpp"
#include "RexxActivity.hpp"
#include "ActivityManager.hpp"
#include "MethodClass.hpp"
#include "StackClass.hpp"
#include "Interpreter.hpp"
#include "TranslateDispatcher.hpp"
#include "RexxStartDispatcher.hpp"
#include "InterpreterInstance.hpp"
#include "RexxNativeActivation.hpp"
#include "RexxInternalApis.h"
#include "SystemInterpreter.hpp"
Go to the source code of this file.
RexxReturnCode RexxEntry RexxCreateInterpreter | ( | RexxInstance ** | instance, |
RexxThreadContext ** | context, | ||
RexxOption * | options | ||
) |
Create an interpreter instance at the API level.
instance | The returned instance pointer. |
context | The initial thread context for this instance. |
exits | A list of user exits to be used for this context. |
userData | A pointer to a user defined data area. |
Definition at line 381 of file InterpreterAPI.cpp.
References Interpreter::createInstance(), RXAPI_MEMFAIL, and RXAPI_OK.
void REXXENTRY RexxCreateInterpreterImage | ( | const char * | target | ) |
Create the Rexx saved image during build processing.
Definition at line 93 of file InterpreterAPI.cpp.
References Interpreter::SAVE_IMAGE_MODE, and Interpreter::startInterpreter().
Referenced by main().
RexxReturnCode RexxEntry RexxDidRexxTerminate | ( | void | ) |
Test if the interpreter environment has terminated. This is a nop in 4.0 since the APIs do the proper thing with respect to threading termination. This is maintained solely for binary compatibility.
Definition at line 442 of file InterpreterAPI.cpp.
char* REXXENTRY RexxGetVersionInformation | ( | void | ) |
Retrieve the interpreter version information.
Definition at line 233 of file InterpreterAPI.cpp.
References SystemInterpreter::allocateResultMemory(), and build().
Referenced by main().
RexxReturnCode REXXENTRY RexxHaltThread | ( | thread_id_t | threadid | ) |
Raise a halt condition for a target thread.
threadid | The target threadid. |
Definition at line 272 of file InterpreterAPI.cpp.
References ActivityManager::haltActivity(), Interpreter::isActive(), OREF_NULL, RXARI_NOT_FOUND, and RXARI_OK.
Referenced by RexxSetHalt().
int REXXENTRY RexxInitialize | ( | ) |
Definition at line 76 of file InterpreterAPI.cpp.
References Interpreter::RUN_MODE, and Interpreter::startInterpreter().
RexxReturnCode REXXENTRY RexxResetThreadTrace | ( | thread_id_t | threadid | ) |
Reset the external trace for a target thread.
threadid | The target thread id. |
Definition at line 328 of file InterpreterAPI.cpp.
References Interpreter::isActive(), RXARI_NOT_FOUND, RXARI_OK, and ActivityManager::setActivityTrace().
Referenced by RexxResetTrace().
RexxReturnCode REXXENTRY RexxResetTrace | ( | process_id_t | procid, |
thread_id_t | threadid | ||
) |
The compatibility stub for the reset trace API.
procid | The target process id (ignored). |
threadid | The thread id of the target thread. |
Definition at line 364 of file InterpreterAPI.cpp.
References RexxResetThreadTrace().
Referenced by GrxHost().
RexxReturnCode REXXENTRY RexxSetHalt | ( | process_id_t | procid, |
thread_id_t | threadid | ||
) |
Compatibility function for doing a RexxHaltThread().
procid | The process id (ignored). |
threadid | The target threadid |
Definition at line 294 of file InterpreterAPI.cpp.
References RexxHaltThread().
Referenced by GrxHost().
RexxReturnCode REXXENTRY RexxSetThreadTrace | ( | thread_id_t | threadid | ) |
Turn on tracing for a given interpreter thread.
threadid | The target thread identifier. |
Definition at line 307 of file InterpreterAPI.cpp.
References Interpreter::isActive(), RXARI_NOT_FOUND, RXARI_OK, and ActivityManager::setActivityTrace().
Referenced by RexxSetTrace().
RexxReturnCode REXXENTRY RexxSetTrace | ( | process_id_t | procid, |
thread_id_t | threadid | ||
) |
Compatibility stub for the old signature of RexxSetTrace.
procid | The process id (ignored). |
threadid | The target thread identifier. |
Definition at line 350 of file InterpreterAPI.cpp.
References RexxSetThreadTrace().
Referenced by GrxHost().
int REXXENTRY RexxStart | ( | size_t | argcount, |
PCONSTRXSTRING | arglist, | ||
const char * | programname, | ||
PRXSTRING | instore, | ||
const char * | envname, | ||
int | calltype, | ||
PRXSYSEXIT | exits, | ||
short * | retcode, | ||
PRXSTRING | result | ||
) |
Definition at line 119 of file InterpreterAPI.cpp.
References RexxStartDispatcher::argcount, RexxStartDispatcher::arglist, RexxStartDispatcher::calltype, StringUtil::caselessCompare(), RexxStartDispatcher::instore, TranslateDispatcher::instore, ActivityDispatcher::invoke(), TranslateDispatcher::outputName, RexxStartDispatcher::programName, TranslateDispatcher::programName, ActivityDispatcher::rc, RexxStartDispatcher::result, RexxStartDispatcher::retcode, RXCOMMAND, and Interpreter::terminateInterpreter().
Referenced by ApiRexxStart(), CallRexx(), and main().
RexxReturnCode RexxEntry RexxStemSort | ( | const char * | stemname, |
int | order, | ||
int | type, | ||
size_t | start, | ||
size_t | end, | ||
size_t | firstcol, | ||
size_t | lastcol | ||
) |
Process a stemsort call for the rexxutil SysStemSort function.
stemname | The name of the stem. |
order | The sort order. |
type | The type of sort (case sensitivity). |
start | The starting element number. |
end | The end element number. |
firstcol | The first sort column. |
lastcol | The last sort column. |
Definition at line 413 of file InterpreterAPI.cpp.
References NativeContextBlock::self, RexxNativeActivation::stemSort(), and type.
Referenced by SysStemSort().
int REXXENTRY RexxTerminate | ( | ) |
Definition at line 65 of file InterpreterAPI.cpp.
References Interpreter::terminateInterpreter().
RexxReturnCode REXXENTRY RexxTranslateInstoreProgram | ( | const char * | inFile, |
CONSTRXSTRING * | source, | ||
RXSTRING * | image | ||
) |
Translate a program and store the translated results in an external file.
inFile | The input name. |
source | The source RXSTRING |
image | The returned image RXSTRING |
Definition at line 215 of file InterpreterAPI.cpp.
References TranslateInstoreDispatcher::image, ActivityDispatcher::invoke(), TranslateInstoreDispatcher::programName, ActivityDispatcher::rc, and TranslateInstoreDispatcher::source.
RexxReturnCode REXXENTRY RexxTranslateProgram | ( | const char * | inFile, |
const char * | outFile, | ||
PRXSYSEXIT | exits | ||
) |
Translate a program and store the translated results in an external file.
inFile | The input source file. |
outFile | The output source. |
exits | The exits to use during the translation process. |
Definition at line 185 of file InterpreterAPI.cpp.
References TranslateDispatcher::instore, ActivityDispatcher::invoke(), TranslateDispatcher::outputName, TranslateDispatcher::programName, ActivityDispatcher::rc, and Interpreter::terminateInterpreter().
Referenced by main().
RexxReturnCode RexxEntry RexxVariablePool | ( | PSHVBLOCK | pshvblock | ) |
Main entry point for processing variable pool requests
pshvblock | The shaved variable block chain for the request. |
Definition at line 393 of file InterpreterAPI.cpp.
References NativeContextBlock::self, and RexxNativeActivation::variablePoolInterface().
Referenced by Api_Fill_REXX_Variable_Pool(), Api_Read_All_Elements_Of_A_Specific_Stem_From_REXX_VP(), Api_Read_All_Variables_From_REXX_VP(), Aspi_Fill_REXX_Variable_Pool(), Aspi_Read_All_Elements_Of_A_Specific_Stem_From_REXX_VP(), Aspi_Read_All_Variables_From_REXX_VP(), FetchRexxVar(), SetRexxVar(), SysDumpVariables(), SysFileSearch(), SysIni(), and WSRegistryValue().
void RexxEntry RexxWaitForTermination | ( | void | ) |
Wait for Rexx termination. This is a nop in 4.0 since the APIs do the proper thing with respect to threading termination. This is maintained solely for binary compatibility.
Definition at line 429 of file InterpreterAPI.cpp.