diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-09-19 11:57:04 -0600 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-09-22 15:56:17 -0700 |
commit | 89e8dfa95ef07c947545bb90a358cf884038b1eb (patch) | |
tree | acf375815c1160f72d1184fb5b318892d0cbfa53 /handy.h | |
parent | 06dc89afdb8be14f426e43dc96c714e43c31ed64 (diff) | |
download | perl-89e8dfa95ef07c947545bb90a358cf884038b1eb.tar.gz |
handy.h: Don't use isascii() as not in all libc's
EBCDIC platforms use isascii(), but is not in all libc's so better to
use our own.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -530,12 +530,12 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc #define isBLANK(c) ((c) == ' ' || (c) == '\t') #define isDIGIT(c) ((c) >= '0' && (c) <= '9') #define isOCTAL(c) ((c) >= '0' && (c) <= '7') +#define isASCII(c) (NATIVE_TO_UNI((U8) c) <= 127) #ifdef EBCDIC /* In EBCDIC we do not do locales: therefore() isupper() is fine. */ # define isUPPER(c) isupper(c) # define isLOWER(c) islower(c) # define isALNUMC(c) isalnum(c) -# define isASCII(c) isascii(c) # define isCNTRL(c) iscntrl(c) # define isGRAPH(c) isgraph(c) # define isPRINT(c) isprint(c) @@ -547,7 +547,6 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc # define isUPPER(c) ((c) >= 'A' && (c) <= 'Z') # define isLOWER(c) ((c) >= 'a' && (c) <= 'z') # define isALNUMC(c) (isALPHA(c) || isDIGIT(c)) -# define isASCII(c) ((U8) (c) <= 127) # define isCNTRL(c) ((U8) (c) < ' ' || (c) == 127) # define isGRAPH(c) (isALNUM(c) || isPUNCT(c)) # define isPRINT(c) (((c) >= 32 && (c) < 127)) |