From e7ae6809ba5905bb2ce7c09e88c6e2bdb5c913af Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Thu, 13 Dec 2001 14:19:28 +0000 Subject: Unadorned numbers evil. p4raw-id: //depot/perl@13672 --- regexec.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'regexec.c') diff --git a/regexec.c b/regexec.c index 4b073d2da4..35a0a6c2b0 100644 --- a/regexec.c +++ b/regexec.c @@ -932,8 +932,8 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta ln = STR_LEN(c); if (UTF) { STRLEN ulen1, ulen2; - U8 tmpbuf1[UTF8_MAXLEN*2+1]; - U8 tmpbuf2[UTF8_MAXLEN*2+1]; + U8 tmpbuf1[UTF8_MAXLEN_UCLC+1]; + U8 tmpbuf2[UTF8_MAXLEN_UCLC+1]; to_utf8_lower((U8*)m, tmpbuf1, &ulen1); to_utf8_upper((U8*)m, tmpbuf2, &ulen2); @@ -2285,7 +2285,7 @@ S_regmatch(pTHX_ regnode *prog) char *l = locinput; char *e; STRLEN ulen; - U8 tmpbuf[UTF8_MAXLEN*2+1]; + U8 tmpbuf[UTF8_MAXLEN_UCLC+1]; e = s + ln; while (s < e) { if (l >= PL_regeol) @@ -2558,8 +2558,8 @@ S_regmatch(pTHX_ regnode *prog) */ if (OP(scan) == REFF) { STRLEN ulen1, ulen2; - U8 tmpbuf1[UTF8_MAXLEN*2+1]; - U8 tmpbuf2[UTF8_MAXLEN*2+1]; + U8 tmpbuf1[UTF8_MAXLEN_UCLC+1]; + U8 tmpbuf2[UTF8_MAXLEN_UCLC+1]; while (s < e) { if (l >= PL_regeol) sayNO; @@ -3364,8 +3364,8 @@ S_regmatch(pTHX_ regnode *prog) else { /* UTF */ if (OP(text_node) == EXACTF || OP(text_node) == REFF) { STRLEN ulen1, ulen2; - U8 tmpbuf1[UTF8_MAXLEN*2+1]; - U8 tmpbuf2[UTF8_MAXLEN*2+1]; + U8 tmpbuf1[UTF8_MAXLEN_UCLC+1]; + U8 tmpbuf2[UTF8_MAXLEN_UCLC+1]; to_utf8_lower((U8*)s, tmpbuf1, &ulen1); to_utf8_upper((U8*)s, tmpbuf2, &ulen2); @@ -4110,7 +4110,7 @@ S_reginclass(pTHX_ register regnode *n, register U8* p, register bool do_utf8) match = TRUE; else if (flags & ANYOF_FOLD) { STRLEN ulen; - U8 tmpbuf[UTF8_MAXLEN*2+1]; + U8 tmpbuf[UTF8_MAXLEN_UCLC+1]; toLOWER_utf8(p, tmpbuf, &ulen); if (swash_fetch(sw, tmpbuf, do_utf8)) -- cgit v1.2.1