diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-02-24 16:25:47 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-08-29 09:55:55 -0600 |
commit | e66b99e978ba46660c4591770f7c1998ea490c2d (patch) | |
tree | 648f6b71b83ae04dadd04e1bb470acc4d6250677 /handy.h | |
parent | ae4842abe110ac794bc4928473bca35a7c3bc143 (diff) | |
download | perl-e66b99e978ba46660c4591770f7c1998ea490c2d.tar.gz |
handy.h: White space only
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 46 |
1 files changed, 23 insertions, 23 deletions
@@ -1113,29 +1113,29 @@ EXTCONST U32 PL_charclass[]; || NATIVE_TO_LATIN1((U8) c) == 0xA0) #endif -# define isALPHANUMERIC(c) isALPHANUMERIC_A(c) -# define isALPHA(c) isALPHA_A(c) -# define isBLANK(c) isBLANK_A(c) -# define isCNTRL(c) isCNTRL_A(c) -# define isDIGIT(c) isDIGIT_A(c) -# define isGRAPH(c) isGRAPH_A(c) -# define isIDFIRST(c) isIDFIRST_A(c) -# define isLOWER(c) isLOWER_A(c) -# define isPRINT(c) isPRINT_A(c) -# define isPSXSPC(c) isPSXSPC_A(c) -# define isPUNCT(c) isPUNCT_A(c) -# define isSPACE(c) isSPACE_A(c) -# define isUPPER(c) isUPPER_A(c) -# define isWORDCHAR(c) isWORDCHAR_A(c) -# define isXDIGIT(c) isXDIGIT_A(c) - - /* ASCII casing. These could also be written as - #define toLOWER(c) (isASCII(c) ? toLOWER_LATIN1(c) : (c)) - #define toUPPER(c) (isASCII(c) ? toUPPER_LATIN1_MOD(c) : (c)) - which uses table lookup and mask instead of subtraction. (This would - work because the _MOD does not apply in the ASCII range) */ -# define toLOWER(c) (isUPPER(c) ? (c) + ('a' - 'A') : (c)) -# define toUPPER(c) (isLOWER(c) ? (c) - ('a' - 'A') : (c)) +#define isALPHANUMERIC(c) isALPHANUMERIC_A(c) +#define isALPHA(c) isALPHA_A(c) +#define isBLANK(c) isBLANK_A(c) +#define isCNTRL(c) isCNTRL_A(c) +#define isDIGIT(c) isDIGIT_A(c) +#define isGRAPH(c) isGRAPH_A(c) +#define isIDFIRST(c) isIDFIRST_A(c) +#define isLOWER(c) isLOWER_A(c) +#define isPRINT(c) isPRINT_A(c) +#define isPSXSPC(c) isPSXSPC_A(c) +#define isPUNCT(c) isPUNCT_A(c) +#define isSPACE(c) isSPACE_A(c) +#define isUPPER(c) isUPPER_A(c) +#define isWORDCHAR(c) isWORDCHAR_A(c) +#define isXDIGIT(c) isXDIGIT_A(c) + +/* ASCII casing. These could also be written as + #define toLOWER(c) (isASCII(c) ? toLOWER_LATIN1(c) : (c)) + #define toUPPER(c) (isASCII(c) ? toUPPER_LATIN1_MOD(c) : (c)) + which uses table lookup and mask instead of subtraction. (This would + work because the _MOD does not apply in the ASCII range) */ +#define toLOWER(c) (isUPPER(c) ? (c) + ('a' - 'A') : (c)) +#define toUPPER(c) (isLOWER(c) ? (c) - ('a' - 'A') : (c)) /* In the ASCII range, these are equivalent to what they're here defined to be. * But by creating these definitions, other code doesn't have to be aware of |