55 int __cdecl
main(
int argc,
char *argv[]);
66 printf(
"\nPress ENTER key to exit...");
79 int __cdecl
main(
int argc,
char *argv[])
83 const char *program_name;
84 char arg_buffer[8192];
99 for (i = 1; i < argc; i++)
101 if (program_name == NULL)
103 program_name = argv[i];
107 if (arg_buffer[0] !=
'\0')
109 strcat(arg_buffer,
" ");
111 strcat(arg_buffer, argv[i]);
115 if (program_name == NULL)
119 printf(
"Syntax: REXXPAWS ProgramName [parameter_1....parameter_n]\n");
133 if ( arg_buffer[0] !=
'\0' )
135 rxargs = pgmThrdInst->NewArray(1);
136 pgmThrdInst->ArrayPut(rxargs, pgmThrdInst->String(arg_buffer), 1);
140 rxargs = pgmThrdInst->NewArray(0);
147 rxcargs = pgmThrdInst->NewArray(argc - 2);
151 rxcargs = pgmThrdInst->NewArray(0);
153 for (i = 2; i < argc; i++)
155 pgmThrdInst->ArrayPut(rxcargs,
156 pgmThrdInst->NewStringFromAsciiz(argv[i]),
159 pgmThrdInst->DirectoryPut(dir, rxcargs,
"SYSCARGS");
161 result = pgmThrdInst->CallProgram(program_name, rxargs);
165 rc = (
int32_t)pgmThrdInst->DisplayCondition();
168 pgmInst->Terminate();
173 pgmThrdInst->ObjectToInt32(result, &rc);
176 pgmInst->Terminate();
RexxReturnCode RexxEntry RexxCreateInterpreter(RexxInstance **instance, RexxThreadContext **context, RexxOption *options)
struct _RexxArrayObject * RexxArrayObject
struct _RexxObjectPtr * RexxObjectPtr
struct _RexxDirectoryObject * RexxDirectoryObject
void __cdecl set_pause_at_exit(void)
int __cdecl main(int argc, char *argv[])
LONG REXXENTRY MY_IOEXIT(LONG ExitNumber, LONG Subfunction, PEXIT ParmBlock)
static void __cdecl do_pause_at_exit(void)