summaryrefslogtreecommitdiff
path: root/pcre.c
diff options
context:
space:
mode:
authornigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:39:05 +0000
committernigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:39:05 +0000
commit8413b86222848f277386e72706ca548a37dbc6ca (patch)
treeaa68b52aa527385811d5e4af091c59609cc8fa03 /pcre.c
parent4864ac99ba4c4395fd8dc157ec734e228c780eb4 (diff)
downloadpcre-8413b86222848f277386e72706ca548a37dbc6ca.tar.gz
Load pcre-2.06 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@35 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre.c')
-rw-r--r--pcre.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/pcre.c b/pcre.c
index dd5852d..58adcef 100644
--- a/pcre.c
+++ b/pcre.c
@@ -1790,6 +1790,11 @@ for (;;)
code += 2;
break;
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_WORD_BOUNDARY:
+ code++;
+ break;
+
case OP_ASSERT_NOT:
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
@@ -4113,6 +4118,7 @@ Arguments:
external_extra points to "hints" from pcre_study() or is NULL
subject points to the subject string
length length of subject string (may contain binary zeros)
+ start_offset where to start in the subject string
options option bits
offsets points to a vector of ints to be filled in with offsets
offsetcount the number of elements in the vector
@@ -4125,14 +4131,15 @@ Returns: > 0 => success; value is the number of elements filled in
int
pcre_exec(const pcre *external_re, const pcre_extra *external_extra,
- const char *subject, int length, int options, int *offsets, int offsetcount)
+ const char *subject, int length, int start_offset, int options, int *offsets,
+ int offsetcount)
{
int resetcount, ocount;
int first_char = -1;
int ims = 0;
match_data match_block;
const uschar *start_bits = NULL;
-const uschar *start_match = (const uschar *)subject;
+const uschar *start_match = (const uschar *)subject + start_offset;
const uschar *end_subject;
const real_pcre *re = (const real_pcre *)external_re;
const real_pcre_extra *extra = (const real_pcre_extra *)external_extra;
@@ -4224,7 +4231,7 @@ if (!anchored)
start_bits = extra->start_bits;
}
-/* Loop for unanchored matches; for anchored regexps the loop runs just once. */
+/* Loop for unanchored matches; for anchored regexs the loop runs just once. */
do
{