diff options
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 60 |
1 files changed, 30 insertions, 30 deletions
@@ -126,9 +126,9 @@ PP(pp_substcont) register char *s = cx->sb_s; register char *m = cx->sb_m; char *orig = cx->sb_orig; - register REGEXP *prx = cx->sb_rx; + register REGEXP *rx = cx->sb_rx; - rxres_restore(&cx->sb_rxres, prx); + rxres_restore(&cx->sb_rxres, rx); if (cx->sb_iters++) { if (cx->sb_iters > cx->sb_maxiters) @@ -139,14 +139,14 @@ PP(pp_substcont) sv_catsv(dstr, POPs); /* Are we done */ - if (cx->sb_once || !regexec_flags(prx, s, cx->sb_strend, orig, + if (cx->sb_once || !regexec_flags(rx, s, cx->sb_strend, orig, s == m, Nullsv, NULL, cx->sb_safebase ? 0 : REXEC_COPY_STR)) { SV *targ = cx->sb_targ; sv_catpvn(dstr, s, cx->sb_strend - s); - TAINT_IF(cx->sb_rxtainted || RX_MATCH_TAINTED(prx)); + TAINT_IF(cx->sb_rxtainted || RX_MATCH_TAINTED(rx)); (void)SvOOK_off(targ); Safefree(SvPVX(targ)); @@ -165,29 +165,29 @@ PP(pp_substcont) RETURNOP(pm->op_next); } } - if (prx->subbase && prx->subbase != orig) { + if (rx->subbase && rx->subbase != orig) { m = s; s = orig; - cx->sb_orig = orig = prx->subbase; + cx->sb_orig = orig = rx->subbase; s = orig + (m - s); cx->sb_strend = s + (cx->sb_strend - m); } - cx->sb_m = m = prx->startp[0]; + cx->sb_m = m = rx->startp[0]; sv_catpvn(dstr, s, m-s); - cx->sb_s = prx->endp[0]; - cx->sb_rxtainted |= RX_MATCH_TAINTED(prx); - rxres_save(&cx->sb_rxres, prx); + cx->sb_s = rx->endp[0]; + cx->sb_rxtainted |= RX_MATCH_TAINTED(rx); + rxres_save(&cx->sb_rxres, rx); RETURNOP(pm->op_pmreplstart); } void -rxres_save(void **rsp, REGEXP *prx) +rxres_save(void **rsp, REGEXP *rx) { UV *p = (UV*)*rsp; U32 i; - if (!p || p[1] < prx->nparens) { - i = 6 + prx->nparens * 2; + if (!p || p[1] < rx->nparens) { + i = 6 + rx->nparens * 2; if (!p) New(501, p, i, UV); else @@ -195,36 +195,36 @@ rxres_save(void **rsp, REGEXP *prx) *rsp = (void*)p; } - *p++ = (UV)prx->subbase; - prx->subbase = Nullch; + *p++ = (UV)rx->subbase; + rx->subbase = Nullch; - *p++ = prx->nparens; + *p++ = rx->nparens; - *p++ = (UV)prx->subbeg; - *p++ = (UV)prx->subend; - for (i = 0; i <= prx->nparens; ++i) { - *p++ = (UV)prx->startp[i]; - *p++ = (UV)prx->endp[i]; + *p++ = (UV)rx->subbeg; + *p++ = (UV)rx->subend; + for (i = 0; i <= rx->nparens; ++i) { + *p++ = (UV)rx->startp[i]; + *p++ = (UV)rx->endp[i]; } } void -rxres_restore(void **rsp, REGEXP *prx) +rxres_restore(void **rsp, REGEXP *rx) { UV *p = (UV*)*rsp; U32 i; - Safefree(prx->subbase); - prx->subbase = (char*)(*p); + Safefree(rx->subbase); + rx->subbase = (char*)(*p); *p++ = 0; - prx->nparens = *p++; + rx->nparens = *p++; - prx->subbeg = (char*)(*p++); - prx->subend = (char*)(*p++); - for (i = 0; i <= prx->nparens; ++i) { - prx->startp[i] = (char*)(*p++); - prx->endp[i] = (char*)(*p++); + rx->subbeg = (char*)(*p++); + rx->subend = (char*)(*p++); + for (i = 0; i <= rx->nparens; ++i) { + rx->startp[i] = (char*)(*p++); + rx->endp[i] = (char*)(*p++); } } |