diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-22 23:45:35 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-22 23:45:35 +0000 |
commit | b8d68ded2ba9139a0c1050157b6f240617f5dd65 (patch) | |
tree | 4a7ab7019c39ce77d5b7b83519d9767851f765d1 /regexec.c | |
parent | bc517b45fdfb539b223ef3bf8d22272436835518 (diff) | |
download | perl-b8d68ded2ba9139a0c1050157b6f240617f5dd65.tar.gz |
Small tweaks.
p4raw-id: //depot/perl@13856
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -393,11 +393,22 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, SV *dsv = PERL_DEBUG_PAD_ZERO(0); #endif + if (prog->reganch & ROPT_UTF8) { + DEBUG_r(PerlIO_printf(Perl_debug_log, + "UTF-8 regex...\n")); + PL_reg_flags |= RF_utf8; + } + DEBUG_r({ - char*s = UTF ? sv_uni_display(dsv, sv, 60, 0) : strpos; - int len = UTF ? strlen(s) : strend - strpos; + char *s = PL_reg_match_utf8 ? + sv_uni_display(dsv, sv, 60, 0) : strpos; + int len = PL_reg_match_utf8 ? + strlen(s) : strend - strpos; if (!PL_colorset) reginitcolors(); + if (PL_reg_match_utf8) + DEBUG_r(PerlIO_printf(Perl_debug_log, + "UTF-8 target...\n")); PerlIO_printf(Perl_debug_log, "%sGuessing start of match, REx%s `%s%.60s%s%s' against `%s%.*s%s%s'...\n", PL_colors[4],PL_colors[5],PL_colors[0], @@ -411,9 +422,6 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, ); }); - if (prog->reganch & ROPT_UTF8) - PL_reg_flags |= RF_utf8; - if (prog->minlen > CHR_DIST((U8*)strend, (U8*)strpos)) { DEBUG_r(PerlIO_printf(Perl_debug_log, "String too short... [re_intuit_start]\n")); |