diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-24 14:08:39 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-24 14:08:39 +0000 |
commit | 2a782b5b3455b969a393225d1de6c0e14aaee79e (patch) | |
tree | 921c8c607373c4a09e35d77295d2950ec70134e9 /regcomp.c | |
parent | cd946ae2db3ce03071a574749334dedf51f8a29b (diff) | |
download | perl-2a782b5b3455b969a393225d1de6c0e14aaee79e.tar.gz |
Dump Unicode better for re 'debug'. The regprop()
is unfinished since have to figure out how to detect
Unicodeness in there.
p4raw-id: //depot/perl@12621
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -4409,9 +4409,19 @@ Perl_regprop(pTHX_ SV *sv, regnode *o) k = PL_regkind[(U8)OP(o)]; - if (k == EXACT) - Perl_sv_catpvf(aTHX_ sv, " <%s%.*s%s>", PL_colors[0], - STR_LEN(o), STRING(o), PL_colors[1]); + if (k == EXACT) { + SV *dsv = sv_2mortal(newSVpvn("", 0)); + char *s = 0 ? + pv_uni_display(dsv, (U8*)STRING(o), STR_LEN(o), 60, 0) : + STRING(o); + STRLEN len = 0 ? + strlen(s) : + STR_LEN(o); + Perl_sv_catpvf(aTHX_ sv, " <%s%.*s%s>", + PL_colors[0], + len, s, + PL_colors[1]); + } else if (k == CURLY) { if (OP(o) == CURLYM || OP(o) == CURLYN || OP(o) == CURLYX) Perl_sv_catpvf(aTHX_ sv, "[%d]", o->flags); /* Parenth number */ @@ -4492,7 +4502,7 @@ Perl_regprop(pTHX_ SV *sv, regnode *o) if (flags & ANYOF_UNICODE) sv_catpv(sv, "{unicode}"); else if (flags & ANYOF_UNICODE_ALL) - sv_catpv(sv, "{all-unicode}"); + sv_catpv(sv, "{unicode_all}"); { SV *lv; |