diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-06-10 23:34:19 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-06-10 23:34:19 +0000 |
commit | 41cd373618dfb8cfe39ec8169c4a1b162678c980 (patch) | |
tree | f80bc9dcfae919e521b468cdf15312e5aa2ef5bb /os2/OS2/REXX/REXX.xs | |
parent | b76802f5349f9b9be2e0dcf5948c4c7a2fa57d98 (diff) | |
download | perl-41cd373618dfb8cfe39ec8169c4a1b162678c980.tar.gz |
part of the platform changes for IMPLICIT_CONTEXT
p4raw-id: //depot/perl@3531
Diffstat (limited to 'os2/OS2/REXX/REXX.xs')
-rw-r--r-- | os2/OS2/REXX/REXX.xs | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/os2/OS2/REXX/REXX.xs b/os2/OS2/REXX/REXX.xs index 60266f4f16..9f2371488c 100644 --- a/os2/OS2/REXX/REXX.xs +++ b/os2/OS2/REXX/REXX.xs @@ -44,7 +44,7 @@ static ULONG PERLCALL(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING static long incompartment; static SV* -exec_in_REXX(char *cmd, char * handlerName, RexxFunctionHandler *handler) +exec_in_REXX(pTHX_ char *cmd, char * handlerName, RexxFunctionHandler *handler) { dTHR; HMODULE hRexx, hRexxAPI; @@ -61,7 +61,8 @@ exec_in_REXX(char *cmd, char * handlerName, RexxFunctionHandler *handler) LONG rc; SV *res; - if (incompartment) die ("Attempt to reenter into REXX compartment"); + if (incompartment) + Perl_die(aTHX_ "Attempt to reenter into REXX compartment"); incompartment = 1; if (DosLoadModule(buf, sizeof buf, "REXX", &hRexx) @@ -71,7 +72,7 @@ exec_in_REXX(char *cmd, char * handlerName, RexxFunctionHandler *handler) (PFN *)&pRexxRegisterFunctionExe) || DosQueryProcAddr(hRexxAPI, 0, "RexxDeregisterFunction", (PFN *)&pRexxDeregisterFunction)) { - die("REXX not available\n"); + Perl_die(aTHX_ "REXX not available\n"); } if (handlerName) @@ -97,9 +98,9 @@ exec_in_REXX(char *cmd, char * handlerName, RexxFunctionHandler *handler) if (rc || SvTRUE(GvSV(PL_errgv))) { if (SvTRUE(GvSV(PL_errgv))) { STRLEN n_a; - die ("Error inside perl function called from REXX compartment.\n%s", SvPV(GvSV(PL_errgv), n_a)) ; + Perl_die(aTHX_ "Error inside perl function called from REXX compartment.\n%s", SvPV(GvSV(PL_errgv), n_a)) ; } - die ("REXX compartment returned non-zero status %li", rc); + Perl_die(aTHX_ "REXX compartment returned non-zero status %li", rc); } return res; @@ -113,16 +114,17 @@ PERLSTART(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret) return PERLCALL(NULL, argc, argv, queue, ret); } -#define in_rexx_compartment() exec_in_REXX("return StartPerl()\r\n", \ +#define in_rexx_compartment() exec_in_REXX(aTHX_ "return StartPerl()\r\n", \ "StartPerl", PERLSTART) #define REXX_call(cv) ( exec_cv = (cv), in_rexx_compartment()) #define REXX_eval_with(cmd,name,cv) ( exec_cv = (cv), \ - exec_in_REXX(cmd,name,PERLSTART)) + exec_in_REXX(aTHX_ cmd,name,PERLSTART)) #define REXX_eval(cmd) REXX_eval_with(cmd,NULL,NULL) static ULONG PERLCALL(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret) { + dTHX; EXCEPTIONREGISTRATIONRECORD xreg = { NULL, _emx_exception }; int i, rc; unsigned long len; @@ -217,17 +219,7 @@ initialize(void) } static int -not_here(s) -char *s; -{ - croak("%s not implemented on this architecture", s); - return -1; -} - -static int -constant(name, arg) -char *name; -int arg; +constant(char *name, int arg) { errno = EINVAL; return 0; |