}
if (!SIZE_ONLY) {
+ const char *what = NULL;
+ char yesno = 0;
+
if (namedclass > OOB_NAMEDCLASS)
optimize_invert = FALSE;
/* Possible truncation here but in some 64-bit environments
if (isALNUM(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsWord\n");
+ yesno = '+';
+ what = "Word";
break;
case ANYOF_NALNUM:
if (LOC)
if (!isALNUM(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsWord\n");
+ yesno = '!';
+ what = "Word";
break;
case ANYOF_ALNUMC:
if (LOC)
if (isALNUMC(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsAlnum\n");
+ yesno = '+';
+ what = "Alnum";
break;
case ANYOF_NALNUMC:
if (LOC)
if (!isALNUMC(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsAlnum\n");
+ yesno = '!';
+ what = "Alnum";
break;
case ANYOF_ALPHA:
if (LOC)
if (isALPHA(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsAlpha\n");
+ yesno = '+';
+ what = "Alpha";
break;
case ANYOF_NALPHA:
if (LOC)
if (!isALPHA(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsAlpha\n");
+ yesno = '!';
+ what = "Alpha";
break;
case ANYOF_ASCII:
if (LOC)
}
#endif /* EBCDIC */
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsASCII\n");
+ yesno = '+';
+ what = "ASCII";
break;
case ANYOF_NASCII:
if (LOC)
}
#endif /* EBCDIC */
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsASCII\n");
+ yesno = '!';
+ what = "ASCII";
break;
case ANYOF_BLANK:
if (LOC)
if (isBLANK(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsBlank\n");
+ yesno = '+';
+ what = "Blank";
break;
case ANYOF_NBLANK:
if (LOC)
if (!isBLANK(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsBlank\n");
+ yesno = '!';
+ what = "Blank";
break;
case ANYOF_CNTRL:
if (LOC)
if (isCNTRL(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsCntrl\n");
+ yesno = '+';
+ what = "Cntrl";
break;
case ANYOF_NCNTRL:
if (LOC)
if (!isCNTRL(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsCntrl\n");
+ yesno = '!';
+ what = "Cntrl";
break;
case ANYOF_DIGIT:
if (LOC)
for (value = '0'; value <= '9'; value++)
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsDigit\n");
+ yesno = '+';
+ what = "Digit";
break;
case ANYOF_NDIGIT:
if (LOC)
for (value = '9' + 1; value < 256; value++)
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsDigit\n");
+ yesno = '!';
+ what = "Digit";
break;
case ANYOF_GRAPH:
if (LOC)
if (isGRAPH(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsGraph\n");
+ yesno = '+';
+ what = "Graph";
break;
case ANYOF_NGRAPH:
if (LOC)
if (!isGRAPH(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsGraph\n");
+ yesno = '!';
+ what = "Graph";
break;
case ANYOF_LOWER:
if (LOC)
if (isLOWER(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsLower\n");
+ yesno = '+';
+ what = "Lower";
break;
case ANYOF_NLOWER:
if (LOC)
if (!isLOWER(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsLower\n");
+ yesno = '!';
+ what = "Lower";
break;
case ANYOF_PRINT:
if (LOC)
if (isPRINT(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsPrint\n");
+ yesno = '+';
+ what = "Print";
break;
case ANYOF_NPRINT:
if (LOC)
if (!isPRINT(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsPrint\n");
+ yesno = '!';
+ what = "Print";
break;
case ANYOF_PSXSPC:
if (LOC)
if (isPSXSPC(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsSpace\n");
+ yesno = '+';
+ what = "Space";
break;
case ANYOF_NPSXSPC:
if (LOC)
if (!isPSXSPC(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsSpace\n");
+ yesno = '!';
+ what = "Space";
break;
case ANYOF_PUNCT:
if (LOC)
if (isPUNCT(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsPunct\n");
+ yesno = '+';
+ what = "Punct";
break;
case ANYOF_NPUNCT:
if (LOC)
if (!isPUNCT(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsPunct\n");
+ yesno = '!';
+ what = "Punct";
break;
case ANYOF_SPACE:
if (LOC)
if (isSPACE(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsSpacePerl\n");
+ yesno = '+';
+ what = "SpacePerl";
break;
case ANYOF_NSPACE:
if (LOC)
if (!isSPACE(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsSpacePerl\n");
+ yesno = '!';
+ what = "SpacePerl";
break;
case ANYOF_UPPER:
if (LOC)
if (isUPPER(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsUpper\n");
+ yesno = '+';
+ what = "Upper";
break;
case ANYOF_NUPPER:
if (LOC)
if (!isUPPER(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsUpper\n");
+ yesno = '!';
+ what = "Upper";
break;
case ANYOF_XDIGIT:
if (LOC)
if (isXDIGIT(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "+utf8::IsXDigit\n");
+ yesno = '+';
+ what = "XDigit";
break;
case ANYOF_NXDIGIT:
if (LOC)
if (!isXDIGIT(value))
ANYOF_BITMAP_SET(ret, value);
}
- Perl_sv_catpv(aTHX_ listsv, "!utf8::IsXDigit\n");
+ yesno = '!';
+ what = "XDigit";
break;
case ANYOF_MAX:
/* this is to handle \p and \P */
vFAIL("Invalid [::] class");
break;
}
+ if (what) {
+ /* Strings such as "+utf8::isWord\n" */
+ Perl_sv_catpvf(aTHX_ listsv, "%cutf8::Is%s\n", yesno, what);
+ }
if (LOC)
ANYOF_FLAGS(ret) |= ANYOF_CLASS;
continue;
* indent-tabs-mode: t
* End:
*
- * vim: expandtab shiftwidth=4:
+ * vim: shiftwidth=4:
*/