diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-03-16 08:44:37 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-03-16 08:44:37 +0000 |
commit | ac4c12e7aee90d31d5da776601addbfd9d738a5a (patch) | |
tree | 1824760ad266d03442e71a134673c0c0837302f1 /mg.c | |
parent | a0824163008c006b841cb7ca91d331692d4ba14a (diff) | |
download | perl-ac4c12e7aee90d31d5da776601addbfd9d738a5a.tar.gz |
[asperl] various changes to get asperl working under Borland
(passes all tests when built under PERL_OBJECT)
p4raw-id: //depot/asperl@809
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 54 |
1 files changed, 27 insertions, 27 deletions
@@ -289,18 +289,18 @@ magic_len(SV *sv, MAGIC *mg) register I32 paren; register char *s; register I32 i; - register REGEXP *rx; + register REGEXP *prx; char *t; switch (*mg->mg_ptr) { case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '&': - if (curpm && (rx = curpm->op_pmregexp)) { + if (curpm && (prx = curpm->op_pmregexp)) { paren = atoi(mg->mg_ptr); getparen: - if (paren <= rx->nparens && - (s = rx->startp[paren]) && - (t = rx->endp[paren])) + if (paren <= prx->nparens && + (s = prx->startp[paren]) && + (t = prx->endp[paren])) { i = t - s; if (i >= 0) @@ -309,25 +309,25 @@ magic_len(SV *sv, MAGIC *mg) } return 0; case '+': - if (curpm && (rx = curpm->op_pmregexp)) { - paren = rx->lastparen; + if (curpm && (prx = curpm->op_pmregexp)) { + paren = prx->lastparen; if (paren) goto getparen; } return 0; case '`': - if (curpm && (rx = curpm->op_pmregexp)) { - if ((s = rx->subbeg) && rx->startp[0]) { - i = rx->startp[0] - s; + if (curpm && (prx = curpm->op_pmregexp)) { + if ((s = prx->subbeg) && prx->startp[0]) { + i = prx->startp[0] - s; if (i >= 0) return i; } } return 0; case '\'': - if (curpm && (rx = curpm->op_pmregexp)) { - if (rx->subend && (s = rx->endp[0])) { - i = rx->subend - s; + if (curpm && (prx = curpm->op_pmregexp)) { + if (prx->subend && (s = prx->endp[0])) { + i = prx->subend - s; if (i >= 0) return i; } @@ -353,7 +353,7 @@ magic_get(SV *sv, MAGIC *mg) register I32 paren; register char *s; register I32 i; - register REGEXP *rx; + register REGEXP *prx; char *t; switch (*mg->mg_ptr) { @@ -457,16 +457,16 @@ magic_get(SV *sv, MAGIC *mg) break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '&': - if (curpm && (rx = curpm->op_pmregexp)) { + if (curpm && (prx = curpm->op_pmregexp)) { /* * Pre-threads, this was paren = atoi(GvENAME((GV*)mg->mg_obj)); * XXX Does the new way break anything? */ paren = atoi(mg->mg_ptr); getparen: - if (paren <= rx->nparens && - (s = rx->startp[paren]) && - (t = rx->endp[paren])) + if (paren <= prx->nparens && + (s = prx->startp[paren]) && + (t = prx->endp[paren])) { i = t - s; getrx: @@ -478,7 +478,7 @@ magic_get(SV *sv, MAGIC *mg) } sv_setpvn(sv,s,i); if (tainting) - tainted = was_tainted || RX_MATCH_TAINTED(rx); + tainted = was_tainted || RX_MATCH_TAINTED(prx); break; } } @@ -486,26 +486,26 @@ magic_get(SV *sv, MAGIC *mg) sv_setsv(sv,&sv_undef); break; case '+': - if (curpm && (rx = curpm->op_pmregexp)) { - paren = rx->lastparen; + if (curpm && (prx = curpm->op_pmregexp)) { + paren = prx->lastparen; if (paren) goto getparen; } sv_setsv(sv,&sv_undef); break; case '`': - if (curpm && (rx = curpm->op_pmregexp)) { - if ((s = rx->subbeg) && rx->startp[0]) { - i = rx->startp[0] - s; + if (curpm && (prx = curpm->op_pmregexp)) { + if ((s = prx->subbeg) && prx->startp[0]) { + i = prx->startp[0] - s; goto getrx; } } sv_setsv(sv,&sv_undef); break; case '\'': - if (curpm && (rx = curpm->op_pmregexp)) { - if (rx->subend && (s = rx->endp[0])) { - i = rx->subend - s; + if (curpm && (prx = curpm->op_pmregexp)) { + if (prx->subend && (s = prx->endp[0])) { + i = prx->subend - s; goto getrx; } } |