regexec.c: Remove no longer used code
authorKarl Williamson <public@khwilliamson.com>
Sun, 13 Feb 2011 03:26:08 +0000 (20:26 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 14 Feb 2011 15:41:39 +0000 (08:41 -0700)
A recent commit #ifdef'd this out

regexec.c

index 994fc56..cf8a68f 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -1559,147 +1559,6 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
                s += UTF8SKIP(s);
            }
            break;
-
-
-#if 0
-       case EXACTFA:
-           utf8_fold_flags = FOLDEQ_UTF8_NOMIX_ASCII;
-           goto do_exactf_non_locale;
-
-       case EXACTFU:
-       case EXACTF:
-           utf8_fold_flags = 0;
-
-       do_exactf_non_locale:
-
-           m   = STRING(c);
-           ln  = STR_LEN(c);   /* length to match in octets/bytes */
-           lnc = (I32) ln;     /* length to match in characters */
-           if (UTF_PATTERN) {
-               STRLEN ulen1, ulen2;
-               U8 *sm = (U8 *) m;
-               U8 tmpbuf1[UTF8_MAXBYTES_CASE+1];
-               U8 tmpbuf2[UTF8_MAXBYTES_CASE+1];
-               /* used by commented-out code below */
-               /*const U32 uniflags = UTF8_ALLOW_DEFAULT;*/
-               
-                /* XXX: Since the node will be case folded at compile
-                   time this logic is a little odd, although im not 
-                   sure that its actually wrong. --dmq */
-                   
-               c1 = to_utf8_lower((U8*)m, tmpbuf1, &ulen1);
-               c2 = to_utf8_upper((U8*)m, tmpbuf2, &ulen2);
-
-               /* XXX: This is kinda strange. to_utf8_XYZ returns the 
-                   codepoint of the first character in the converted
-                   form, yet originally we did the extra step. 
-                   No tests fail by commenting this code out however
-                   so Ive left it out. -- dmq.
-                   
-               c1 = utf8n_to_uvchr(tmpbuf1, UTF8_MAXBYTES_CASE, 
-                                   0, uniflags);
-               c2 = utf8n_to_uvchr(tmpbuf2, UTF8_MAXBYTES_CASE,
-                                   0, uniflags);
-                */
-                
-               lnc = 0;
-               while (sm < ((U8 *) m + ln)) {
-                   lnc++;
-                   sm += UTF8SKIP(sm);
-               }
-           }
-           else {
-               c1 = *(U8*)m;
-               if (utf8_target || OP(c) == EXACTFU) {
-
-                   /* Micro sign folds to GREEK SMALL LETTER MU;
-                      LATIN_SMALL_LETTER_SHARP_S folds to 'ss', and this sets
-                      c2 to the first 's' of the pair, and the code below will
-                      look for others */
-                   c2 = (c1 == MICRO_SIGN)
-                       ? GREEK_SMALL_LETTER_MU
-                       : (c1 == LATIN_SMALL_LETTER_SHARP_S)
-                          ? 's'
-                          : PL_fold_latin1[c1];
-               } else c2 = PL_fold[c1];
-           }
-           goto do_exactf;
-       case EXACTFL:
-           utf8_fold_flags = 0;
-           m   = STRING(c);
-           ln  = STR_LEN(c);
-           lnc = (I32) ln;
-           c1 = *(U8*)m;
-           c2 = PL_fold_locale[c1];
-         do_exactf:
-           e = HOP3c(strend, -((I32)lnc), s);
-
-           if (!reginfo && e < s)
-               e = s;                  /* Due to minlen logic of intuit() */
-
-           /* The idea in the EXACTF* cases is to first find the
-            * first character of the EXACTF* node and then, if
-            * necessary, case-insensitively compare the full
-            * text of the node.  The c1 and c2 are the first
-            * characters (though in Unicode it gets a bit
-            * more complicated because there are more cases
-            * than just upper and lower: one needs to use
-            * the so-called folding case for case-insensitive
-            * matching (called "loose matching" in Unicode).
-            * foldEQ_utf8() will do just that. */
-
-           if (utf8_target || UTF_PATTERN) {
-               UV c, f;
-               U8 tmpbuf [UTF8_MAXBYTES+1];
-               STRLEN len = 1;
-               STRLEN foldlen;
-               const U32 uniflags = UTF8_ALLOW_DEFAULT;
-               if (c1 == c2) {
-                   /* Upper and lower of 1st char are equal -
-                    * probably not a "letter". */
-                   while (s <= e) {
-                       if (utf8_target) {
-                           c = utf8n_to_uvchr((U8*)s, UTF8_MAXBYTES, &len,
-                                          uniflags);
-                        } else {
-                            c = *((U8*)s);
-                        }                                        
-                       REXEC_FBC_EXACTISH_CHECK(c == c1);
-                   }
-               }
-               else {
-                   while (s <= e) {
-                       if (utf8_target) {
-                           c = utf8n_to_uvchr((U8*)s, UTF8_MAXBYTES, &len,
-                                          uniflags);
-                        } else {
-                            c = *((U8*)s);
-                        }
-
-                       /* Handle some of the three Greek sigmas cases.
-                        * Note that not all the possible combinations
-                        * are handled here: some of them are handled
-                        * by the standard folding rules, and some of
-                        * them (the character class or ANYOF cases)
-                        * are handled during compiletime in
-                        * regexec.c:S_regclass(). */
-                       if (c == (UV)UNICODE_GREEK_CAPITAL_LETTER_SIGMA ||
-                           c == (UV)UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA)
-                           c = (UV)UNICODE_GREEK_SMALL_LETTER_SIGMA;
-
-                       REXEC_FBC_EXACTISH_CHECK(c == c1 || c == c2);
-                   }
-               }
-           }
-           else {
-               /* Neither pattern nor string are UTF8 */
-               if (c1 == c2)
-                   REXEC_FBC_EXACTISH_SCAN(*(U8*)s == c1);
-               else
-                   REXEC_FBC_EXACTISH_SCAN(*(U8*)s == c1 || *(U8*)s == c2);
-           }
-           break;
-#endif
        case BOUNDL:
            PL_reg_flags |= RF_tainted;
            FBC_BOUND(isALNUM_LC,