summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2010-09-23 14:14:09 -0600
committerSteffen Mueller <smueller@cpan.org>2010-09-25 11:15:30 +0200
commit174b5e760eed7b09f88711b0f5f99a45775250f5 (patch)
tree48faa6e026c156ae8e5abb2618f2ec66ba218139 /handy.h
parent0bc70f7fb0209a2939be161ebaeacc4d09c4d7b9 (diff)
downloadperl-174b5e760eed7b09f88711b0f5f99a45775250f5.tar.gz
handy.h: isSPACE() is wrong for EBCDIC
It didn't include the Latin1 space components.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/handy.h b/handy.h
index 0dc9f3968e..d6d77a425a 100644
--- a/handy.h
+++ b/handy.h
@@ -528,8 +528,6 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc
/* continuation character for legal NAME in \N{NAME} */
#define isCHARNAME_CONT(c) (isALNUMU(c) || (c) == ' ' || (c) == '-' || (c) == '(' || (c) == ')' || (c) == ':' || NATIVE_TO_UNI((U8) c) == 0xA0)
-#define isSPACE(c) \
- ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) =='\r' || (c) == '\f')
#define isSPACE_L1(c) (isSPACE(c) \
|| (NATIVE_TO_UNI(c) == 0x85 || NATIVE_TO_UNI(c) == 0xA0))
#define isDIGIT(c) ((c) >= '0' && (c) <= '9')
@@ -546,6 +544,7 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc
# define isPRINT(c) isprint(c)
# define isPSXSPC(c) isspace(c)
# define isPUNCT(c) ispunct(c)
+# define isSPACE(c) (isPSXSPC(c) && (c) != '\v')
# define isXDIGIT(c) isxdigit(c)
# define toUPPER(c) toupper(c)
# define toLOWER(c) tolower(c)
@@ -559,6 +558,8 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc
# define isPRINT(c) (((c) >= 32 && (c) < 127))
# define isPSXSPC(c) (isSPACE(c) || (c) == '\v')
# define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))
+# define isSPACE(c) \
+ ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) =='\r' || (c) == '\f')
# define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
/* ASCII casing. */