45 #include <sys/types.h>
50 #include "PlatformDefinitions.h"
52 #include "../../hostemu.h"
94 static pthread_mutex_t
hmtxExecIO = PTHREAD_MUTEX_INITIALIZER;
152 unsigned long ulRetc;
157 RxVarBlock.
shvname.strptr = pszVar;
158 RxVarBlock.
shvname.strlength = strlen(pszVar);
171 prxVar -> strptr = NULL;
172 prxVar -> strlength = 0;
177 if (pszTemp == NULL) {
179 prxVar -> strptr = NULL;
180 prxVar -> strlength = 0;
188 prxVar -> strptr = pszTemp;
224 unsigned long ulRetc;
228 RxVarBlock.
shvname.strptr = pszVar;
229 RxVarBlock.
shvname.strlength = strlen(pszVar);
268 unsigned short int *flags,
273 unsigned long i, rc = 0;
277 printf(
"HOSTEMU: Subcom called.\n");
298 printf(
"HOSTEMU: Parse complete, lStartRcd=%d, lRcdCnt=%d, lDirection=%d, fRW=%d, fFinis=%d\n",
313 printf(
"HOSTEMU: Executing execio statement.\n");
319 pll = (
PLL)malloc(
sizeof (
LL));
325 memset(pll,
'\0',
sizeof (
LL));
335 if (pll ->
pFile == NULL) {
369 fclose(pll ->
pFile);
404 printf(
"HOSTEMU: Subcom return code = %u.\n", rc);
441 Stem = (
char *)malloc(StemSize);
446 size_t StemLen = strlen(Stem);
447 Index = Stem + StemLen;
451 snprintf(Index, StemSize - StemLen,
"%u", 0);
456 elements = atoi(rxVal.
strptr);
465 fputs(
"\n", pll ->
pFile);
479 fputs(
"\n", pll ->
pFile);
484 fflush (pll ->
pFile);
533 fputs(Item, pll ->
pFile);
534 fputs(
"\n", pll ->
pFile);
550 fputs(Item, pll ->
pFile);
551 fputs(
"\n", pll ->
pFile);
562 fflush (pll ->
pFile);
593 unsigned long ulRc = 0;
598 Stem = (
char *)malloc(StemSize);
611 size_t StemLen = strlen(Stem);
612 Index = Stem + StemLen;
621 snprintf(Index, StemSize - StemLen,
"%d", i);
636 snprintf(Index, StemSize - StemLen,
"%d", i);
650 snprintf(Index, StemSize - StemLen,
"%d", 0);
751 while (pll != NULL) {
752 if (!strcmp (SFilename, pll ->
FileName)) {
820 if (pll ->
next != NULL) {
823 if (pll ->
prev != NULL) {
855 return (
long)elements;
923 printf(
"HOSTEMU: Library loaded.\n");
924 printf(
"HOSTEMU: RexxRegisterSubcomExe retc = %d.\n", rc);
934 while (pll != NULL) {
935 fclose (pll ->
pFile);
RexxReturnCode RexxEntry RexxVariablePool(PSHVBLOCK pshvblock)
RexxReturnCode REXXENTRY RexxResetTrace(process_id_t procid, thread_id_t threadid)
RexxReturnCode REXXENTRY RexxSetTrace(process_id_t procid, thread_id_t threadid)
RexxReturnCode REXXENTRY RexxSetHalt(process_id_t procid, thread_id_t threadid)
#define ERR_EXECIO_VAR_INVALID
#define ERR_EXECIO_NO_STORAGE
#define ERR_EXECIO_BAD_PLIST
#define REXX_INTERPRETER_4_0_0
#define STANDARD_PACKAGE_HEADER
RexxReturnCode REXXENTRY RexxRegisterSubcomExe(CONSTANT_STRING, REXXPFN, CONSTANT_STRING)
RexxReturnCode REXXENTRY RexxPullFromQueue(CONSTANT_STRING, PRXSTRING, RexxQueueTime *, size_t)
RexxReturnCode REXXENTRY RexxFreeMemory(void *)
RexxReturnCode REXXENTRY RexxAddQueue(CONSTANT_STRING, PCONSTRXSTRING, size_t)
CONSTANT_RXSTRING * PCONSTRXSTRING
RexxReturnCode REXXENTRY RexxQueryQueue(CONSTANT_STRING, size_t *)
void *REXXENTRY RexxAllocateMemory(size_t)
CONSTANT_RXSTRING shvname
struct _SHVBLOCK * shvnext
RexxReturnCode RexxEntry GrxHost(PCONSTRXSTRING command, unsigned short int *flags, PRXSTRING retc)
OOREXX_GET_PACKAGE(hostemu)
static unsigned long ExecIO_Write_From_Stem(PLL pll)
static void hostemu_unloader(RexxThreadContext *context)
static unsigned long ExecIO_Read_To_Queue(PLL pll)
static void push(char *pushstr, long lOp)
unsigned long SetRexxVar(char *pszVar, char *pValue, size_t ulLen)
char * pszSymbol[SYMTABLESIZE]
static void Delete_LL(PLL pll)
unsigned long FetchRexxVar(char *pszVar, PRXSTRING prxVar)
RexxPackageEntry hostemu_package_entry
static PLL Search_LL(char *SFilename)
static unsigned long ExecIO_Read_To_Stem(PLL pll)
static void hostemu_loader(RexxThreadContext *context)
static void Insert_LL(PLL pll)
static unsigned long ExecIO_Write_From_Queue(PLL pll)
EXECIO_OPTIONS ExecIO_Options
static pthread_mutex_t hmtxExecIO