From: Peter Prymmer Date: Thu, 25 Nov 1999 21:06:19 +0000 (-0800) Subject: implement /[:ascii:]/ on ebcdic machines X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a5993822807cbbbe69966799e15dc70f210f7f24;p=p5sagit%2Fp5-mst-13.2.git implement /[:ascii:]/ on ebcdic machines Message-Id: <199911260506.VAA17230@brio.forte.com> p4raw-id: //depot/perl@4626 --- diff --git a/regcomp.c b/regcomp.c index 65db009..0d6b581 100644 --- a/regcomp.c +++ b/regcomp.c @@ -2491,16 +2491,28 @@ S_regclass(pTHX) if (LOC) ANYOF_CLASS_SET(ret, ANYOF_ASCII); else { +#ifdef ASCIIish for (value = 0; value < 128; value++) ANYOF_BITMAP_SET(ret, value); +#else /* EBCDIC */ + for (value = 0; value < 256; value++) + if (isASCII(value)) + ANYOF_BITMAP_SET(ret, value); +#endif /* EBCDIC */ } break; case ANYOF_NASCII: if (LOC) ANYOF_CLASS_SET(ret, ANYOF_NASCII); else { +#ifdef ASCIIish for (value = 128; value < 256; value++) ANYOF_BITMAP_SET(ret, value); +#else /* EBCDIC */ + for (value = 0; value < 256; value++) + if (!isASCII(value)) + ANYOF_BITMAP_SET(ret, value); +#endif /* EBCDIC */ } break; case ANYOF_CNTRL: