summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-13 09:47:11 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-13 09:47:11 +0000
commitae5c130cf43baa916c1292cd85a40d054824ba20 (patch)
treeab127484971fa5731259a6d386ac1b6ccfc334cb /regcomp.h
parentca48fea705cdd276964538988256b00e487bc483 (diff)
downloadperl-ae5c130cf43baa916c1292cd85a40d054824ba20.tar.gz
[win32] merge change#664 from maint branch
p4raw-link: @664 on //depot/maint-5.004/perl: c3ae1fa52acf9130fcc1770ad2fce8519766b744 p4raw-id: //depot/win32/perl@926
Diffstat (limited to 'regcomp.h')
-rw-r--r--regcomp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/regcomp.h b/regcomp.h
index 4b86a8d781..0bd00e2a6d 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -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