[perl #45513] Test failures on amd64-freebsd 6.2
[p5sagit/p5-mst-13.2.git] / regcomp.c
index 441d762..dd48f3c 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -1405,7 +1405,20 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs
                     /* store the codepoint in the bitmap, and if its ascii
                        also store its folded equivelent. */
                     TRIE_BITMAP_SET(trie,uvc);
-                    if ( folder ) TRIE_BITMAP_SET(trie,folder[ uvc ]);
+
+                   /* store the folded codepoint */
+                   if ( folder ) TRIE_BITMAP_SET(trie,folder[ uvc ]);
+
+                   if ( !UTF ) {
+                       /* store first byte of utf8 representation of
+                          codepoints in the 127 < uvc < 256 range */
+                       if (127 < uvc && uvc < 192) {
+                           TRIE_BITMAP_SET(trie,194);
+                       } else if (191 < uvc ) {
+                           TRIE_BITMAP_SET(trie,195);
+                       /* && uvc < 256 -- we know uvc is < 256 already */
+                       }
+                   }
                     set_bit = 0; /* We've done our bit :-) */
                 }
             } else {
@@ -6831,6 +6844,7 @@ tryagain:
     case 0xCE:
         if (!LOC && FOLD) {
             U32 len,cp;
+           len=0; /* silence a spurious compiler warning */
             if ((cp = what_len_TRICKYFOLD_safe(RExC_parse,RExC_end,UTF,len))) {
                 *flagp |= HASWIDTH; /* could be SIMPLE too, but needs a handler in regexec.regrepeat */
                 RExC_parse+=len-1; /* we get one from nextchar() as well. :-( */
@@ -8790,7 +8804,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o)
            pv_pretty(dsv, STRING(o), STR_LEN(o), 60, 
                PL_colors[0], PL_colors[1],
                PERL_PV_ESCAPE_UNI_DETECT |
-               PERL_PV_PRETTY_ELIPSES    |
+               PERL_PV_PRETTY_ELLIPSES   |
                PERL_PV_PRETTY_LTGT    
             ); 
        Perl_sv_catpvf(aTHX_ sv, " %s", s );
@@ -9758,7 +9772,7 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
                     elem_ptr ? pv_pretty(sv, SvPV_nolen_const(*elem_ptr), SvCUR(*elem_ptr), 60,
                            PL_colors[0], PL_colors[1],
                            (SvUTF8(*elem_ptr) ? PERL_PV_ESCAPE_UNI : 0) |
-                           PERL_PV_PRETTY_ELIPSES    |
+                           PERL_PV_PRETTY_ELLIPSES    |
                            PERL_PV_PRETTY_LTGT
                             )
                             : "???"