From: Jarkko Hietaniemi Date: Tue, 19 Mar 2002 03:48:27 +0000 (+0000) Subject: s/regcinclasslen/reginclass/ and remove the old X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ba7b4546c787dea31508e30b5d22f5f789d3d86f;p=p5sagit%2Fp5-mst-13.2.git s/regcinclasslen/reginclass/ and remove the old reginclass since nothing is using it. p4raw-id: //depot/perl@15310 --- diff --git a/embed.fnc b/embed.fnc index 414174a..84d89d0 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1157,8 +1157,7 @@ s |I32 |regmatch |regnode *prog s |I32 |regrepeat |regnode *p|I32 max s |I32 |regrepeat_hard |regnode *p|I32 max|I32 *lp s |I32 |regtry |regexp *prog|char *startpos -s |bool |reginclass |regnode *n|U8 *p|bool do_utf8sv_is_utf8 -s |bool |reginclasslen |regnode *n|U8 *p|STRLEN *lenp|bool do_utf8sv_is_utf8 +s |bool |reginclass |regnode *n|U8 *p|STRLEN *lenp|bool do_utf8sv_is_utf8 s |CHECKPOINT|regcppush |I32 parenfloor s |char*|regcppop s |char*|regcp_set_to |I32 ss diff --git a/embed.h b/embed.h index 457c786..787a045 100644 --- a/embed.h +++ b/embed.h @@ -1079,7 +1079,6 @@ #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 @@ -2630,8 +2629,7 @@ #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) diff --git a/proto.h b/proto.h index b7515be..dad9b57 100644 --- a/proto.h +++ b/proto.h @@ -1196,8 +1196,7 @@ STATIC I32 S_regmatch(pTHX_ regnode *prog); 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); diff --git a/regexec.c b/regexec.c index 00bd6ef..59f1be1 100644 --- a/regexec.c +++ b/regexec.c @@ -96,7 +96,7 @@ #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. @@ -926,7 +926,7 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta 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: @@ -2419,7 +2419,7 @@ S_regmatch(pTHX_ regnode *prog) 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; @@ -3948,7 +3948,7 @@ S_regrepeat(pTHX_ regnode *p, I32 max) 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++; } @@ -4220,7 +4220,7 @@ Perl_regclass_swash(pTHX_ register regnode* node, bool doinit, SV** listsvp, SV } /* - - 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 @@ -4230,7 +4230,7 @@ Perl_regclass_swash(pTHX_ register regnode* node, bool doinit, SV** listsvp, SV */ 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; @@ -4346,20 +4346,6 @@ S_reginclasslen(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, registe 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) {