summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorPeter Prymmer <PPrymmer@factset.com>1999-11-25 13:06:19 -0800
committerGurusamy Sarathy <gsar@cpan.org>1999-12-03 05:36:38 +0000
commita5993822807cbbbe69966799e15dc70f210f7f24 (patch)
tree92f05d3e2acffebc5ae5d39f57c9e948f4c179b5 /regcomp.c
parent8454a2bad3d8b9699d8e0ffa06707b46e0688c78 (diff)
downloadperl-a5993822807cbbbe69966799e15dc70f210f7f24.tar.gz
implement /[:ascii:]/ on ebcdic machines
Message-Id: <199911260506.VAA17230@brio.forte.com> p4raw-id: //depot/perl@4626
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index 65db009152..0d6b581b74 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: