summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-10 23:34:19 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-10 23:34:19 +0000
commit41cd373618dfb8cfe39ec8169c4a1b162678c980 (patch)
treef80bc9dcfae919e521b468cdf15312e5aa2ef5bb /os2
parentb76802f5349f9b9be2e0dcf5948c4c7a2fa57d98 (diff)
downloadperl-41cd373618dfb8cfe39ec8169c4a1b162678c980.tar.gz
part of the platform changes for IMPLICIT_CONTEXT
p4raw-id: //depot/perl@3531
Diffstat (limited to 'os2')
-rw-r--r--os2/OS2/ExtAttr/ExtAttr.xs8
-rw-r--r--os2/OS2/PrfDB/PrfDB.xs18
-rw-r--r--os2/OS2/Process/Process.xs12
-rw-r--r--os2/OS2/REXX/REXX.xs28
4 files changed, 32 insertions, 34 deletions
diff --git a/os2/OS2/ExtAttr/ExtAttr.xs b/os2/OS2/ExtAttr/ExtAttr.xs
index 566b6595c8..a69a01c7f3 100644
--- a/os2/OS2/ExtAttr/ExtAttr.xs
+++ b/os2/OS2/ExtAttr/ExtAttr.xs
@@ -11,14 +11,14 @@ extern "C" {
#include "myea.h"
SV *
-my_eadvalue(_ead ead, int index)
+my_eadvalue(pTHX_ _ead ead, int index)
{
SV *sv;
int size = _ead_value_size(ead, index);
void *p;
if (size == -1) {
- die("Error getting size of EA: %s", strerror(errno));
+ Perl_die(aTHX_ "Error getting size of EA: %s", strerror(errno));
}
p = _ead_get_value(ead, index);
return newSVpv((char*)p, size);
@@ -37,6 +37,10 @@ SV *
my_eadvalue(ead, index)
_ead ead
int index
+ CODE:
+ RETVAL = my_eadvalue(aTHX_ ead, index);
+ OUTPUT:
+ RETVAL
int
my_eadreplace(ead, index, sv, flag = 0)
diff --git a/os2/OS2/PrfDB/PrfDB.xs b/os2/OS2/PrfDB/PrfDB.xs
index 2ba836c183..e747fcf377 100644
--- a/os2/OS2/PrfDB/PrfDB.xs
+++ b/os2/OS2/PrfDB/PrfDB.xs
@@ -15,7 +15,7 @@ extern "C" {
#define Prf_Close(hini) (!CheckWinError(PrfCloseProfile(hini)))
SV *
-Prf_Get(HINI hini, PSZ app, PSZ key) {
+Prf_Get(pTHX_ HINI hini, PSZ app, PSZ key) {
ULONG len;
BOOL rc;
SV *sv;
@@ -51,7 +51,7 @@ Prf_GetLength(HINI hini, PSZ app, PSZ key) {
: HINI_PROFILE)
SV*
-Prf_Profiles()
+Prf_Profiles(pTHX)
{
AV *av = newAV();
SV *rv;
@@ -70,7 +70,7 @@ Prf_Profiles()
}
BOOL
-Prf_SetUser(SV *sv)
+Prf_SetUser(pTHX_ SV *sv)
{
char user[257];
char system[257];
@@ -101,6 +101,10 @@ Prf_Get(hini, app, key)
HINI hini;
PSZ app;
PSZ key;
+CODE:
+ RETVAL = Prf_Get(aTHX_ hini, app, key);
+OUTPUT:
+ RETVAL
int
Prf_Set(hini, app, key, s, l = (SvPOK(ST(3)) ? SvCUR(ST(3)): -1))
@@ -122,10 +126,18 @@ Prf_System(key)
SV*
Prf_Profiles()
+CODE:
+ RETVAL = Prf_Profiles(aTHX);
+OUTPUT:
+ RETVAL
BOOL
Prf_SetUser(sv)
SV *sv
+CODE:
+ RETVAL = Prf_SetUser(aTHX_ sv);
+OUTPUT:
+ RETVAL
BOOT:
Acquire_hab();
diff --git a/os2/OS2/Process/Process.xs b/os2/OS2/Process/Process.xs
index c16d15d0d0..16b494d77c 100644
--- a/os2/OS2/Process/Process.xs
+++ b/os2/OS2/Process/Process.xs
@@ -7,18 +7,8 @@
#define INCL_DOSERRORS
#include <os2.h>
-static int
-not_here(s)
-char *s;
-{
- croak("%s not implemented on this architecture", s);
- return -1;
-}
-
static unsigned long
-constant(name, arg)
-char *name;
-int arg;
+constant(char *name, int arg)
{
errno = 0;
if (name[0] == 'P' && name[1] == '_') {
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;