9 static RXSTRING * strs;
20 strs = malloc(nstrs * sizeof(RXSTRING));
24 MODULE = OS2::DLL PACKAGE = OS2::DLL
28 trace = getenv("PERL_REXX_DEBUG");
31 _call(name, address, queue="SESSION", ...)
41 RexxFunctionHandler *fcn = address;
45 fprintf(stderr, "REXXCALL::_call name: '%s' args:", name);
46 for (i = 0; i < argc; ++i) {
48 char *ptr = SvPV(ST(3+i), len);
49 MAKERXSTRING(strs[i], ptr, len);
51 fprintf(stderr, " '%.*s'", len, ptr);
56 fprintf(stderr, "\n");
57 MAKERXSTRING(result, resbuf, sizeof resbuf);
58 rc = fcn(name, argc, strs, queue, &result);
60 fprintf(stderr, " rc=%X, result='%.*s'\n", rc,
61 result.strlength, result.strptr);
62 ST(0) = sv_newmortal();
65 sv_setpvn(ST(0), result.strptr, result.strlength);
67 sv_setpvn(ST(0), "", 0);
69 if (result.strptr && result.strptr != resbuf)
70 DosFreeMem(result.strptr);