toke.c: Simplify some code
authorKarl Williamson <public@khwilliamson.com>
Wed, 13 Mar 2013 22:20:23 +0000 (16:20 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 29 Aug 2013 15:56:03 +0000 (09:56 -0600)
We don't have to test separately for lower vs uppercase here, as
upper/lower case A-Z and a-z are not intermixed in the gaps in A-Z and
a-z under EBCDIC.

toke.c

diff --git a/toke.c b/toke.c
index ca10735..d02019e 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3159,15 +3159,11 @@ S_scan_const(pTHX_ char *start)
 #ifdef EBCDIC
                if (literal_endpoint == 2 &&
                    ((isLOWER_A(min) && isLOWER_A(max)) ||
-                    (isUPPER_A(min) && isUPPER_A(max)))) {
-                   if (isLOWER_A(min)) {
-                       for (i = min; i <= max; i++)
-                           if (isLOWER_A(i))
-                               *d++ = i;
-                   } else {
-                       for (i = min; i <= max; i++)
-                           if (isUPPER_A(i))
-                               *d++ = i;
+                    (isUPPER_A(min) && isUPPER_A(max))))
+                {
+                    for (i = min; i <= max; i++) {
+                        if (isALPHA_A(i))
+                            *d++ = i;
                    }
                }
                else