diff options
author | Jeffrey Friedl <jfriedl@regex.info> | 2000-07-16 10:55:29 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-18 21:07:06 +0000 |
commit | aaa51d5e11b8b0db616a7f939c784733b4cfef87 (patch) | |
tree | 5cc57e412e80d1006256d7edc7526dd927cbe2bd /handy.h | |
parent | 2a4ebaa641b7ba24b2dcfc940bb2b5da27d05b4e (diff) | |
download | perl-aaa51d5e11b8b0db616a7f939c784733b4cfef87.tar.gz |
Add [[:blank:]] as suggested in
Subject: [ID 20000716.024] [=cc=] / [:blank:]
Message-Id: <200007170055.RAA23528@fummy.dsl.yahoo.com>
(the [=cc=] has already been taken care of by #6439
so the whole bug report can be closed)
and make [[:space:]] to be equivalent to isspace(3)
(as opposed to \s, which is isSPACE()). The difference
is that now [[:space:]] matches the mythical vertical tab,
while \s doesn't.
p4raw-id: //depot/perl@6703
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -296,6 +296,8 @@ Converts the specified character to lowercase. #define isALPHA(c) (isUPPER(c) || isLOWER(c)) #define isSPACE(c) \ ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) =='\r' || (c) == '\f') +#define isPSXSPC(c) (isSPACE(c) || (c) == '\v') +#define isBLANK(c) ((c) == ' ' || (c) == '\t') #define isDIGIT(c) ((c) >= '0' && (c) <= '9') #ifdef EBCDIC /* In EBCDIC we do not do locales: therefore() isupper() is fine. */ @@ -382,6 +384,9 @@ Converts the specified character to lowercase. # endif #endif /* USE_NEXT_CTYPE */ +#define isPSXSPC_LC(c) (isSPACE_LC(c) || (c) == '\v') +#define isBLANK_LC(c) isBLANK(c) /* could be wrong */ + #define isALNUM_uni(c) is_uni_alnum(c) #define isIDFIRST_uni(c) is_uni_idfirst(c) #define isALPHA_uni(c) is_uni_alpha(c) @@ -400,6 +405,9 @@ Converts the specified character to lowercase. #define toTITLE_uni(c) to_uni_title(c) #define toLOWER_uni(c) to_uni_lower(c) +#define isPSXSPC_uni(c) (isSPACE_uni(c) ||(c) == '\f') +#define isBLANK_uni(c) isBLANK(c) /* could be wrong */ + #define isALNUM_LC_uni(c) (c < 256 ? isALNUM_LC(c) : is_uni_alnum_lc(c)) #define isIDFIRST_LC_uni(c) (c < 256 ? isIDFIRST_LC(c) : is_uni_idfirst_lc(c)) #define isALPHA_LC_uni(c) (c < 256 ? isALPHA_LC(c) : is_uni_alpha_lc(c)) @@ -416,6 +424,9 @@ Converts the specified character to lowercase. #define toTITLE_LC_uni(c) (c < 256 ? toUPPER_LC(c) : to_uni_title_lc(c)) #define toLOWER_LC_uni(c) (c < 256 ? toLOWER_LC(c) : to_uni_lower_lc(c)) +#define isPSXSPC_LC_uni(c) (isSPACE_LC_uni(c) ||(c) == '\f') +#define isBLANK_LC_uni(c) isBLANK(c) /* could be wrong */ + #define isALNUM_utf8(p) is_utf8_alnum(p) #define isIDFIRST_utf8(p) is_utf8_idfirst(p) #define isALPHA_utf8(p) is_utf8_alpha(p) @@ -434,6 +445,9 @@ Converts the specified character to lowercase. #define toTITLE_utf8(p) to_utf8_title(p) #define toLOWER_utf8(p) to_utf8_lower(p) +#define isPSXSPC_utf8(c) (isSPACE_utf8(c) ||(c) == '\f') +#define isBLANK_utf8(c) isBLANK(c) /* could be wrong */ + #define isALNUM_LC_utf8(p) isALNUM_LC_uni(utf8_to_uv(p, 0)) #define isIDFIRST_LC_utf8(p) isIDFIRST_LC_uni(utf8_to_uv(p, 0)) #define isALPHA_LC_utf8(p) isALPHA_LC_uni(utf8_to_uv(p, 0)) @@ -450,6 +464,9 @@ Converts the specified character to lowercase. #define toTITLE_LC_utf8(p) toTITLE_LC_uni(utf8_to_uv(p, 0)) #define toLOWER_LC_utf8(p) toLOWER_LC_uni(utf8_to_uv(p, 0)) +#define isPSXSPC_LC_utf8(c) (isSPACE_LC_utf8(c) ||(c) == '\f') +#define isBLANK_LC_utf8(c) isBLANK(c) /* could be wrong */ + #ifdef EBCDIC EXT int ebcdic_control (int); # define toCTRL(c) ebcdic_control(c) |