summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1997-11-05 01:04:10 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1997-11-05 01:04:10 +0000
commit4e35701fd273ba8d0093a29660dee38a92408e9b (patch)
treeafa97d9bf675ea146b86cf09a7c27e1bfbb980f3 /pp.c
parent2b544454484ed91b6f1ae2cffef4c29b1302dcd7 (diff)
downloadperl-4e35701fd273ba8d0093a29660dee38a92408e9b.tar.gz
Builds C++ Borland, MSVC++ (Win32) and GCC++ (Solaris)
p4raw-id: //depot/ansiperl@203
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c261
1 files changed, 121 insertions, 140 deletions
diff --git a/pp.c b/pp.c
index ac722c4f76..3234be31b0 100644
--- a/pp.c
+++ b/pp.c
@@ -26,16 +26,6 @@
static double UV_MAX_cxux = ((double)UV_MAX);
#endif
-#ifdef HAS_CRYPT
-#ifdef __cplusplus
-#ifdef FCRYPT
-extern "C" char *fcrypt(char *,char *);
-#else
-extern "C" char *crypt(char *,char *);
-#endif
-#endif
-#endif
-
/*
* Types used in bitwise operations.
*
@@ -125,7 +115,7 @@ extern pid_t getpid (void);
PP(pp_stub)
{
- dSP;
+ djSP;
if (GIMME_V == G_SCALAR)
XPUSHs(&sv_undef);
RETURN;
@@ -140,7 +130,7 @@ PP(pp_scalar)
PP(pp_padav)
{
- dSP; dTARGET;
+ djSP; dTARGET;
if (op->op_private & OPpLVAL_INTRO)
SAVECLEARSV(curpad[op->op_targ]);
EXTEND(SP, 1);
@@ -165,7 +155,7 @@ PP(pp_padav)
PP(pp_padhv)
{
- dSP; dTARGET;
+ djSP; dTARGET;
I32 gimme;
XPUSHs(TARG);
@@ -198,7 +188,7 @@ PP(pp_padany)
PP(pp_rv2gv)
{
- dSP; dTOPss;
+ djSP; dTOPss;
if (SvROK(sv)) {
wasref:
@@ -243,7 +233,7 @@ PP(pp_rv2gv)
PP(pp_rv2sv)
{
- dSP; dTOPss;
+ djSP; dTOPss;
if (SvROK(sv)) {
wasref:
@@ -292,7 +282,7 @@ PP(pp_rv2sv)
PP(pp_av2arylen)
{
- dSP;
+ djSP;
AV *av = (AV*)TOPs;
SV *sv = AvARYLEN(av);
if (!sv) {
@@ -306,7 +296,7 @@ PP(pp_av2arylen)
PP(pp_pos)
{
- dSP; dTARGET; dPOPss;
+ djSP; dTARGET; dPOPss;
if (op->op_flags & OPf_MOD) {
if (SvTYPE(TARG) < SVt_PVLV) {
@@ -335,7 +325,7 @@ PP(pp_pos)
PP(pp_rv2cv)
{
- dSP;
+ djSP;
GV *gv;
HV *stash;
@@ -354,7 +344,7 @@ PP(pp_rv2cv)
PP(pp_prototype)
{
- dSP;
+ djSP;
CV *cv;
HV *stash;
GV *gv;
@@ -370,7 +360,7 @@ PP(pp_prototype)
PP(pp_anoncode)
{
- dSP;
+ djSP;
CV* cv = (CV*)curpad[op->op_targ];
if (CvCLONE(cv))
cv = (CV*)sv_2mortal((SV*)cv_clone(cv));
@@ -381,14 +371,14 @@ PP(pp_anoncode)
PP(pp_srefgen)
{
- dSP;
+ djSP;
*SP = refto(*SP);
RETURN;
}
PP(pp_refgen)
{
- dSP; dMARK;
+ djSP; dMARK;
if (GIMME != G_ARRAY) {
MARK[1] = *SP;
SP = MARK + 1;
@@ -413,6 +403,7 @@ refto(SV *sv)
else if (SvPADTMP(sv))
sv = newSVsv(sv);
else {
+ dTHR; /* just for SvREFCNT_inc */
SvTEMP_off(sv);
(void)SvREFCNT_inc(sv);
}
@@ -425,7 +416,7 @@ refto(SV *sv)
PP(pp_ref)
{
- dSP; dTARGET;
+ djSP; dTARGET;
SV *sv;
char *pv;
@@ -445,7 +436,7 @@ PP(pp_ref)
PP(pp_bless)
{
- dSP;
+ djSP;
HV *stash;
if (MAXARG == 1)
@@ -463,7 +454,7 @@ PP(pp_gelem)
SV *sv;
SV *ref;
char *elem;
- dSP;
+ djSP;
sv = POPs;
elem = SvPV(sv, na);
@@ -523,7 +514,7 @@ PP(pp_gelem)
PP(pp_study)
{
- dSP; dPOPss;
+ djSP; dPOPss;
register unsigned char *s;
register I32 pos;
register I32 ch;
@@ -585,7 +576,7 @@ PP(pp_study)
PP(pp_trans)
{
- dSP; dTARG;
+ djSP; dTARG;
SV *sv;
if (op->op_flags & OPf_STACKED)
@@ -603,7 +594,7 @@ PP(pp_trans)
PP(pp_schop)
{
- dSP; dTARGET;
+ djSP; dTARGET;
do_chop(TARG, TOPs);
SETTARG;
RETURN;
@@ -611,7 +602,7 @@ PP(pp_schop)
PP(pp_chop)
{
- dSP; dMARK; dTARGET;
+ djSP; dMARK; dTARGET;
while (SP > MARK)
do_chop(TARG, POPs);
PUSHTARG;
@@ -620,14 +611,14 @@ PP(pp_chop)
PP(pp_schomp)
{
- dSP; dTARGET;
+ djSP; dTARGET;
SETi(do_chomp(TOPs));
RETURN;
}
PP(pp_chomp)
{
- dSP; dMARK; dTARGET;
+ djSP; dMARK; dTARGET;
register I32 count = 0;
while (SP > MARK)
@@ -638,7 +629,7 @@ PP(pp_chomp)
PP(pp_defined)
{
- dSP;
+ djSP;
register SV* sv;
sv = POPs;
@@ -668,7 +659,7 @@ PP(pp_defined)
PP(pp_undef)
{
- dSP;
+ djSP;
SV *sv;
if (!op->op_private) {
@@ -726,7 +717,7 @@ PP(pp_undef)
PP(pp_predec)
{
- dSP;
+ djSP;
if (SvREADONLY(TOPs) || SvTYPE(TOPs) > SVt_PVLV)
croak(no_modify);
if (SvIOK(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs) &&
@@ -743,7 +734,7 @@ PP(pp_predec)
PP(pp_postinc)
{
- dSP; dTARGET;
+ djSP; dTARGET;
if (SvREADONLY(TOPs) || SvTYPE(TOPs) > SVt_PVLV)
croak(no_modify);
sv_setsv(TARG, TOPs);
@@ -764,7 +755,7 @@ PP(pp_postinc)
PP(pp_postdec)
{
- dSP; dTARGET;
+ djSP; dTARGET;
if(SvREADONLY(TOPs) || SvTYPE(TOPs) > SVt_PVLV)
croak(no_modify);
sv_setsv(TARG, TOPs);
@@ -785,7 +776,7 @@ PP(pp_postdec)
PP(pp_pow)
{
- dSP; dATARGET; tryAMAGICbin(pow,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(pow,opASSIGN);
{
dPOPTOPnnrl;
SETn( pow( left, right) );
@@ -795,7 +786,7 @@ PP(pp_pow)
PP(pp_multiply)
{
- dSP; dATARGET; tryAMAGICbin(mult,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(mult,opASSIGN);
{
dPOPTOPnnrl;
SETn( left * right );
@@ -805,7 +796,7 @@ PP(pp_multiply)
PP(pp_divide)
{
- dSP; dATARGET; tryAMAGICbin(div,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(div,opASSIGN);
{
dPOPPOPnnrl;
double value;
@@ -833,7 +824,7 @@ PP(pp_divide)
PP(pp_modulo)
{
- dSP; dATARGET; tryAMAGICbin(mod,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(mod,opASSIGN);
{
UV left;
UV right;
@@ -868,8 +859,8 @@ PP(pp_modulo)
if (right_neg) {
/* XXX may warn: unary minus operator applied to unsigned type */
/* could change -foo to be (~foo)+1 instead */
- if (ans <= -(UV)IV_MAX)
- sv_setiv(TARG, (IV) -ans);
+ if (ans <= ~((UV)IV_MAX)+1)
+ sv_setiv(TARG, ~ans+1);
else
sv_setnv(TARG, -(double)ans);
}
@@ -882,7 +873,7 @@ PP(pp_modulo)
PP(pp_repeat)
{
- dSP; dATARGET; tryAMAGICbin(repeat,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(repeat,opASSIGN);
{
register I32 count = POPi;
if (GIMME == G_ARRAY && op->op_private & OPpREPEAT_DOLIST) {
@@ -938,7 +929,7 @@ PP(pp_repeat)
PP(pp_subtract)
{
- dSP; dATARGET; tryAMAGICbin(subtr,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(subtr,opASSIGN);
{
dPOPTOPnnrl_ul;
SETn( left - right );
@@ -948,7 +939,7 @@ PP(pp_subtract)
PP(pp_left_shift)
{
- dSP; dATARGET; tryAMAGICbin(lshift,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(lshift,opASSIGN);
{
IBW shift = POPi;
if (op->op_private & HINT_INTEGER) {
@@ -967,7 +958,7 @@ PP(pp_left_shift)
PP(pp_right_shift)
{
- dSP; dATARGET; tryAMAGICbin(rshift,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(rshift,opASSIGN);
{
IBW shift = POPi;
if (op->op_private & HINT_INTEGER) {
@@ -986,7 +977,7 @@ PP(pp_right_shift)
PP(pp_lt)
{
- dSP; tryAMAGICbinSET(lt,0);
+ djSP; tryAMAGICbinSET(lt,0);
{
dPOPnv;
SETs(boolSV(TOPn < value));
@@ -996,7 +987,7 @@ PP(pp_lt)
PP(pp_gt)
{
- dSP; tryAMAGICbinSET(gt,0);
+ djSP; tryAMAGICbinSET(gt,0);
{
dPOPnv;
SETs(boolSV(TOPn > value));
@@ -1006,7 +997,7 @@ PP(pp_gt)
PP(pp_le)
{
- dSP; tryAMAGICbinSET(le,0);
+ djSP; tryAMAGICbinSET(le,0);
{
dPOPnv;
SETs(boolSV(TOPn <= value));
@@ -1016,7 +1007,7 @@ PP(pp_le)
PP(pp_ge)
{
- dSP; tryAMAGICbinSET(ge,0);
+ djSP; tryAMAGICbinSET(ge,0);
{
dPOPnv;
SETs(boolSV(TOPn >= value));
@@ -1026,7 +1017,7 @@ PP(pp_ge)
PP(pp_ne)
{
- dSP; tryAMAGICbinSET(ne,0);
+ djSP; tryAMAGICbinSET(ne,0);
{
dPOPnv;
SETs(boolSV(TOPn != value));
@@ -1036,7 +1027,7 @@ PP(pp_ne)
PP(pp_ncmp)
{
- dSP; dTARGET; tryAMAGICbin(ncmp,0);
+ djSP; dTARGET; tryAMAGICbin(ncmp,0);
{
dPOPTOPnnrl;
I32 value;
@@ -1058,7 +1049,7 @@ PP(pp_ncmp)
PP(pp_slt)
{
- dSP; tryAMAGICbinSET(slt,0);
+ djSP; tryAMAGICbinSET(slt,0);
{
dPOPTOPssrl;
int cmp = ((op->op_private & OPpLOCALE)
@@ -1071,7 +1062,7 @@ PP(pp_slt)
PP(pp_sgt)
{
- dSP; tryAMAGICbinSET(sgt,0);
+ djSP; tryAMAGICbinSET(sgt,0);
{
dPOPTOPssrl;
int cmp = ((op->op_private & OPpLOCALE)
@@ -1084,7 +1075,7 @@ PP(pp_sgt)
PP(pp_sle)
{
- dSP; tryAMAGICbinSET(sle,0);
+ djSP; tryAMAGICbinSET(sle,0);
{
dPOPTOPssrl;
int cmp = ((op->op_private & OPpLOCALE)
@@ -1097,7 +1088,7 @@ PP(pp_sle)
PP(pp_sge)
{
- dSP; tryAMAGICbinSET(sge,0);
+ djSP; tryAMAGICbinSET(sge,0);
{
dPOPTOPssrl;
int cmp = ((op->op_private & OPpLOCALE)
@@ -1110,7 +1101,7 @@ PP(pp_sge)
PP(pp_seq)
{
- dSP; tryAMAGICbinSET(seq,0);
+ djSP; tryAMAGICbinSET(seq,0);
{
dPOPTOPssrl;
SETs(boolSV(sv_eq(left, right)));
@@ -1120,7 +1111,7 @@ PP(pp_seq)
PP(pp_sne)
{
- dSP; tryAMAGICbinSET(sne,0);
+ djSP; tryAMAGICbinSET(sne,0);
{
dPOPTOPssrl;
SETs(boolSV(!sv_eq(left, right)));
@@ -1130,7 +1121,7 @@ PP(pp_sne)
PP(pp_scmp)
{
- dSP; dTARGET; tryAMAGICbin(scmp,0);
+ djSP; dTARGET; tryAMAGICbin(scmp,0);
{
dPOPTOPssrl;
int cmp = ((op->op_private & OPpLOCALE)
@@ -1143,7 +1134,7 @@ PP(pp_scmp)
PP(pp_bit_and)
{
- dSP; dATARGET; tryAMAGICbin(band,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(band,opASSIGN);
{
dPOPTOPssrl;
if (SvNIOKp(left) || SvNIOKp(right)) {
@@ -1166,7 +1157,7 @@ PP(pp_bit_and)
PP(pp_bit_xor)
{
- dSP; dATARGET; tryAMAGICbin(bxor,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(bxor,opASSIGN);
{
dPOPTOPssrl;
if (SvNIOKp(left) || SvNIOKp(right)) {
@@ -1189,7 +1180,7 @@ PP(pp_bit_xor)
PP(pp_bit_or)
{
- dSP; dATARGET; tryAMAGICbin(bor,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(bor,opASSIGN);
{
dPOPTOPssrl;
if (SvNIOKp(left) || SvNIOKp(right)) {
@@ -1212,7 +1203,7 @@ PP(pp_bit_or)
PP(pp_negate)
{
- dSP; dTARGET; tryAMAGICun(neg);
+ djSP; dTARGET; tryAMAGICun(neg);
{
dTOPss;
if (SvGMAGICAL(sv))
@@ -1245,7 +1236,7 @@ PP(pp_negate)
PP(pp_not)
{
#ifdef OVERLOAD
- dSP; tryAMAGICunSET(not);
+ djSP; tryAMAGICunSET(not);
#endif /* OVERLOAD */
*stack_sp = boolSV(!SvTRUE(*stack_sp));
return NORMAL;
@@ -1253,7 +1244,7 @@ PP(pp_not)
PP(pp_complement)
{
- dSP; dTARGET; tryAMAGICun(compl);
+ djSP; dTARGET; tryAMAGICun(compl);
{
dTOPss;
if (SvNIOKp(sv)) {
@@ -1296,7 +1287,7 @@ PP(pp_complement)
PP(pp_i_multiply)
{
- dSP; dATARGET; tryAMAGICbin(mult,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(mult,opASSIGN);
{
dPOPTOPiirl;
SETi( left * right );
@@ -1306,7 +1297,7 @@ PP(pp_i_multiply)
PP(pp_i_divide)
{
- dSP; dATARGET; tryAMAGICbin(div,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(div,opASSIGN);
{
dPOPiv;
if (value == 0)
@@ -1319,7 +1310,7 @@ PP(pp_i_divide)
PP(pp_i_modulo)
{
- dSP; dATARGET; tryAMAGICbin(mod,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(mod,opASSIGN);
{
dPOPTOPiirl;
if (!right)
@@ -1331,7 +1322,7 @@ PP(pp_i_modulo)
PP(pp_i_add)
{
- dSP; dATARGET; tryAMAGICbin(add,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(add,opASSIGN);
{
dPOPTOPiirl;
SETi( left + right );
@@ -1341,7 +1332,7 @@ PP(pp_i_add)
PP(pp_i_subtract)
{
- dSP; dATARGET; tryAMAGICbin(subtr,opASSIGN);
+ djSP; dATARGET; tryAMAGICbin(subtr,opASSIGN);
{
dPOPTOPiirl;
SETi( left - right );
@@ -1351,7 +1342,7 @@ PP(pp_i_subtract)
PP(pp_i_lt)
{
- dSP; tryAMAGICbinSET(lt,0);
+ djSP; tryAMAGICbinSET(lt,0);
{
dPOPTOPiirl;
SETs(boolSV(left < right));
@@ -1361,7 +1352,7 @@ PP(pp_i_lt)
PP(pp_i_gt)
{
- dSP; tryAMAGICbinSET(gt,0);
+ djSP; tryAMAGICbinSET(gt,0);
{
dPOPTOPiirl;
SETs(boolSV(left > right));
@@ -1371,7 +1362,7 @@ PP(pp_i_gt)
PP(pp_i_le)
{
- dSP; tryAMAGICbinSET(le,0);
+ djSP; tryAMAGICbinSET(le,0);
{
dPOPTOPiirl;
SETs(boolSV(left <= right));
@@ -1381,7 +1372,7 @@ PP(pp_i_le)
PP(pp_i_ge)
{
- dSP; tryAMAGICbinSET(ge,0);
+ djSP; tryAMAGICbinSET(ge,0);
{
dPOPTOPiirl;
SETs(boolSV(left >= right));
@@ -1391,7 +1382,7 @@ PP(pp_i_ge)
PP(pp_i_eq)
{
- dSP; tryAMAGICbinSET(eq,0);
+ djSP; tryAMAGICbinSET(eq,0);
{
dPOPTOPiirl;
SETs(boolSV(left == right));
@@ -1401,7 +1392,7 @@ PP(pp_i_eq)
PP(pp_i_ne)
{
- dSP; tryAMAGICbinSET(ne,0);
+ djSP; tryAMAGICbinSET(ne,0);
{
dPOPTOPiirl;
SETs(boolSV(left != right));
@@ -1411,7 +1402,7 @@ PP(pp_i_ne)
PP(pp_i_ncmp)
{
- dSP; dTARGET; tryAMAGICbin(ncmp,0);
+ djSP; dTARGET; tryAMAGICbin(ncmp,0);
{
dPOPTOPiirl;
I32 value;
@@ -1429,7 +1420,7 @@ PP(pp_i_ncmp)
PP(pp_i_negate)
{
- dSP; dTARGET; tryAMAGICun(neg);
+ djSP; dTARGET; tryAMAGICun(neg);
SETi(-TOPi);
RETURN;
}
@@ -1438,7 +1429,7 @@ PP(pp_i_negate)
PP(pp_atan2)
{
- dSP; dTARGET; tryAMAGICbin(atan2,0);
+ djSP; dTARGET; tryAMAGICbin(atan2,0);
{
dPOPTOPnnrl;
SETn(atan2(left, right));
@@ -1448,7 +1439,7 @@ PP(pp_atan2)
PP(pp_sin)
{
- dSP; dTARGET; tryAMAGICun(sin);
+ djSP; dTARGET; tryAMAGICun(sin);
{
double value;
value = POPn;
@@ -1460,7 +1451,7 @@ PP(pp_sin)
PP(pp_cos)
{
- dSP; dTARGET; tryAMAGICun(cos);
+ djSP; dTARGET; tryAMAGICun(cos);
{
double value;
value = POPn;
@@ -1472,7 +1463,7 @@ PP(pp_cos)
PP(pp_rand)
{
- dSP; dTARGET;
+ djSP; dTARGET;
double value;
if (MAXARG < 1)
value = 1.0;
@@ -1503,7 +1494,7 @@ PP(pp_rand)
PP(pp_srand)
{
- dSP;
+ djSP;
UV anum;
if (MAXARG < 1)
anum = seed();
@@ -1570,7 +1561,7 @@ seed(void)
PP(pp_exp)
{
- dSP; dTARGET; tryAMAGICun(exp);
+ djSP; dTARGET; tryAMAGICun(exp);
{
double value;
value = POPn;
@@ -1582,7 +1573,7 @@ PP(pp_exp)
PP(pp_log)
{
- dSP; dTARGET; tryAMAGICun(log);
+ djSP; dTARGET; tryAMAGICun(log);
{
double value;
value = POPn;
@@ -1598,7 +1589,7 @@ PP(pp_log)
PP(pp_sqrt)
{
- dSP; dTARGET; tryAMAGICun(sqrt);
+ djSP; dTARGET; tryAMAGICun(sqrt);
{
double value;
value = POPn;
@@ -1614,7 +1605,7 @@ PP(pp_sqrt)
PP(pp_int)
{
- dSP; dTARGET;
+ djSP; dTARGET;
{
double value = TOPn;
IV iv;
@@ -1642,7 +1633,7 @@ PP(pp_int)
PP(pp_abs)
{
- dSP; dTARGET; tryAMAGICun(abs);
+ djSP; dTARGET; tryAMAGICun(abs);
{
double value = TOPn;
IV iv;
@@ -1664,7 +1655,7 @@ PP(pp_abs)
PP(pp_hex)
{
- dSP; dTARGET;
+ djSP; dTARGET;
char *tmps;
I32 argtype;
@@ -1675,7 +1666,7 @@ PP(pp_hex)
PP(pp_oct)
{
- dSP; dTARGET;
+ djSP; dTARGET;
UV value;
I32 argtype;
char *tmps;
@@ -1697,14 +1688,14 @@ PP(pp_oct)
PP(pp_length)
{
- dSP; dTARGET;
+ djSP; dTARGET;
SETi( sv_len(TOPs) );
RETURN;
}
PP(pp_substr)
{
- dSP; dTARGET;
+ djSP; dTARGET;
SV *sv;
I32 len;
STRLEN curlen;
@@ -1791,7 +1782,7 @@ PP(pp_substr)
PP(pp_vec)
{
- dSP; dTARGET;
+ djSP; dTARGET;
register I32 size = POPi;
register I32 offset = POPi;
register SV *src = POPs;
@@ -1865,7 +1856,7 @@ PP(pp_vec)
PP(pp_index)
{
- dSP; dTARGET;
+ djSP; dTARGET;
SV *big;
SV *little;
I32 offset;
@@ -1897,7 +1888,7 @@ PP(pp_index)
PP(pp_rindex)
{
- dSP; dTARGET;
+ djSP; dTARGET;
SV *big;
SV *little;
STRLEN blen;
@@ -1934,7 +1925,7 @@ PP(pp_rindex)
PP(pp_sprintf)
{
- dSP; dMARK; dORIGMARK; dTARGET;
+ djSP; dMARK; dORIGMARK; dTARGET;
#ifdef USE_LOCALE_NUMERIC
if (op->op_private & OPpLOCALE)
SET_NUMERIC_LOCAL();
@@ -1950,7 +1941,7 @@ PP(pp_sprintf)
PP(pp_ord)
{
- dSP; dTARGET;
+ djSP; dTARGET;
I32 value;
char *tmps;
@@ -1969,7 +1960,7 @@ PP(pp_ord)
PP(pp_chr)
{
- dSP; dTARGET;
+ djSP; dTARGET;
char *tmps;
(void)SvUPGRADE(TARG,SVt_PV);
@@ -1985,7 +1976,7 @@ PP(pp_chr)
PP(pp_crypt)
{
- dSP; dTARGET; dPOPTOPssrl;
+ djSP; dTARGET; dPOPTOPssrl;
#ifdef HAS_CRYPT
char *tmps = SvPV(left, na);
#ifdef FCRYPT
@@ -2003,7 +1994,7 @@ PP(pp_crypt)
PP(pp_ucfirst)
{
- dSP;
+ djSP;
SV *sv = TOPs;
register char *s;
@@ -2029,7 +2020,7 @@ PP(pp_ucfirst)
PP(pp_lcfirst)
{
- dSP;
+ djSP;
SV *sv = TOPs;
register char *s;
@@ -2056,7 +2047,7 @@ PP(pp_lcfirst)
PP(pp_uc)
{
- dSP;
+ djSP;
SV *sv = TOPs;
register char *s;
STRLEN len;
@@ -2088,7 +2079,7 @@ PP(pp_uc)
PP(pp_lc)
{
- dSP;
+ djSP;
SV *sv = TOPs;
register char *s;
STRLEN len;
@@ -2120,7 +2111,7 @@ PP(pp_lc)
PP(pp_quotemeta)
{
- dSP; dTARGET;
+ djSP; dTARGET;
SV *sv = TOPs;
STRLEN len;
register char *s = SvPV(sv,len);
@@ -2149,7 +2140,7 @@ PP(pp_quotemeta)
PP(pp_aslice)
{
- dSP; dMARK; dORIGMARK;
+ djSP; dMARK; dORIGMARK;
register SV** svp;
register AV* av = (AV*)POPs;
register I32 lval = op->op_flags & OPf_MOD;
@@ -2194,7 +2185,7 @@ PP(pp_aslice)
PP(pp_each)
{
- dSP; dTARGET;
+ djSP; dTARGET;
HV *hash = (HV*)POPs;
HE *entry;
I32 gimme = GIMME_V;
@@ -2235,7 +2226,7 @@ PP(pp_keys)
PP(pp_delete)
{
- dSP;
+ djSP;
I32 gimme = GIMME_V;
I32 discard = (gimme == G_VOID) ? G_DISCARD : 0;
SV *sv;
@@ -2282,7 +2273,7 @@ PP(pp_delete)
PP(pp_exists)
{
- dSP;
+ djSP;
SV *tmpsv = POPs;
HV *hv = (HV*)POPs;
if (SvTYPE(hv) == SVt_PVHV) {
@@ -2299,7 +2290,7 @@ PP(pp_exists)
PP(pp_hslice)
{
- dSP; dMARK; dORIGMARK;
+ djSP; dMARK; dORIGMARK;
register HE *he;
register HV *hv = (HV*)POPs;
register I32 lval = op->op_flags & OPf_MOD;
@@ -2336,7 +2327,7 @@ PP(pp_hslice)
PP(pp_list)
{
- dSP; dMARK;
+ djSP; dMARK;
if (GIMME != G_ARRAY) {
if (++MARK <= SP)
*MARK = *SP; /* unwanted list, return last item */
@@ -2349,7 +2340,7 @@ PP(pp_list)
PP(pp_lslice)
{
- dSP;
+ djSP;
SV **lastrelem = stack_sp;
SV **lastlelem = stack_base + POPMARK;
SV **firstlelem = stack_base + POPMARK + 1;
@@ -2407,7 +2398,7 @@ PP(pp_lslice)
PP(pp_anonlist)
{
- dSP; dMARK; dORIGMARK;
+ djSP; dMARK; dORIGMARK;
I32 items = SP - MARK;
SV *av = sv_2mortal((SV*)av_make(items, MARK+1));
SP = ORIGMARK; /* av_make() might realloc stack_sp */
@@ -2417,7 +2408,7 @@ PP(pp_anonlist)
PP(pp_anonhash)
{
- dSP; dMARK; dORIGMARK;
+ djSP; dMARK; dORIGMARK;
HV* hv = (HV*)sv_2mortal((SV*)newHV());
while (MARK < SP) {
@@ -2436,7 +2427,7 @@ PP(pp_anonhash)
PP(pp_splice)
{
- dSP; dMARK; dORIGMARK;
+ djSP; dMARK; dORIGMARK;
register AV *ary = (AV*)*++MARK;
register SV **src;
register SV **dst;
@@ -2631,7 +2622,7 @@ PP(pp_splice)
PP(pp_push)
{
- dSP; dMARK; dORIGMARK; dTARGET;
+ djSP; dMARK; dORIGMARK; dTARGET;
register AV *ary = (AV*)*++MARK;
register SV *sv = &sv_undef;
@@ -2648,7 +2639,7 @@ PP(pp_push)
PP(pp_pop)
{
- dSP;
+ djSP;
AV *av = (AV*)POPs;
SV *sv = av_pop(av);
if (!SvIMMORTAL(sv) && AvREAL(av))
@@ -2659,7 +2650,7 @@ PP(pp_pop)
PP(pp_shift)
{
- dSP;
+ djSP;
AV *av = (AV*)POPs;
SV *sv = av_shift(av);
EXTEND(SP, 1);
@@ -2673,7 +2664,7 @@ PP(pp_shift)
PP(pp_unshift)
{
- dSP; dMARK; dORIGMARK; dTARGET;
+ djSP; dMARK; dORIGMARK; dTARGET;
register AV *ary = (AV*)*++MARK;
register SV *sv;
register I32 i = 0;
@@ -2692,7 +2683,7 @@ PP(pp_unshift)
PP(pp_reverse)
{
- dSP; dMARK;
+ djSP; dMARK;
register SV *tmp;
SV **oldsp = SP;
@@ -2763,7 +2754,7 @@ mul128(SV *sv, U8 m)
PP(pp_unpack)
{
- dSP;
+ djSP;
dPOPPOPssrl;
SV **oldsp = sp;
I32 gimme = GIMME_V;
@@ -3401,10 +3392,10 @@ PP(pp_unpack)
d = (*s++ - ' ') & 077;
else
d = 0;
- hunk[0] = a << 2 | b >> 4;
- hunk[1] = b << 4 | c >> 2;
- hunk[2] = c << 6 | d;
- sv_catpvn(sv, hunk, len > 3 ? 3 : len);
+ hunk[0] = (a << 2) | (b >> 4);
+ hunk[1] = (b << 4) | (c >> 2);
+ hunk[2] = (c << 6) | d;
+ sv_catpvn(sv, hunk, (len > 3) ? 3 : len);
len -= 3;
}
if (*s == '\n')
@@ -3464,8 +3455,8 @@ doencodes(register SV *sv, register char *s, register I32 len)
hunk[4] = '\0';
while (len > 0) {
hunk[0] = ' ' + (077 & (*s >> 2));
- hunk[1] = ' ' + (077 & ((*s << 4) & 060 | (s[1] >> 4) & 017));
- hunk[2] = ' ' + (077 & ((s[1] << 2) & 074 | (s[2] >> 6) & 03));
+ hunk[1] = ' ' + (077 & (((*s << 4) & 060) | ((s[1] >> 4) & 017)));
+ hunk[2] = ' ' + (077 & (((s[1] << 2) & 074) | ((s[2] >> 6) & 03)));
hunk[3] = ' ' + (077 & (s[2] & 077));
sv_catpvn(sv, hunk, 4);
s += 3;
@@ -3557,7 +3548,7 @@ div128(SV *pnum, char *done)
PP(pp_pack)
{
- dSP; dMARK; dORIGMARK; dTARGET;
+ djSP; dMARK; dORIGMARK; dTARGET;
register SV *cat = TARG;
register I32 items;
STRLEN fromlen;
@@ -4023,7 +4014,7 @@ PP(pp_pack)
PP(pp_split)
{
- dSP; dTARG;
+ djSP; dTARG;
AV *ary;
register I32 limit = POPi; /* note, negative is forever */
SV *sv = POPs;
@@ -4273,7 +4264,7 @@ unlock_condpair(void *svv)
PP(pp_lock)
{
- dSP;
+ djSP;
dTOPss;
SV *retsv = sv;
#ifdef USE_THREADS
@@ -4305,14 +4296,4 @@ PP(pp_lock)
RETURN;
}
-PP(pp_specific)
-{
-#ifdef USE_THREADS
- dSP;
- SV **svp = av_fetch(thr->specific, op->op_targ, TRUE);
- XPUSHs(svp ? *svp : &sv_undef);
-#else
- DIE("tried to access thread-specific data in non-threaded perl");
-#endif /* USE_THREADS */
- RETURN;
-}
+