summaryrefslogtreecommitdiff
path: root/pcretest.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2016-07-06 14:55:40 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2016-07-06 14:55:40 +0000
commit5a81f26cf832fa0900104fb3fb4a7d8c83dc6a42 (patch)
tree60f0e44d66b769245bb47c3f30526126fa6202a1 /pcretest.c
parent575b84a7bcbd63f54d933804ea5036642b93c0f7 (diff)
downloadpcre-5a81f26cf832fa0900104fb3fb4a7d8c83dc6a42.tar.gz
Ignore "show all captures" after DFA matching.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1661 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcretest.c')
-rw-r--r--pcretest.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/pcretest.c b/pcretest.c
index 78ef517..5748c55 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -5042,7 +5042,7 @@ while (!done)
if ((all_use_dfa || use_dfa) && find_match_limit)
{
- printf("**Match limit not relevant for DFA matching: ignored\n");
+ printf("** Match limit not relevant for DFA matching: ignored\n");
find_match_limit = 0;
}
@@ -5255,10 +5255,17 @@ while (!done)
if (do_allcaps)
{
- if (new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) < 0)
- goto SKIP_DATA;
- count++; /* Allow for full match */
- if (count * 2 > use_size_offsets) count = use_size_offsets/2;
+ if (all_use_dfa || use_dfa)
+ {
+ fprintf(outfile, "** Show all captures ignored after DFA matching\n");
+ }
+ else
+ {
+ if (new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) < 0)
+ goto SKIP_DATA;
+ count++; /* Allow for full match */
+ if (count * 2 > use_size_offsets) count = use_size_offsets/2;
+ }
}
/* Output the captured substrings. Note that, for the matched string,