summaryrefslogtreecommitdiff
path: root/pcretest.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-02-20 17:42:03 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-02-20 17:42:03 +0000
commitf690a395adb2258f01104da8592261e58a92b9c7 (patch)
treed362569d6e8a5fdac895c9ff73aaf6dddb02a028 /pcretest.c
parent86957348ae7fb586d050087ce90bbd1d3d8aae36 (diff)
downloadpcre-f690a395adb2258f01104da8592261e58a92b9c7.tar.gz
Pass back the bumpalong value for partial matches.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1251 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcretest.c')
-rw-r--r--pcretest.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/pcretest.c b/pcretest.c
index fcf1c25..c3d2896 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -5263,14 +5263,17 @@ while (!done)
}
}
- /* There was a partial match */
+ /* There was a partial match. If the bumpalong point is not the same as
+ the first inspected character, show the offset explicitly. */
else if (count == PCRE_ERROR_PARTIAL)
{
- if (markptr == NULL) fprintf(outfile, "Partial match");
- else
+ fprintf(outfile, "Partial match");
+ if (use_size_offsets > 2 && use_offsets[0] != use_offsets[2])
+ fprintf(outfile, " at offset %d", use_offsets[2]);
+ if (markptr != NULL)
{
- fprintf(outfile, "Partial match, mark=");
+ fprintf(outfile, ", mark=");
PCHARSV(markptr, 0, -1, outfile);
}
if (use_size_offsets > 1)