diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1998-11-27 11:16:48 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-28 19:23:53 +0000 |
commit | 364723c2ea2c2681016fad994c4f40cc3a0bb17d (patch) | |
tree | 4e88b4c147419b329cbaad35a2788a43645d09da | |
parent | d88dccdfb395b1157f084b2065b4dae06e68381b (diff) | |
download | perl-364723c2ea2c2681016fad994c4f40cc3a0bb17d.tar.gz |
better -Mre=debugcolor
Message-Id: <199811272116.QAA03502@monk.mps.ohio-state.edu>
p4raw-id: //depot/perl@2371
-rw-r--r-- | embedvar.h | 3 | ||||
-rw-r--r-- | objXSUB.h | 2 | ||||
-rw-r--r-- | regexec.c | 3 | ||||
-rw-r--r-- | thrdvar.h | 1 |
4 files changed, 8 insertions, 1 deletions
diff --git a/embedvar.h b/embedvar.h index b1aad3aca1..9d82427948 100644 --- a/embedvar.h +++ b/embedvar.h @@ -61,6 +61,7 @@ #define PL_reg_re (PL_curinterp->Treg_re) #define PL_reg_start_tmp (PL_curinterp->Treg_start_tmp) #define PL_reg_start_tmpl (PL_curinterp->Treg_start_tmpl) +#define PL_reg_starttry (PL_curinterp->Treg_starttry) #define PL_reg_sv (PL_curinterp->Treg_sv) #define PL_regbol (PL_curinterp->Tregbol) #define PL_regcc (PL_curinterp->Tregcc) @@ -449,6 +450,7 @@ #define PL_Treg_re PL_reg_re #define PL_Treg_start_tmp PL_reg_start_tmp #define PL_Treg_start_tmpl PL_reg_start_tmpl +#define PL_Treg_starttry PL_reg_starttry #define PL_Treg_sv PL_reg_sv #define PL_Tregbol PL_regbol #define PL_Tregcc PL_regcc @@ -580,6 +582,7 @@ #define PL_reg_re (thr->Treg_re) #define PL_reg_start_tmp (thr->Treg_start_tmp) #define PL_reg_start_tmpl (thr->Treg_start_tmpl) +#define PL_reg_starttry (thr->Treg_starttry) #define PL_reg_sv (thr->Treg_sv) #define PL_regbol (thr->Tregbol) #define PL_regcc (thr->Tregcc) @@ -510,6 +510,8 @@ #define PL_reg_start_tmp pPerl->PL_reg_start_tmp #undef PL_reg_start_tmpl #define PL_reg_start_tmpl pPerl->PL_reg_start_tmpl +#undef PL_reg_starttry +#define PL_reg_starttry pPerl->PL_reg_starttry #undef PL_reg_sv #define PL_reg_sv pPerl->PL_reg_sv #undef PL_regbol @@ -1080,6 +1080,7 @@ regtry(regexp *prog, char *startpos) PL_reglastparen = &prog->lastparen; prog->lastparen = 0; PL_regsize = 0; + DEBUG_r(PL_reg_starttry = startpos); if (PL_reg_start_tmpl <= prog->nparens) { PL_reg_start_tmpl = prog->nparens*3/2 + 3; if(PL_reg_start_tmp) @@ -1161,7 +1162,7 @@ regmatch(regnode *prog) int l = (PL_regeol - locinput > taill ? taill : PL_regeol - locinput); int pref_len = (locinput - PL_bostr > (5 + taill) - l ? (5 + taill) - l : locinput - PL_bostr); - int pref0_len = pref_len - (locinput - PL_reginput); + int pref0_len = pref_len - (locinput - PL_reg_starttry); if (l + pref_len < (5 + taill) && l < PL_regeol - locinput) l = ( PL_regeol - locinput > (5 + taill) - pref_len @@ -167,6 +167,7 @@ PERLVARI(Tregexecp, regexec_t, FUNC_NAME_TO_PTR(regexec_flags)) /* Pointer to RE executer */ PERLVARI(Treginterp_cnt,int, 0) /* Whether `re' was interpolated. */ +PERLVARI(Treg_starttry, char *, 0) /* -Dr: where regtry was called. */ #ifdef DEBUGGING PERLVARI(Twatchaddr, char **, 0) PERLVAR(Twatchok, char *) |