67 if ((dwCtrlType == CTRL_CLOSE_EVENT) || (dwCtrlType == CTRL_SHUTDOWN_EVENT))
73 if (dwCtrlType == CTRL_BREAK_EVENT || dwCtrlType == CTRL_LOGOFF_EVENT)
76 if (GetEnvironmentVariable(
"RXCTRLBREAK", envp,
sizeof(envp)) > 0 && strcmp(
"NO",envp) == 0)
82 if (dwCtrlType == CTRL_LOGOFF_EVENT)
101 const int bufferSize = 20;
102 TCHAR rxTraceBuf[bufferSize];
109 DWORD charcount = GetEnvironmentVariable(
"RXTRACE", rxTraceBuf, bufferSize);
110 if (charcount != 0 && charcount < bufferSize )
124 if ((_fileno(stdin) < 0) && (GetFileType(GetStdHandle(STD_INPUT_HANDLE)) != FILE_TYPE_UNKNOWN))
126 *stdin = *_fdopen(_open_osfhandle((
intptr_t)GetStdHandle(STD_INPUT_HANDLE),_O_RDONLY),
"r");
128 if ((_fileno(stdout) < 0) && (GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) != FILE_TYPE_UNKNOWN))
130 *stdout = *_fdopen(_open_osfhandle((
intptr_t)GetStdHandle(STD_OUTPUT_HANDLE),_O_APPEND),
"a");
132 if ((_fileno(stderr) < 0) && (GetFileType(GetStdHandle(STD_ERROR_HANDLE)) != FILE_TYPE_UNKNOWN))
134 *stderr = *_fdopen(_open_osfhandle((
intptr_t)GetStdHandle(STD_ERROR_HANDLE),_O_APPEND),
"a");
187 size_t pathSize = GetEnvironmentVariable(
"PATH", temp,
sizeof(temp));
188 size_t rexxPathSize = GetEnvironmentVariable(
"REXX_PATH", temp,
sizeof(temp));
189 size_t parentSize = parentDir == NULL ? 0 : strlen(parentDir);
190 size_t extensionSize = extensionPath == NULL ? 0 : strlen(extensionPath);
196 if (parentDir != NULL)
198 strcpy(
path, parentDir);
205 if (extensionPath != NULL)
207 strcat(
path, extensionPath);
215 GetEnvironmentVariable(
"REXX_PATH",
path + strlen(
path), (DWORD)pathSize + 1);
221 GetEnvironmentVariable(
"PATH",
path + strlen(
path), (DWORD)pathSize + 1);
RexxString * new_string(const char *s, stringsize_t l)
RexxList * searchExtensions
void enableExternalTrace(const char *option)
RexxObject * append(RexxObject *)
RexxObject * hasItem(RexxObject *)
InterpreterInstance * instance
void addSearchExtension(const char *name)
char * externalTraceOption
void initialize(InterpreterInstance *i, RexxOption *options)
void setupProgram(RexxActivation *activation)
bool externalTraceEnabled
SysSearchPath(const char *parent, const char *extension)
static bool processSignal(DWORD dwCtrlType)
static void * allocateResultMemory(size_t)
static void releaseResultMemory(void *)
BOOL __stdcall WinConsoleCtrlHandler(DWORD dwCtrlType)