diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-18 09:40:58 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-18 09:40:58 +0000 |
commit | 3666098248b43282bda1153dae2f4c1e4af38d09 (patch) | |
tree | 9c69a323f89cdd81b231dc630b0eaf134225da7a /regcomp.h | |
parent | 9e6b2b00f0190751b970ece3db7033405cb08ca5 (diff) | |
parent | d2719217c9b7910115cef7ea0c16d68e6b286cf7 (diff) | |
download | perl-3666098248b43282bda1153dae2f4c1e4af38d09.tar.gz |
[asperl] integrate mainline changes (untested)
p4raw-id: //depot/asperl@1010
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -370,6 +370,13 @@ typedef char* regnode; #define ANYOF_SPACEL 0x02 #define ANYOF_NSPACEL 0x01 +/* Utility macros for bitmap of ANYOF */ +#define ANYOF_BYTE(p,c) (p)[1 + (((c) >> 3) & 31)] +#define ANYOF_BIT(c) (1 << ((c) & 7)) +#define ANYOF_SET(p,c) (ANYOF_BYTE(p,c) |= ANYOF_BIT(c)) +#define ANYOF_CLEAR(p,c) (ANYOF_BYTE(p,c) &= ~ANYOF_BIT(c)) +#define ANYOF_TEST(p,c) (ANYOF_BYTE(p,c) & ANYOF_BIT(c)) + #ifdef REGALIGN_STRUCT #define ANY_SKIP ((33 - 1)/sizeof(regnode) + 1) #else |