#define regrepeat_hard S_regrepeat_hard
#define regtry S_regtry
#define reginclass S_reginclass
-#define reginclasslen S_reginclasslen
#define regcppush S_regcppush
#define regcppop S_regcppop
#define regcp_set_to S_regcp_set_to
#define regrepeat(a,b) S_regrepeat(aTHX_ a,b)
#define regrepeat_hard(a,b,c) S_regrepeat_hard(aTHX_ a,b,c)
#define regtry(a,b) S_regtry(aTHX_ a,b)
-#define reginclass(a,b,c) S_reginclass(aTHX_ a,b,c)
-#define reginclasslen(a,b,c,d) S_reginclasslen(aTHX_ a,b,c,d)
+#define reginclass(a,b,c,d) S_reginclass(aTHX_ a,b,c,d)
#define regcppush(a) S_regcppush(aTHX_ a)
#define regcppop() S_regcppop(aTHX)
#define regcp_set_to(a) S_regcp_set_to(aTHX_ a)
STATIC I32 S_regrepeat(pTHX_ regnode *p, I32 max);
STATIC I32 S_regrepeat_hard(pTHX_ regnode *p, I32 max, I32 *lp);
STATIC I32 S_regtry(pTHX_ regexp *prog, char *startpos);
-STATIC bool S_reginclass(pTHX_ regnode *n, U8 *p, bool do_utf8sv_is_utf8);
-STATIC bool S_reginclasslen(pTHX_ regnode *n, U8 *p, STRLEN *lenp, bool do_utf8sv_is_utf8);
+STATIC bool S_reginclass(pTHX_ regnode *n, U8 *p, STRLEN *lenp, bool do_utf8sv_is_utf8);
STATIC CHECKPOINT S_regcppush(pTHX_ I32 parenfloor);
STATIC char* S_regcppop(pTHX);
STATIC char* S_regcp_set_to(pTHX_ I32 ss);
#define STATIC static
#endif
-#define REGINCLASS(p,c) (ANYOF_FLAGS(p) ? reginclasslen(p,c,0,0) : ANYOF_BITMAP_TEST(p,*(c)))
+#define REGINCLASS(p,c) (ANYOF_FLAGS(p) ? reginclass(p,c,0,0) : ANYOF_BITMAP_TEST(p,*(c)))
/*
* Forwards.
STRLEN skip = do_utf8 ? UTF8SKIP(s) : 1;
if (do_utf8 ?
- reginclasslen(c, (U8*)s, 0, do_utf8) :
+ reginclass(c, (U8*)s, 0, do_utf8) :
REGINCLASS(c, (U8*)s) ||
(ANYOF_FOLD_SHARP_S(c, s, strend) &&
/* The assignment of 2 is intentional:
if (do_utf8) {
STRLEN inclasslen = PL_regeol - locinput;
- if (!reginclasslen(scan, (U8*)locinput, &inclasslen, do_utf8))
+ if (!reginclass(scan, (U8*)locinput, &inclasslen, do_utf8))
sayNO_ANYOF;
if (locinput >= PL_regeol)
sayNO;
if (do_utf8) {
loceol = PL_regeol;
while (hardcount < max && scan < loceol &&
- reginclasslen(p, (U8*)scan, 0, do_utf8)) {
+ reginclass(p, (U8*)scan, 0, do_utf8)) {
scan += UTF8SKIP(scan);
hardcount++;
}
}
/*
- - reginclasslen - determine if a character falls into a character class
+ - reginclass - determine if a character falls into a character class
The n is the ANYOF regnode, the p is the target string, lenp
is pointer to the maximum length of how far to go in the p
*/
STATIC bool
-S_reginclasslen(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, register bool do_utf8)
+S_reginclass(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, register bool do_utf8)
{
char flags = ANYOF_FLAGS(n);
bool match = FALSE;
return (flags & ANYOF_INVERT) ? !match : match;
}
-/*
- - reginclass - determine if a character falls into a character class
-
- The n is the ANYOF regnode, the p is the target string, do_utf8 tells
- whether the target string is in UTF-8.
-
- */
-
-STATIC bool
-S_reginclass(pTHX_ register regnode *n, register U8* p, register bool do_utf8)
-{
- return S_reginclasslen(aTHX_ n, p, 0, do_utf8);
-}
-
STATIC U8 *
S_reghop(pTHX_ U8 *s, I32 off)
{