diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-09-23 11:32:13 -0600 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-09-23 22:18:17 -0700 |
commit | a9fccb9a1ea701559839cd170507e9810e8702c5 (patch) | |
tree | 675f87622c6ca5e2618309b34a43859f1a0e35f2 /handy.h | |
parent | 8477b9bae3d3ab18dbc355ddaff957d6ccb4c6f7 (diff) | |
download | perl-a9fccb9a1ea701559839cd170507e9810e8702c5.tar.gz |
Subject: handy.h: Add isSPACE_L1 with Unicode semantics
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -515,6 +515,8 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc #define isALPHA(c) (isUPPER(c) || isLOWER(c)) /* ALPHAU includes Unicode semantics for latin1 characters. It has an extra * >= AA test to speed up ASCII-only tests at the expense of the others */ +/* XXX decide whether to document the ALPHAU, ALNUMU and isSPACE_L1 functions. + * Most of these should be implemented as table lookup for speed */ #define isALPHAU(c) (isALPHA(c) || (NATIVE_TO_UNI((U8) c) >= 0xAA \ && ((NATIVE_TO_UNI((U8) c) >= 0xC0 \ && NATIVE_TO_UNI((U8) c) != 0xD7 && NATIVE_TO_UNI((U8) c) != 0xF7) \ @@ -527,6 +529,8 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc #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 isPSXSPC(c) (isSPACE(c) || (c) == '\v') #define isBLANK(c) ((c) == ' ' || (c) == '\t') #define isDIGIT(c) ((c) >= '0' && (c) <= '9') |