summaryrefslogtreecommitdiff
path: root/dist/Devel-PPPort
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-10-22 18:01:39 -0600
committerNicolas R <atoomic@cpan.org>2019-11-08 12:01:13 -0700
commit90002bec80f5bba0010349ef2bbb3f54af46a6c4 (patch)
tree23a872f0f2b93172a3d925696e64dd4d195a2b62 /dist/Devel-PPPort
parentd9e57719131a45795c10b08fd05aabacc991dcd9 (diff)
downloadperl-90002bec80f5bba0010349ef2bbb3f54af46a6c4.tar.gz
parts/inc/misc: Backport some isFOO_LC macros
A few of this class of macros did not go back very far. This makes a reasonable attempt to get things right, but very early versions may have some wrong answers, but unlikely. This was complicated by the fact that isascii() and isblank() may not be available on a given platform. So this just uses the plain non-locale version for those very early Perl versions. I didn't add tests. It is hard to portably test locales. The next commits will backport functions that call these and do have tests. (cherry picked from commit a8f88b13766d8f2820f5bba560bb282188124b34) Signed-off-by: Nicolas R <atoomic@cpan.org>
Diffstat (limited to 'dist/Devel-PPPort')
-rw-r--r--dist/Devel-PPPort/parts/inc/misc7
1 files changed, 7 insertions, 0 deletions
diff --git a/dist/Devel-PPPort/parts/inc/misc b/dist/Devel-PPPort/parts/inc/misc
index ce99e66365..f89b9ad35c 100644
--- a/dist/Devel-PPPort/parts/inc/misc
+++ b/dist/Devel-PPPort/parts/inc/misc
@@ -522,6 +522,7 @@ __UNDEFINED__ isUPPER(c) ((c) <= 'Z' && (c) >= 'A')
#endif /* Below are definitions common to EBCDIC and ASCII */
__UNDEFINED__ isASCII_L1(c) isASCII(c)
+__UNDEFINED__ isASCII_LC(c) isASCII(c)
__UNDEFINED__ isALNUM(c) isWORDCHAR(c)
__UNDEFINED__ isALNUMC(c) isALPHANUMERIC(c)
__UNDEFINED__ isALNUMC_L1(c) isALPHANUMERIC_L1(c)
@@ -529,10 +530,12 @@ __UNDEFINED__ isALPHA(c) (isUPPER(c) || isLOWER(c))
__UNDEFINED__ isALPHA_L1(c) (isUPPER_L1(c) || isLOWER_L1(c))
__UNDEFINED__ isALPHANUMERIC(c) (isALPHA(c) || isDIGIT(c))
__UNDEFINED__ isALPHANUMERIC_L1(c) (isALPHA_L1(c) || isDIGIT(c))
+__UNDEFINED__ isALPHANUMERIC_LC(c) (isALPHA_LC(c) || isDIGIT_LC(c))
__UNDEFINED__ isBLANK(c) ((c) == ' ' || (c) == '\t')
__UNDEFINED__ isBLANK_L1(c) ( isBLANK(c) \
|| ( (WIDEST_UTYPE) (c) < 256 \
&& NATIVE_TO_LATIN1((U8) c) == 0xA0))
+__UNDEFINED__ isBLANK_LC(c) isBLANK(c)
__UNDEFINED__ isDIGIT(c) ((c) <= '9' && (c) >= '0')
__UNDEFINED__ isDIGIT_L1(c) isDIGIT(c)
__UNDEFINED__ isGRAPH(c) (isWORDCHAR(c) || isPUNCT(c))
@@ -541,8 +544,10 @@ __UNDEFINED__ isGRAPH_L1(c) ( isPRINT_L1(c) \
&& NATIVE_TO_LATIN1((U8) c) != 0xA0)
__UNDEFINED__ isIDCONT(c) isWORDCHAR(c)
__UNDEFINED__ isIDCONT_L1(c) isWORDCHAR_L1(c)
+__UNDEFINED__ isIDCONT_LC(c) isWORDCHAR_LC(c)
__UNDEFINED__ isIDFIRST(c) (isALPHA(c) || (c) == '_')
__UNDEFINED__ isIDFIRST_L1(c) (isALPHA_L1(c) || (U8) (c) == '_')
+__UNDEFINED__ isIDFIRST_LC(c) (isALPHA_LC(c) || (U8) (c) == '_')
__UNDEFINED__ isLOWER_L1(c) ( isLOWER(c) \
|| ( (WIDEST_UTYPE) (c) < 256 \
&& ( ( NATIVE_TO_LATIN1((U8) c) >= 0xDF \
@@ -589,10 +594,12 @@ __UNDEFINED__ isUPPER_L1(c) ( isUPPER(c) \
&& NATIVE_TO_LATIN1((U8) c) != 0xD7)))
__UNDEFINED__ isWORDCHAR(c) (isALPHANUMERIC(c) || (c) == '_')
__UNDEFINED__ isWORDCHAR_L1(c) (isIDFIRST_L1(c) || isDIGIT(c))
+__UNDEFINED__ isWORDCHAR_LC(c) (isIDFIRST_LC(c) || isDIGIT_LC(c))
__UNDEFINED__ isXDIGIT(c) ( isDIGIT(c) \
|| ((c) >= 'a' && (c) <= 'f') \
|| ((c) >= 'A' && (c) <= 'F'))
__UNDEFINED__ isXDIGIT_L1(c) isXDIGIT(c)
+__UNDEFINED__ isXDIGIT_LC(c) isxdigit(c)
__UNDEFINED__ isALNUM_A(c) isALNUM(c)
__UNDEFINED__ isALNUMC_A(c) isALNUMC(c)