summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2010-09-23 13:41:52 -0600
committerSteffen Mueller <smueller@cpan.org>2010-09-25 11:15:30 +0200
commit1a0901dbc900e43ec8a4a9d55385b089d2733473 (patch)
treec6c9b5ef2f688806d1dda289afc02e78661f20f3 /handy.h
parent81965e2b9c462d35b04a8c01631dbb664e3b9431 (diff)
downloadperl-1a0901dbc900e43ec8a4a9d55385b089d2733473.tar.gz
Subject: handy.h: Move defn's outside #ifndef EBCDIC
Commit 4125141464884619e852c7b0986a51eba8fe1636 improperly got rid of EBCDIC handling, as it combined the ASCII and EBCDIC versions, but left the result in the ASCII-only branch. Just move to the common code.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/handy.h b/handy.h
index c5c12b74e7..00bc5e4d17 100644
--- a/handy.h
+++ b/handy.h
@@ -559,26 +559,26 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc
# define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))
# define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
-
- /* Use table lookup for speed; return error character for input
- * out-of-range */
-# define toLOWER_LATIN1(c) (FITS_IN_8_BITS(c) \
- ? UNI_TO_NATIVE(PL_latin1_lc[ \
- NATIVE_TO_UNI( (U8) (c)) ]) \
- : UNICODE_REPLACEMENT)
- /* Modified uc. Is correct uc except for three non-ascii chars which are
- * all mapped to one of them, and these need special handling; error
- * character for input out-of-range */
-# define toUPPER_LATIN1_MOD(c) (FITS_IN_8_BITS(c) \
- ? UNI_TO_NATIVE(PL_mod_latin1_uc[ \
- NATIVE_TO_UNI( (U8) (c)) ]) \
- : UNICODE_REPLACEMENT)
-
/* ASCII casing. */
# define toUPPER(c) (isLOWER(c) ? (c) - ('a' - 'A') : (c))
# define toLOWER(c) (isUPPER(c) ? (c) + ('a' - 'A') : (c))
#endif
+
+/* Use table lookup for speed; return error character for input
+ * out-of-range */
+#define toLOWER_LATIN1(c) (FITS_IN_8_BITS(c) \
+ ? UNI_TO_NATIVE(PL_latin1_lc[ \
+ NATIVE_TO_UNI( (U8) (c)) ]) \
+ : UNICODE_REPLACEMENT)
+/* Modified uc. Is correct uc except for three non-ascii chars which are
+ * all mapped to one of them, and these need special handling; error
+ * character for input out-of-range */
+#define toUPPER_LATIN1_MOD(c) (FITS_IN_8_BITS(c) \
+ ? UNI_TO_NATIVE(PL_mod_latin1_uc[ \
+ NATIVE_TO_UNI( (U8) (c)) ]) \
+ : UNICODE_REPLACEMENT)
+
#ifdef USE_NEXT_CTYPE
# define isALNUM_LC(c) \