In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/816641584282d213d868a7ba4be00e24f46daa79?hp=8477b9bae3d3ab18dbc355ddaff957d6ccb4c6f7>
- Log ----------------------------------------------------------------- commit 816641584282d213d868a7ba4be00e24f46daa79 Author: Karl Williamson <pub...@khwilliamson.com> Date: Thu Sep 23 12:16:12 2010 -0600 handy.h: Add isALNUM_L1() macro This is a synonym for isALNUMU M handy.h commit a9fccb9a1ea701559839cd170507e9810e8702c5 Author: Karl Williamson <pub...@khwilliamson.com> Date: Thu Sep 23 11:32:13 2010 -0600 Subject: handy.h: Add isSPACE_L1 with Unicode semantics M handy.h ----------------------------------------------------------------------- Summary of changes: handy.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/handy.h b/handy.h index b41c1c8..449ec0f 100644 --- a/handy.h +++ b/handy.h @@ -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) \ @@ -522,11 +524,14 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc || NATIVE_TO_UNI((U8) c) == 0xB5 \ || NATIVE_TO_UNI((U8) c) == 0xBA))) #define isALNUMU(c) (isDIGIT(c) || isALPHAU(c) || (c) == '_') +#define isALNUM_L1(c) isALNUMU(c) /* 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 isPSXSPC(c) (isSPACE(c) || (c) == '\v') #define isBLANK(c) ((c) == ' ' || (c) == '\t') #define isDIGIT(c) ((c) >= '0' && (c) <= '9') -- Perl5 Master Repository