diff options
author | Karl Williamson <khw@khw-desktop.(none)> | 2010-07-18 12:28:14 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-09-16 15:09:26 +0200 |
commit | c99e91e919b4bb89bab7829a9026ee01b1fff2a1 (patch) | |
tree | 5b069e6bd24b358e42e94e01b97424d5a09d9bfc /handy.h | |
parent | eb06eac93f0120092363c6c7ba87bb7054e76844 (diff) | |
download | perl-c99e91e919b4bb89bab7829a9026ee01b1fff2a1.tar.gz |
Fix /[\8]/ to not match NULL; give correct warning
8 and 9 are not treated as alphas in parsing as opposed to illegal
octals.
This also adds tests to verify that 1-3 digits work in char classes.
I created an isOCTAL macro in case that lookup gets moved to a bit
field, as I plan to do later, for speed.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -455,6 +455,10 @@ whitespace. Returns a boolean indicating whether the C C<char> is a US-ASCII (Basic Latin) digit. +=for apidoc Am|bool|isOCTAL|char ch +Returns a boolean indicating whether the C C<char> is a US-ASCII (Basic Latin) +octal digit, [0-7]. + =for apidoc Am|bool|isUPPER|char ch Returns a boolean indicating whether the C C<char> is a US-ASCII (Basic Latin) uppercase character. @@ -516,6 +520,7 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc #define isPSXSPC(c) (isSPACE(c) || (c) == '\v') #define isBLANK(c) ((c) == ' ' || (c) == '\t') #define isDIGIT(c) ((c) >= '0' && (c) <= '9') +#define isOCTAL(c) ((c) >= '0' && (c) <= '7') #ifdef EBCDIC /* In EBCDIC we do not do locales: therefore() isupper() is fine. */ # define isUPPER(c) isupper(c) |