From fbc19f27a35cc90f77285a47de2ff0dd21ff50c6 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 11 Dec 2012 20:43:59 -0700 Subject: [PATCH] handy.h: Move some #defines I'm moving this block of back-compat macros to later in the file, so it comes after all the other definitions that may need to have backwards compatibility equivalents --- handy.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/handy.h b/handy.h index c3fce76..fd23c1d 100644 --- a/handy.h +++ b/handy.h @@ -935,16 +935,6 @@ EXTCONST U32 PL_charclass[]; || NATIVE_TO_UNI((U8) c) == 0xA0) #endif -/* Macros for backwards compatibility and for completeness when the ASCII and - * Latin1 values are identical */ -#define isALNUM(c) isWORDCHAR(c) -#define isALNUMU(c) isWORDCHAR_L1(c) -#define isALPHAU(c) isALPHA_L1(c) -#define isDIGIT_L1(c) isDIGIT_A(c) -#define isOCTAL(c) isOCTAL_A(c) -#define isOCTAL_L1(c) isOCTAL_A(c) -#define isXDIGIT_L1(c) isXDIGIT_A(c) - /* Macros that differ between EBCDIC and ASCII. Where C89 defines a function, * that is used in the EBCDIC form, because in EBCDIC we do not do locales: * therefore can use native functions. For those where C89 doesn't define a @@ -1272,6 +1262,16 @@ EXTCONST U32 PL_charclass[]; #define isWORDCHAR_LC_utf8(p) _generic_LC_utf8(isWORDCHAR_LC, is_utf8_alnum, p) #define isXDIGIT_LC_utf8(p) _generic_LC_utf8(isXDIGIT_LC, is_XDIGIT_high, p) +/* Macros for backwards compatibility and for completeness when the ASCII and + * Latin1 values are identical */ +#define isALNUM(c) isWORDCHAR(c) +#define isALNUMU(c) isWORDCHAR_L1(c) +#define isALPHAU(c) isALPHA_L1(c) +#define isDIGIT_L1(c) isDIGIT_A(c) +#define isOCTAL(c) isOCTAL_A(c) +#define isOCTAL_L1(c) isOCTAL_A(c) +#define isXDIGIT_L1(c) isXDIGIT_A(c) + /* This conversion works both ways, strangely enough. On EBCDIC platforms, * CTRL-@ is 0, CTRL-A is 1, etc, just like on ASCII, except that they don't * necessarily mean the same characters, e.g. CTRL-D is 4 on both systems, but -- 1.8.3.1