summaryrefslogtreecommitdiff
path: root/pcre_internal.h
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-09-10 13:23:56 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-09-10 13:23:56 +0000
commit6daf21e6a650630d1ef31720c2f92f555127fe80 (patch)
tree6b7dd8ba7db2c55f02e5fd9dc1313d623e5c5f0b /pcre_internal.h
parent828dc418a519f86a907e0dd989e59bf15893a38e (diff)
downloadpcre-6daf21e6a650630d1ef31720c2f92f555127fe80.tar.gz
(1) Move internal flags out of the options field, to make room.
(2) \r and \n must be explicit to trigger the special CRLF handline exception. (3) (?J) at the start now sets JCHANGED as well as DUPNAMES. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@230 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_internal.h')
-rw-r--r--pcre_internal.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/pcre_internal.h b/pcre_internal.h
index a2409f9..e7bbb36 100644
--- a/pcre_internal.h
+++ b/pcre_internal.h
@@ -481,18 +481,16 @@ Standard C system should have one. */
#define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL)
-/* Private options flags start at the most significant end of the four bytes.
-The public options defined in pcre.h start at the least significant end. Make
-sure they don't overlap! The bits are getting a bit scarce now -- when we run
-out, there is a dummy word in the structure that could be used for the private
-bits. */
-
-#define PCRE_NOPARTIAL 0x80000000 /* can't use partial with this regex */
-#define PCRE_FIRSTSET 0x40000000 /* first_byte is set */
-#define PCRE_REQCHSET 0x20000000 /* req_byte is set */
-#define PCRE_STARTLINE 0x10000000 /* start after \n for multiline */
-#define PCRE_JCHANGED 0x08000000 /* j option changes within regex */
-#define PCRE_HASCRORLF 0x04000000 /* explicit \r or \n in pattern */
+/* Private flags containing information about the compiled regex. They used to
+live at the top end of the options word, but that got almost full, so now they
+are in a 16-bit flags word. */
+
+#define PCRE_NOPARTIAL 0x0001 /* can't use partial with this regex */
+#define PCRE_FIRSTSET 0x0002 /* first_byte is set */
+#define PCRE_REQCHSET 0x0004 /* req_byte is set */
+#define PCRE_STARTLINE 0x0008 /* start after \n for multiline */
+#define PCRE_JCHANGED 0x0010 /* j option used in regex */
+#define PCRE_HASCRORLF 0x0020 /* explicit \r or \n in pattern */
/* Options for the "extra" block produced by pcre_study(). */
@@ -894,9 +892,9 @@ NOTE NOTE NOTE:
typedef struct real_pcre {
pcre_uint32 magic_number;
pcre_uint32 size; /* Total that was malloced */
- pcre_uint32 options;
- pcre_uint32 dummy1; /* For future use, maybe */
-
+ pcre_uint32 options; /* Public options */
+ pcre_uint16 flags; /* Private flags */
+ pcre_uint16 dummy1; /* For future use */
pcre_uint16 top_bracket;
pcre_uint16 top_backref;
pcre_uint16 first_byte;
@@ -939,8 +937,8 @@ typedef struct compile_data {
int top_backref; /* Maximum back reference */
unsigned int backref_map; /* Bitmap of low back refs */
int external_options; /* External (initial) options */
+ int external_flags; /* External flag bits to be set */
int req_varyopt; /* "After variable item" flag for reqbyte */
- BOOL nopartial; /* Set TRUE if partial won't work */
BOOL had_accept; /* (*ACCEPT) encountered */
int nltype; /* Newline type */
int nllen; /* Newline string length */