10.33-RC1 bump
This commit is contained in:
parent
7178f59c9c
commit
4beb3e9572
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@
|
||||
/pcre2-10.31.tar.bz2
|
||||
/pcre2-10.32-RC1.tar.bz2
|
||||
/pcre2-10.32.tar.bz2
|
||||
/pcre2-10.33-RC1.tar.bz2
|
||||
|
@ -1,53 +0,0 @@
|
||||
From dd9e5dc97b897fdec64525560131c1ffb8d8a4d4 Mon Sep 17 00:00:00 2001
|
||||
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Fri, 21 Sep 2018 07:24:34 +0000
|
||||
Subject: [PATCH] Fix an xclass matching issue in JIT.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1016 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
Petr Písař: Ported to 10.32.
|
||||
---
|
||||
src/pcre2_jit_compile.c | 6 +++---
|
||||
src/pcre2_jit_test.c | 1 +
|
||||
|
||||
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
|
||||
index 2c49f1c..4e69e76 100644
|
||||
--- a/src/pcre2_jit_compile.c
|
||||
+++ b/src/pcre2_jit_compile.c
|
||||
@@ -7012,9 +7012,6 @@ int i, j, k, len, c;
|
||||
if (!sljit_has_cpu_feature(SLJIT_HAS_CMOV))
|
||||
return FALSE;
|
||||
|
||||
-if (invert)
|
||||
- nclass = !nclass;
|
||||
-
|
||||
len = 0;
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
@@ -7096,6 +7093,9 @@ if (j != 0)
|
||||
}
|
||||
}
|
||||
|
||||
+if (invert)
|
||||
+ nclass = !nclass;
|
||||
+
|
||||
type = nclass ? SLJIT_NOT_EQUAL : SLJIT_EQUAL;
|
||||
add_jump(compiler, backtracks, CMP(type, TMP2, 0, SLJIT_IMM, 0));
|
||||
return TRUE;
|
||||
diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c
|
||||
index d5f4a96..10c064e 100644
|
||||
--- a/src/pcre2_jit_test.c
|
||||
+++ b/src/pcre2_jit_test.c
|
||||
@@ -383,6 +383,7 @@ static struct regression_test_case regression_test_cases[] = {
|
||||
{ MU, A, 0, 0, "[^\\x{801}-\\x{fffe}]+", "\xe0\xa0\x81#\xc3\xa9\xf0\x90\x90\x80\xe0\xa0\x80\xef\xbf\xbf\xef\xbf\xbe" },
|
||||
{ MU, A, 0, 0, "[\\x{10001}-\\x{10fffe}]+", "#\xc3\xa9\xe2\xb1\xa5\xf0\x90\x80\x80\xf0\x90\x80\x81\xf4\x8f\xbf\xbe\xf4\x8f\xbf\xbf" },
|
||||
{ MU, A, 0, 0, "[^\\x{10001}-\\x{10fffe}]+", "\xf0\x90\x80\x81#\xc3\xa9\xe2\xb1\xa5\xf0\x90\x80\x80\xf4\x8f\xbf\xbf\xf4\x8f\xbf\xbe" },
|
||||
+ { CMU, A, 0, 0 | F_NOMATCH, "^[\\x{0100}-\\x{017f}]", " " },
|
||||
|
||||
/* Unicode properties. */
|
||||
{ MUP, A, 0, 0, "[1-5\xc3\xa9\\w]", "\xc3\xa1_" },
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,77 +0,0 @@
|
||||
From 225bd60220208b0908555701a0176b8a9561dbe0 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Tue, 29 Jan 2019 14:34:59 +0000
|
||||
Subject: [PATCH] Fix bug in VERSION conditional test in DFA matching.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1062 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
|
||||
Petr Písař: Ported to 10.32.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
src/pcre2_dfa_match.c | 2 +-
|
||||
testdata/testinput6 | 10 ++++++++++
|
||||
testdata/testoutput6 | 14 ++++++++++++++
|
||||
3 files changed, 25 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pcre2_dfa_match.c b/src/pcre2_dfa_match.c
|
||||
index 818004d..1a7f19d 100644
|
||||
--- a/src/pcre2_dfa_match.c
|
||||
+++ b/src/pcre2_dfa_match.c
|
||||
@@ -2757,7 +2757,7 @@ for (;;)
|
||||
/* There is also an always-true condition */
|
||||
|
||||
else if (condcode == OP_TRUE)
|
||||
- { ADD_ACTIVE(state_offset + LINK_SIZE + 2 + IMM2_SIZE, 0); }
|
||||
+ { ADD_ACTIVE(state_offset + LINK_SIZE + 2, 0); }
|
||||
|
||||
/* The only supported version of OP_RREF is for the value RREF_ANY,
|
||||
which means "test if in any recursion". We can't test for specifically
|
||||
diff --git a/testdata/testinput6 b/testdata/testinput6
|
||||
index f7dedb2..684e029 100644
|
||||
--- a/testdata/testinput6
|
||||
+++ b/testdata/testinput6
|
||||
@@ -4955,4 +4955,14 @@
|
||||
\= Expect no match
|
||||
\na
|
||||
|
||||
+/(?(VERSION>=0)^B0W)/
|
||||
+ B0W-W0W
|
||||
+\= Expect no match
|
||||
+ 0
|
||||
+
|
||||
+/(?(VERSION>=1000)^B0W|W0W)/
|
||||
+ B0W-W0W
|
||||
+\= Expect no match
|
||||
+ 0
|
||||
+
|
||||
# End of testinput6
|
||||
diff --git a/testdata/testoutput6 b/testdata/testoutput6
|
||||
index caec833..051248f 100644
|
||||
--- a/testdata/testoutput6
|
||||
+++ b/testdata/testoutput6
|
||||
@@ -7783,4 +7783,18 @@ No match
|
||||
\na
|
||||
No match
|
||||
|
||||
+/(?(VERSION>=0)^B0W)/
|
||||
+ B0W-W0W
|
||||
+ 0: B0W
|
||||
+\= Expect no match
|
||||
+ 0
|
||||
+No match
|
||||
+
|
||||
+/(?(VERSION>=1000)^B0W|W0W)/
|
||||
+ B0W-W0W
|
||||
+ 0: W0W
|
||||
+\= Expect no match
|
||||
+ 0
|
||||
+No match
|
||||
+
|
||||
# End of testinput6
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,67 +0,0 @@
|
||||
From 18ee5a9d3779f5e8ee3142326dd65ae75b22bb0b Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Mon, 22 Oct 2018 16:47:55 +0000
|
||||
Subject: [PATCH] Fix heap limit checking overflow bug in pcre2_dfa_match().
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1034 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
|
||||
Petr Písař: Ported to 10.32.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
src/pcre2_dfa_match.c | 22 +++++++++++++---------
|
||||
1 file changed, 13 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/pcre2_dfa_match.c b/src/pcre2_dfa_match.c
|
||||
index 9b43237..818004d 100644
|
||||
--- a/src/pcre2_dfa_match.c
|
||||
+++ b/src/pcre2_dfa_match.c
|
||||
@@ -316,8 +316,8 @@ finding the minimum heap requirement for a match. */
|
||||
|
||||
typedef struct RWS_anchor {
|
||||
struct RWS_anchor *next;
|
||||
- unsigned int size; /* Number of ints */
|
||||
- unsigned int free; /* Number of ints */
|
||||
+ uint32_t size; /* Number of ints */
|
||||
+ uint32_t free; /* Number of ints */
|
||||
} RWS_anchor;
|
||||
|
||||
#define RWS_ANCHOR_SIZE (sizeof(RWS_anchor)/sizeof(int))
|
||||
@@ -413,20 +413,24 @@ if (rws->next != NULL)
|
||||
new = rws->next;
|
||||
}
|
||||
|
||||
-/* All sizes are in units of sizeof(int), except for mb->heaplimit, which is in
|
||||
-kibibytes. */
|
||||
+/* Sizes in the RWS_anchor blocks are in units of sizeof(int), but
|
||||
+mb->heap_limit and mb->heap_used are in kibibytes. Play carefully, to avoid
|
||||
+overflow. */
|
||||
|
||||
else
|
||||
{
|
||||
- unsigned int newsize = rws->size * 2;
|
||||
- unsigned int heapleft = (unsigned int)
|
||||
- (((1024/sizeof(int))*mb->heap_limit - mb->heap_used));
|
||||
- if (newsize > heapleft) newsize = heapleft;
|
||||
+ uint32_t newsize = (rws->size >= UINT32_MAX/2)? UINT32_MAX/2 : rws->size * 2;
|
||||
+ uint32_t newsizeK = newsize/(1024/sizeof(int));
|
||||
+
|
||||
+ if (newsizeK + mb->heap_used > mb->heap_limit)
|
||||
+ newsizeK = mb->heap_limit - mb->heap_used;
|
||||
+ newsize = newsizeK*(1024/sizeof(int));
|
||||
+
|
||||
if (newsize < RWS_RSIZE + ovecsize + RWS_ANCHOR_SIZE)
|
||||
return PCRE2_ERROR_HEAPLIMIT;
|
||||
new = mb->memctl.malloc(newsize*sizeof(int), mb->memctl.memory_data);
|
||||
if (new == NULL) return PCRE2_ERROR_NOMEMORY;
|
||||
- mb->heap_used += newsize;
|
||||
+ mb->heap_used += newsizeK;
|
||||
new->next = NULL;
|
||||
new->size = newsize;
|
||||
rws->next = new;
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,94 +0,0 @@
|
||||
From 1e78fb74388943447942b5aca9bcdb60c42d0977 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Tue, 27 Nov 2018 16:00:58 +0000
|
||||
Subject: [PATCH] Fix non-recognition of anchoring when preceded by (*MARK)
|
||||
etc.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1048 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
Petr Písař <ppisar@redhat.com>: Ported to 10.32.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
src/pcre2_compile.c | 10 +++++++++-
|
||||
testdata/testinput2 | 6 ++++++
|
||||
testdata/testoutput2 | 18 ++++++++++++++++++
|
||||
3 files changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
|
||||
index 50dfd47..12d9058 100644
|
||||
--- a/src/pcre2_compile.c
|
||||
+++ b/src/pcre2_compile.c
|
||||
@@ -4421,6 +4421,14 @@ for (;;)
|
||||
code += GET(code, 1) + 1 + LINK_SIZE;
|
||||
break;
|
||||
|
||||
+ case OP_MARK:
|
||||
+ case OP_COMMIT_ARG:
|
||||
+ case OP_PRUNE_ARG:
|
||||
+ case OP_SKIP_ARG:
|
||||
+ case OP_THEN_ARG:
|
||||
+ code += code[1] + PRIV(OP_lengths)[*code];
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
return code;
|
||||
}
|
||||
@@ -7287,7 +7295,7 @@ for (;; pptr++)
|
||||
cb->had_recurse = TRUE;
|
||||
if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
|
||||
zerofirstcu = firstcu;
|
||||
- zerofirstcuflags = firstcuflags;
|
||||
+ zerofirstcuflags = firstcuflags;
|
||||
break;
|
||||
|
||||
|
||||
diff --git a/testdata/testinput2 b/testdata/testinput2
|
||||
index fc94b35..6164ebb 100644
|
||||
--- a/testdata/testinput2
|
||||
+++ b/testdata/testinput2
|
||||
@@ -5505,4 +5505,10 @@ a)"xI
|
||||
bbc
|
||||
xbc
|
||||
|
||||
+/(*:XX)^abc/I
|
||||
+
|
||||
+/(*COMMIT:XX)^abc/I
|
||||
+
|
||||
+/(*ACCEPT:XX)^abc/I
|
||||
+
|
||||
# End of testinput2
|
||||
diff --git a/testdata/testoutput2 b/testdata/testoutput2
|
||||
index ecf0d80..f90941f 100644
|
||||
--- a/testdata/testoutput2
|
||||
+++ b/testdata/testoutput2
|
||||
@@ -16763,6 +16763,24 @@ Subject length lower bound = 1
|
||||
0: b
|
||||
0+ c
|
||||
|
||||
+/(*:XX)^abc/I
|
||||
+Capturing subpattern count = 0
|
||||
+Compile options: <none>
|
||||
+Overall options: anchored
|
||||
+First code unit = 'a'
|
||||
+Subject length lower bound = 3
|
||||
+
|
||||
+/(*COMMIT:XX)^abc/I
|
||||
+Capturing subpattern count = 0
|
||||
+Compile options: <none>
|
||||
+Overall options: anchored
|
||||
+First code unit = 'a'
|
||||
+Subject length lower bound = 3
|
||||
+
|
||||
+/(*ACCEPT:XX)^abc/I
|
||||
+Capturing subpattern count = 0
|
||||
+Subject length lower bound = 0
|
||||
+
|
||||
# End of testinput2
|
||||
Error -70: PCRE2_ERROR_BADDATA (unknown error number)
|
||||
Error -62: bad serialized data
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,34 +0,0 @@
|
||||
From f3b9337a2280db816ef6b2cbe3750b2991944c22 Mon Sep 17 00:00:00 2001
|
||||
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Tue, 18 Sep 2018 10:19:14 +0000
|
||||
Subject: [PATCH] Fix subject buffer overread in JIT. Found by Yunho Kim.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1011 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
|
||||
Petr Písař: Ported to 10.32. The tests were removed because they need
|
||||
a new test framework not availanble in 10.32.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
src/pcre2_jit_compile.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
|
||||
index 32e985b..b3015cc 100644
|
||||
--- a/src/pcre2_jit_compile.c
|
||||
+++ b/src/pcre2_jit_compile.c
|
||||
@@ -9951,7 +9951,7 @@ if (exact > 1)
|
||||
#ifdef SUPPORT_UNICODE
|
||||
&& !common->utf
|
||||
#endif
|
||||
- )
|
||||
+ && type != OP_ANYNL && type != OP_EXTUNI)
|
||||
{
|
||||
OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(exact));
|
||||
add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_GREATER, TMP1, 0, STR_END, 0));
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,99 +0,0 @@
|
||||
From 529a60807c0a6f7d8ff7f2d9dfdd4b8df9ce6c66 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Thu, 14 Feb 2019 16:07:14 +0000
|
||||
Subject: [PATCH] Fix two identical documentation typos.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1075 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
Petr Písař: Ported to 10.32.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
doc/html/pcre2_pattern_info.html | 3 ++-
|
||||
doc/html/pcre2api.html | 3 ++-
|
||||
doc/pcre2.txt | 3 ++-
|
||||
doc/pcre2_pattern_info.3 | 5 +++--
|
||||
doc/pcre2api.3 | 3 ++-
|
||||
5 files changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/doc/html/pcre2_pattern_info.html b/doc/html/pcre2_pattern_info.html
|
||||
index 2e35709..eaaac6c 100644
|
||||
--- a/doc/html/pcre2_pattern_info.html
|
||||
+++ b/doc/html/pcre2_pattern_info.html
|
||||
@@ -19,7 +19,8 @@ SYNOPSIS
|
||||
<b>#include <pcre2.h></b>
|
||||
</P>
|
||||
<P>
|
||||
-<b>int pcre2_pattern_info(const pcre2 *<i>code</i>, uint32_t <i>what</i>, void *<i>where</i>);</b>
|
||||
+<b>int pcre2_pattern_info(const pcre2_code *<i>code</i>, uint32_t <i>what</i>,</b>
|
||||
+<b> void *<i>where</i>);</b>
|
||||
</P>
|
||||
<br><b>
|
||||
DESCRIPTION
|
||||
diff --git a/doc/html/pcre2api.html b/doc/html/pcre2api.html
|
||||
index 17f9794..9f4e314 100644
|
||||
--- a/doc/html/pcre2api.html
|
||||
+++ b/doc/html/pcre2api.html
|
||||
@@ -307,7 +307,8 @@ document for an overview of all the PCRE2 documentation.
|
||||
<b>const unsigned char *pcre2_maketables(pcre2_general_context *<i>gcontext</i>);</b>
|
||||
<br>
|
||||
<br>
|
||||
-<b>int pcre2_pattern_info(const pcre2 *<i>code</i>, uint32_t <i>what</i>, void *<i>where</i>);</b>
|
||||
+<b>int pcre2_pattern_info(const pcre2_code *<i>code</i>, uint32_t <i>what</i>, </b>
|
||||
+<b> void *<i>where</i>);</b>
|
||||
<br>
|
||||
<br>
|
||||
<b>int pcre2_callout_enumerate(const pcre2_code *<i>code</i>,</b>
|
||||
diff --git a/doc/pcre2.txt b/doc/pcre2.txt
|
||||
index b8d2d20..02168e8 100644
|
||||
--- a/doc/pcre2.txt
|
||||
+++ b/doc/pcre2.txt
|
||||
@@ -398,7 +398,8 @@ PCRE2 NATIVE API AUXILIARY FUNCTIONS
|
||||
|
||||
const unsigned char *pcre2_maketables(pcre2_general_context *gcontext);
|
||||
|
||||
- int pcre2_pattern_info(const pcre2 *code, uint32_t what, void *where);
|
||||
+ int pcre2_pattern_info(const pcre2_code *code, uint32_t what,
|
||||
+ void *where);
|
||||
|
||||
int pcre2_callout_enumerate(const pcre2_code *code,
|
||||
int (*callback)(pcre2_callout_enumerate_block *, void *),
|
||||
diff --git a/doc/pcre2_pattern_info.3 b/doc/pcre2_pattern_info.3
|
||||
index 01b74a2..edd8989 100644
|
||||
--- a/doc/pcre2_pattern_info.3
|
||||
+++ b/doc/pcre2_pattern_info.3
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH PCRE2_PATTERN_INFO 3 "16 December 2017" "PCRE2 10.31"
|
||||
+.TH PCRE2_PATTERN_INFO 3 "14 February 2019" "PCRE2 10.33"
|
||||
.SH NAME
|
||||
PCRE2 - Perl-compatible regular expressions (revised API)
|
||||
.SH SYNOPSIS
|
||||
@@ -7,7 +7,8 @@ PCRE2 - Perl-compatible regular expressions (revised API)
|
||||
.B #include <pcre2.h>
|
||||
.PP
|
||||
.nf
|
||||
-.B int pcre2_pattern_info(const pcre2 *\fIcode\fP, uint32_t \fIwhat\fP, void *\fIwhere\fP);
|
||||
+.B int pcre2_pattern_info(const pcre2_code *\fIcode\fP, uint32_t \fIwhat\fP,
|
||||
+.B " void *\fIwhere\fP);"
|
||||
.fi
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
diff --git a/doc/pcre2api.3 b/doc/pcre2api.3
|
||||
index ba90c86..71651f6 100644
|
||||
--- a/doc/pcre2api.3
|
||||
+++ b/doc/pcre2api.3
|
||||
@@ -243,7 +243,8 @@ document for an overview of all the PCRE2 documentation.
|
||||
.sp
|
||||
.B const unsigned char *pcre2_maketables(pcre2_general_context *\fIgcontext\fP);
|
||||
.sp
|
||||
-.B int pcre2_pattern_info(const pcre2 *\fIcode\fP, uint32_t \fIwhat\fP, void *\fIwhere\fP);
|
||||
+.B int pcre2_pattern_info(const pcre2_code *\fIcode\fP, uint32_t \fIwhat\fP,
|
||||
+.B " void *\fIwhere\fP);"
|
||||
.sp
|
||||
.B int pcre2_callout_enumerate(const pcre2_code *\fIcode\fP,
|
||||
.B " int (*\fIcallback\fP)(pcre2_callout_enumerate_block *, void *),"
|
||||
--
|
||||
2.20.1
|
||||
|
@ -1,112 +0,0 @@
|
||||
From 977cdd668535a54fc8a13ce4a92d9866503b21ea Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Sat, 20 Oct 2018 09:28:02 +0000
|
||||
Subject: [PATCH] Fix zero-repeated subroutine call at start of pattern bug,
|
||||
which recorded an incorrect first code unit.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1032 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
Petr Písař: Ported to 10.32.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
src/pcre2_compile.c | 8 +++++---
|
||||
testdata/testinput1 | 15 +++++++++++++++
|
||||
testdata/testoutput1 | 24 ++++++++++++++++++++++++
|
||||
3 files changed, 44 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
|
||||
index 6bb1de3..50dfd47 100644
|
||||
--- a/src/pcre2_compile.c
|
||||
+++ b/src/pcre2_compile.c
|
||||
@@ -5901,7 +5901,7 @@ for (;; pptr++)
|
||||
}
|
||||
goto GROUP_PROCESS_NOTE_EMPTY;
|
||||
|
||||
- /* The DEFINE condition is always false. It's internal groups may never
|
||||
+ /* The DEFINE condition is always false. Its internal groups may never
|
||||
be called, so matched_char must remain false, hence the jump to
|
||||
GROUP_PROCESS rather than GROUP_PROCESS_NOTE_EMPTY. */
|
||||
|
||||
@@ -6237,8 +6237,8 @@ for (;; pptr++)
|
||||
groupnumber = ng->number;
|
||||
|
||||
/* For a recursion, that's all that is needed. We can now go to
|
||||
- the code above that handles numerical recursion, applying it to
|
||||
- the first group with the given name. */
|
||||
+ the code that handles numerical recursion, applying it to the first
|
||||
+ group with the given name. */
|
||||
|
||||
if (meta == META_RECURSE_BYNAME)
|
||||
{
|
||||
@@ -7286,6 +7286,8 @@ for (;; pptr++)
|
||||
groupsetfirstcu = FALSE;
|
||||
cb->had_recurse = TRUE;
|
||||
if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
|
||||
+ zerofirstcu = firstcu;
|
||||
+ zerofirstcuflags = firstcuflags;
|
||||
break;
|
||||
|
||||
|
||||
diff --git a/testdata/testinput1 b/testdata/testinput1
|
||||
index d8615ee..fce38b2 100644
|
||||
--- a/testdata/testinput1
|
||||
+++ b/testdata/testinput1
|
||||
@@ -6263,4 +6263,19 @@ ef) x/x,mark
|
||||
aBCDEF
|
||||
AbCDe f
|
||||
|
||||
+/ (?<word> \w+ )* \. /xi
|
||||
+ pokus.
|
||||
+
|
||||
+/(?(DEFINE) (?<word> \w+ ) ) (?&word)* \./xi
|
||||
+ pokus.
|
||||
+
|
||||
+/(?(DEFINE) (?<word> \w+ ) ) ( (?&word)* ) \./xi
|
||||
+ pokus.
|
||||
+
|
||||
+/(?&word)* (?(DEFINE) (?<word> \w+ ) ) \./xi
|
||||
+ pokus.
|
||||
+
|
||||
+/(?&word)* \. (?<word> \w+ )/xi
|
||||
+ pokus.hokus
|
||||
+
|
||||
# End of testinput1
|
||||
diff --git a/testdata/testoutput1 b/testdata/testoutput1
|
||||
index 77b9ff0..ff88775 100644
|
||||
--- a/testdata/testoutput1
|
||||
+++ b/testdata/testoutput1
|
||||
@@ -9929,4 +9929,28 @@ No match
|
||||
AbCDe f
|
||||
No match
|
||||
|
||||
+/ (?<word> \w+ )* \. /xi
|
||||
+ pokus.
|
||||
+ 0: pokus.
|
||||
+ 1: pokus
|
||||
+
|
||||
+/(?(DEFINE) (?<word> \w+ ) ) (?&word)* \./xi
|
||||
+ pokus.
|
||||
+ 0: pokus.
|
||||
+
|
||||
+/(?(DEFINE) (?<word> \w+ ) ) ( (?&word)* ) \./xi
|
||||
+ pokus.
|
||||
+ 0: pokus.
|
||||
+ 1: <unset>
|
||||
+ 2: pokus
|
||||
+
|
||||
+/(?&word)* (?(DEFINE) (?<word> \w+ ) ) \./xi
|
||||
+ pokus.
|
||||
+ 0: pokus.
|
||||
+
|
||||
+/(?&word)* \. (?<word> \w+ )/xi
|
||||
+ pokus.hokus
|
||||
+ 0: pokus.hokus
|
||||
+ 1: hokus
|
||||
+
|
||||
# End of testinput1
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,139 +0,0 @@
|
||||
From b0b9531ac4b12f4127f67d8ad050d8d527b67981 Mon Sep 17 00:00:00 2001
|
||||
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Thu, 3 Jan 2019 09:34:42 +0000
|
||||
Subject: [PATCH] JIT compiler update.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1057 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
src/sljit/sljitConfigInternal.h | 2 +-
|
||||
src/sljit/sljitNativeARM_64.c | 20 ++++++++++----------
|
||||
src/sljit/sljitNativePPC_common.c | 2 +-
|
||||
3 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/sljit/sljitConfigInternal.h b/src/sljit/sljitConfigInternal.h
|
||||
index f5703e8..ba60311 100644
|
||||
--- a/src/sljit/sljitConfigInternal.h
|
||||
+++ b/src/sljit/sljitConfigInternal.h
|
||||
@@ -530,7 +530,7 @@ typedef double sljit_f64;
|
||||
#endif /* !SLJIT_FUNC */
|
||||
|
||||
#ifndef SLJIT_INDIRECT_CALL
|
||||
-#if ((defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) && (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN)) \
|
||||
+#if ((defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) && (!defined _CALL_ELF || _CALL_ELF == 1)) \
|
||||
|| ((defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) && defined _AIX)
|
||||
/* It seems certain ppc compilers use an indirect addressing for functions
|
||||
which makes things complicated. */
|
||||
diff --git a/src/sljit/sljitNativeARM_64.c b/src/sljit/sljitNativeARM_64.c
|
||||
index 27af741..b015695 100644
|
||||
--- a/src/sljit/sljitNativeARM_64.c
|
||||
+++ b/src/sljit/sljitNativeARM_64.c
|
||||
@@ -51,7 +51,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = {
|
||||
0, 0, 1, 2, 3, 4, 5, 6, 7
|
||||
};
|
||||
|
||||
-#define W_OP (1 << 31)
|
||||
+#define W_OP (1u << 31)
|
||||
#define RD(rd) (reg_map[rd])
|
||||
#define RT(rt) (reg_map[rt])
|
||||
#define RN(rn) (reg_map[rn] << 5)
|
||||
@@ -560,7 +560,7 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s
|
||||
/* dst must be register, TMP_REG1
|
||||
arg1 must be register, TMP_REG1, imm
|
||||
arg2 must be register, TMP_REG2, imm */
|
||||
- sljit_ins inv_bits = (flags & INT_OP) ? (1 << 31) : 0;
|
||||
+ sljit_ins inv_bits = (flags & INT_OP) ? W_OP : 0;
|
||||
sljit_ins inst_bits;
|
||||
sljit_s32 op = (flags & 0xffff);
|
||||
sljit_s32 reg;
|
||||
@@ -710,7 +710,7 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s
|
||||
return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(arg2));
|
||||
case SLJIT_MOV_U8:
|
||||
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
|
||||
- return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (7 << 10));
|
||||
+ return push_inst(compiler, (UBFM ^ W_OP) | RD(dst) | RN(arg2) | (7 << 10));
|
||||
case SLJIT_MOV_S8:
|
||||
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
|
||||
if (!(flags & INT_OP))
|
||||
@@ -718,7 +718,7 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s
|
||||
return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (7 << 10));
|
||||
case SLJIT_MOV_U16:
|
||||
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
|
||||
- return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (15 << 10));
|
||||
+ return push_inst(compiler, (UBFM ^ W_OP) | RD(dst) | RN(arg2) | (15 << 10));
|
||||
case SLJIT_MOV_S16:
|
||||
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
|
||||
if (!(flags & INT_OP))
|
||||
@@ -728,7 +728,7 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s
|
||||
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
|
||||
if ((flags & INT_OP) && dst == arg2)
|
||||
return SLJIT_SUCCESS;
|
||||
- return push_inst(compiler, (ORR ^ (1 << 31)) | RD(dst) | RN(TMP_ZERO) | RM(arg2));
|
||||
+ return push_inst(compiler, (ORR ^ W_OP) | RD(dst) | RN(TMP_ZERO) | RM(arg2));
|
||||
case SLJIT_MOV_S32:
|
||||
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
|
||||
if ((flags & INT_OP) && dst == arg2)
|
||||
@@ -1080,7 +1080,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp
|
||||
|
||||
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
|
||||
{
|
||||
- sljit_ins inv_bits = (op & SLJIT_I32_OP) ? (1 << 31) : 0;
|
||||
+ sljit_ins inv_bits = (op & SLJIT_I32_OP) ? W_OP : 0;
|
||||
|
||||
CHECK_ERROR();
|
||||
CHECK(check_sljit_emit_op0(compiler, op));
|
||||
@@ -1360,7 +1360,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_comp
|
||||
sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0;
|
||||
|
||||
if (GET_OPCODE(op) == SLJIT_CONV_S32_FROM_F64)
|
||||
- inv_bits |= (1 << 31);
|
||||
+ inv_bits |= W_OP;
|
||||
|
||||
if (src & SLJIT_MEM) {
|
||||
emit_fop_mem(compiler, (op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE, TMP_FREG1, src, srcw);
|
||||
@@ -1382,7 +1382,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp
|
||||
sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0;
|
||||
|
||||
if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32)
|
||||
- inv_bits |= (1 << 31);
|
||||
+ inv_bits |= W_OP;
|
||||
|
||||
if (src & SLJIT_MEM) {
|
||||
emit_op_mem(compiler, ((GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32) ? INT_SIZE : WORD_SIZE), TMP_REG1, src, srcw, TMP_REG1);
|
||||
@@ -1662,7 +1662,7 @@ static SLJIT_INLINE struct sljit_jump* emit_cmp_to0(struct sljit_compiler *compi
|
||||
sljit_s32 src, sljit_sw srcw)
|
||||
{
|
||||
struct sljit_jump *jump;
|
||||
- sljit_ins inv_bits = (type & SLJIT_I32_OP) ? (1 << 31) : 0;
|
||||
+ sljit_ins inv_bits = (type & SLJIT_I32_OP) ? W_OP : 0;
|
||||
|
||||
SLJIT_ASSERT((type & 0xff) == SLJIT_EQUAL || (type & 0xff) == SLJIT_NOT_EQUAL);
|
||||
ADJUST_LOCAL_OFFSET(src, srcw);
|
||||
@@ -1787,7 +1787,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil
|
||||
sljit_s32 dst_reg,
|
||||
sljit_s32 src, sljit_sw srcw)
|
||||
{
|
||||
- sljit_ins inv_bits = (dst_reg & SLJIT_I32_OP) ? (1 << 31) : 0;
|
||||
+ sljit_ins inv_bits = (dst_reg & SLJIT_I32_OP) ? W_OP : 0;
|
||||
sljit_ins cc;
|
||||
|
||||
CHECK_ERROR();
|
||||
diff --git a/src/sljit/sljitNativePPC_common.c b/src/sljit/sljitNativePPC_common.c
|
||||
index 5ef4ac9..b34e396 100644
|
||||
--- a/src/sljit/sljitNativePPC_common.c
|
||||
+++ b/src/sljit/sljitNativePPC_common.c
|
||||
@@ -42,7 +42,7 @@ typedef sljit_u32 sljit_ins;
|
||||
#include <sys/cache.h>
|
||||
#endif
|
||||
|
||||
-#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
|
||||
+#if (defined _CALL_ELF && _CALL_ELF == 2)
|
||||
#define SLJIT_PASS_ENTRY_ADDR_TO_CALL 1
|
||||
#endif
|
||||
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,278 +0,0 @@
|
||||
From 700b88ca0a5ef116431376d23e52bcfa71863b70 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Wed, 19 Sep 2018 16:33:09 +0000
|
||||
Subject: [PATCH] Provide alternative POSIX names.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1013 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
Petr Písař: Ported to 10.32.
|
||||
---
|
||||
README | 27 +++++++++++++--------------
|
||||
doc/pcre2posix.3 | 24 +++++++++++++++++++++---
|
||||
src/pcre2posix.c | 46 +++++++++++++++++++++++++++++++++++++++-------
|
||||
src/pcre2posix.h | 18 +++++++++++++++---
|
||||
|
||||
diff --git a/README b/README
|
||||
index 2eb621b..ae8adf8 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -42,18 +42,18 @@ the 16-bit library, which processes strings of 16-bit values, and one for the
|
||||
32-bit library, which processes strings of 32-bit values. There are no C++
|
||||
wrappers.
|
||||
|
||||
-The distribution does contain a set of C wrapper functions for the 8-bit
|
||||
-library that are based on the POSIX regular expression API (see the pcre2posix
|
||||
-man page). These can be found in a library called libpcre2-posix. Note that
|
||||
-this just provides a POSIX calling interface to PCRE2; the regular expressions
|
||||
-themselves still follow Perl syntax and semantics. The POSIX API is restricted,
|
||||
-and does not give full access to all of PCRE2's facilities.
|
||||
+In addition, the distribution contains a set of C wrapper functions for the
|
||||
+8-bit library that are based on the POSIX regular expression API (see the
|
||||
+pcre2posix man page). These are built into a library called libpcre2-posix.
|
||||
+Note that this just provides a POSIX calling interface to PCRE2; the regular
|
||||
+expressions themselves still follow Perl syntax and semantics. The POSIX API is
|
||||
+restricted, and does not give full access to all of PCRE2's facilities.
|
||||
|
||||
The header file for the POSIX-style functions is called pcre2posix.h. The
|
||||
official POSIX name is regex.h, but I did not want to risk possible problems
|
||||
with existing files of that name by distributing it that way. To use PCRE2 with
|
||||
an existing program that uses the POSIX API, pcre2posix.h will have to be
|
||||
-renamed or pointed at by a link.
|
||||
+renamed or pointed at by a link (or the program modified, of course).
|
||||
|
||||
If you are using the POSIX interface to PCRE2 and there is already a POSIX
|
||||
regex library installed on your system, as well as worrying about the regex.h
|
||||
@@ -61,12 +61,11 @@ header file (as mentioned above), you must also take care when linking programs
|
||||
to ensure that they link with PCRE2's libpcre2-posix library. Otherwise they
|
||||
may pick up the POSIX functions of the same name from the other library.
|
||||
|
||||
-One way of avoiding this confusion is to compile PCRE2 with the addition of
|
||||
--Dregcomp=PCRE2regcomp (and similarly for the other POSIX functions) to the
|
||||
-compiler flags (CFLAGS if you are using "configure" -- see below). This has the
|
||||
-effect of renaming the functions so that the names no longer clash. Of course,
|
||||
-you have to do the same thing for your applications, or write them using the
|
||||
-new names.
|
||||
+To help with this issue, the libpcre2-posix library provides alternative names
|
||||
+for the POSIX functions. These are the POSIX names, prefixed with "pcre2_", for
|
||||
+example, pcre2_regcomp(). If an application can be compiled to use the
|
||||
+alternative names (for example by the use of -Dregcomp=pcre2_regcomp etc.) it
|
||||
+can be sure of linking with the PCRE2 functions.
|
||||
|
||||
|
||||
Documentation for PCRE2
|
||||
@@ -888,4 +887,4 @@ The distribution should contain the files listed below.
|
||||
Philip Hazel
|
||||
Email local part: ph10
|
||||
Email domain: cam.ac.uk
|
||||
-Last updated: 17 June 2018
|
||||
+Last updated: 19 September 2018
|
||||
diff --git a/doc/pcre2posix.3 b/doc/pcre2posix.3
|
||||
index 0d8b2c2..a91ccbf 100644
|
||||
--- a/doc/pcre2posix.3
|
||||
+++ b/doc/pcre2posix.3
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH PCRE2POSIX 3 "15 June 2017" "PCRE2 10.30"
|
||||
+.TH PCRE2POSIX 3 "19 September 2018" "PCRE2 10.33"
|
||||
.SH NAME
|
||||
PCRE2 - Perl-compatible regular expressions (revised API)
|
||||
.SH "SYNOPSIS"
|
||||
@@ -10,13 +10,24 @@ PCRE2 - Perl-compatible regular expressions (revised API)
|
||||
.B int regcomp(regex_t *\fIpreg\fP, const char *\fIpattern\fP,
|
||||
.B " int \fIcflags\fP);"
|
||||
.sp
|
||||
+.B int pcre2_regcomp(regex_t *\fIpreg\fP, const char *\fIpattern\fP,
|
||||
+.B " int \fIcflags\fP);"
|
||||
+.sp
|
||||
.B int regexec(const regex_t *\fIpreg\fP, const char *\fIstring\fP,
|
||||
.B " size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP);"
|
||||
.sp
|
||||
+.B int pcre2_regexec(const regex_t *\fIpreg\fP, const char *\fIstring\fP,
|
||||
+.B " size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP);"
|
||||
+.sp
|
||||
.B "size_t regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP,"
|
||||
.B " char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP);"
|
||||
.sp
|
||||
+.B "size_t pcre2_regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP,"
|
||||
+.B " char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP);"
|
||||
+.sp
|
||||
.B void regfree(regex_t *\fIpreg\fP);
|
||||
+.sp
|
||||
+.B void pcre2_regfree(regex_t *\fIpreg\fP);
|
||||
.fi
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
@@ -38,6 +49,13 @@ header file, and on Unix systems the library itself is called
|
||||
command for linking an application that uses them. Because the POSIX functions
|
||||
call the native ones, it is also necessary to add \fB-lpcre2-8\fP.
|
||||
.P
|
||||
+When another POSIX regex library is also installed, there is the possibility of
|
||||
+linking an application with the wrong library. To help avoid this issue, the
|
||||
+PCRE2 POSIX library provides alternative names for the functions, all starting
|
||||
+with "pcre2_". If an application uses these names, possible ambiguity is
|
||||
+avoided. In the following description, however, the standard POSIX function
|
||||
+names are used.
|
||||
+.P
|
||||
Those POSIX option bits that can reasonably be mapped to PCRE2 native options
|
||||
have been implemented. In addition, the option REG_EXTENDED is defined with the
|
||||
value zero. This has no effect, but since programs that are written to the
|
||||
@@ -300,6 +318,6 @@ Cambridge, England.
|
||||
.rs
|
||||
.sp
|
||||
.nf
|
||||
-Last updated: 15 June 2017
|
||||
-Copyright (c) 1997-2017 University of Cambridge.
|
||||
+Last updated: 19 September 2018
|
||||
+Copyright (c) 1997-2018 University of Cambridge.
|
||||
.fi
|
||||
diff --git a/src/pcre2posix.c b/src/pcre2posix.c
|
||||
index 7b9f477..3666100 100644
|
||||
--- a/src/pcre2posix.c
|
||||
+++ b/src/pcre2posix.c
|
||||
@@ -40,7 +40,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
/* This module is a wrapper that provides a POSIX API to the underlying PCRE2
|
||||
-functions. */
|
||||
+functions. The operative functions are called pcre2_regcomp(), etc., with
|
||||
+wrappers that use the plain POSIX names. This makes it easier for an
|
||||
+application to be sure it gets the PCRE2 versions in the presence of other
|
||||
+POSIX regex libraries. */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -170,13 +173,44 @@ static const char *const pstring[] = {
|
||||
|
||||
|
||||
|
||||
+/*************************************************
|
||||
+* Wrappers with traditional POSIX names *
|
||||
+*************************************************/
|
||||
+
|
||||
+PCRE2POSIX_EXP_DEFN size_t PCRE2_CALL_CONVENTION
|
||||
+regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
|
||||
+{
|
||||
+return pcre2_regerror(errcode, preg, errbuf, errbuf_size);
|
||||
+}
|
||||
+
|
||||
+PCRE2POSIX_EXP_DEFN void PCRE2_CALL_CONVENTION
|
||||
+regfree(regex_t *preg)
|
||||
+{
|
||||
+pcre2_regfree(preg);
|
||||
+}
|
||||
+
|
||||
+PCRE2POSIX_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
+regcomp(regex_t *preg, const char *pattern, int cflags)
|
||||
+{
|
||||
+return pcre2_regcomp(preg, pattern, cflags);
|
||||
+}
|
||||
+
|
||||
+PCRE2POSIX_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
+regexec(const regex_t *preg, const char *string, size_t nmatch,
|
||||
+ regmatch_t pmatch[], int eflags)
|
||||
+{
|
||||
+return pcre2_regexec(preg, string, nmatch, pmatch, eflags);
|
||||
+}
|
||||
+
|
||||
+
|
||||
|
||||
/*************************************************
|
||||
* Translate error code to string *
|
||||
*************************************************/
|
||||
|
||||
PCRE2POSIX_EXP_DEFN size_t PCRE2_CALL_CONVENTION
|
||||
-regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
|
||||
+pcre2_regerror(int errcode, const regex_t *preg, char *errbuf,
|
||||
+ size_t errbuf_size)
|
||||
{
|
||||
int used;
|
||||
const char *message;
|
||||
@@ -199,13 +233,12 @@ return used + 1;
|
||||
|
||||
|
||||
|
||||
-
|
||||
/*************************************************
|
||||
* Free store held by a regex *
|
||||
*************************************************/
|
||||
|
||||
PCRE2POSIX_EXP_DEFN void PCRE2_CALL_CONVENTION
|
||||
-regfree(regex_t *preg)
|
||||
+pcre2_regfree(regex_t *preg)
|
||||
{
|
||||
pcre2_match_data_free(preg->re_match_data);
|
||||
pcre2_code_free(preg->re_pcre2_code);
|
||||
@@ -213,7 +246,6 @@ pcre2_code_free(preg->re_pcre2_code);
|
||||
|
||||
|
||||
|
||||
-
|
||||
/*************************************************
|
||||
* Compile a regular expression *
|
||||
*************************************************/
|
||||
@@ -229,7 +261,7 @@ Returns: 0 on success
|
||||
*/
|
||||
|
||||
PCRE2POSIX_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
-regcomp(regex_t *preg, const char *pattern, int cflags)
|
||||
+pcre2_regcomp(regex_t *preg, const char *pattern, int cflags)
|
||||
{
|
||||
PCRE2_SIZE erroffset;
|
||||
PCRE2_SIZE patlen;
|
||||
@@ -296,7 +328,7 @@ for each match. If REG_NOSUB was specified at compile time, the nmatch and
|
||||
pmatch arguments are ignored, and the only result is yes/no/error. */
|
||||
|
||||
PCRE2POSIX_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
-regexec(const regex_t *preg, const char *string, size_t nmatch,
|
||||
+pcre2_regexec(const regex_t *preg, const char *string, size_t nmatch,
|
||||
regmatch_t pmatch[], int eflags)
|
||||
{
|
||||
int rc, so, eo;
|
||||
diff --git a/src/pcre2posix.h b/src/pcre2posix.h
|
||||
index 4ae1d3c..bfe347e 100644
|
||||
--- a/src/pcre2posix.h
|
||||
+++ b/src/pcre2posix.h
|
||||
@@ -3,11 +3,13 @@
|
||||
*************************************************/
|
||||
|
||||
/* PCRE2 is a library of functions to support regular expressions whose syntax
|
||||
-and semantics are as close as possible to those of the Perl 5 language.
|
||||
+and semantics are as close as possible to those of the Perl 5 language. This is
|
||||
+the public header file to be #included by applications that call PCRE2 via the
|
||||
+POSIX wrapper interface.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
- New API code Copyright (c) 2016 University of Cambridge
|
||||
+ New API code Copyright (c) 2016-2018 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -136,12 +138,22 @@ file. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-/* The functions */
|
||||
+/* The functions. The actual code is in functions with pcre2_xxx names for
|
||||
+uniqueness. Wrappers with the POSIX names are provided for those who can ensure
|
||||
+they get them from the PCRE2 library and not by accident from elsewhere. */
|
||||
|
||||
+PCRE2POSIX_EXP_DECL int pcre2_regcomp(regex_t *, const char *, int);
|
||||
PCRE2POSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
|
||||
+
|
||||
+PCRE2POSIX_EXP_DECL int pcre2_regexec(const regex_t *, const char *, size_t,
|
||||
+ regmatch_t *, int);
|
||||
PCRE2POSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
|
||||
regmatch_t *, int);
|
||||
+
|
||||
+PCRE2POSIX_EXP_DECL size_t pcre2_regerror(int, const regex_t *, char *, size_t);
|
||||
PCRE2POSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
|
||||
+
|
||||
+PCRE2POSIX_EXP_DECL void pcre2_regfree(regex_t *);
|
||||
PCRE2POSIX_EXP_DECL void regfree(regex_t *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,976 +0,0 @@
|
||||
From 29a7c30ba6edafe863c01725f3caa876c89398ca Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Wed, 30 Jan 2019 16:11:16 +0000
|
||||
Subject: [PATCH] Update POSIX wrapper to use macros in the .h file, but also
|
||||
have the POSIX function names in the library.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1064 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
|
||||
Petr Písař: Ported to 10.32.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
README | 17 +----
|
||||
doc/html/README.txt | 18 +----
|
||||
doc/html/pcre2posix.html | 152 +++++++++++++++++++++----------------
|
||||
doc/pcre2.txt | 157 ++++++++++++++++++++++-----------------
|
||||
doc/pcre2posix.3 | 133 +++++++++++++++++----------------
|
||||
src/pcre2posix.c | 27 +++++--
|
||||
src/pcre2posix.h | 29 +++++---
|
||||
7 files changed, 291 insertions(+), 242 deletions(-)
|
||||
|
||||
diff --git a/README b/README
|
||||
index ae8adf8..4c3a3bf 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -53,19 +53,8 @@ The header file for the POSIX-style functions is called pcre2posix.h. The
|
||||
official POSIX name is regex.h, but I did not want to risk possible problems
|
||||
with existing files of that name by distributing it that way. To use PCRE2 with
|
||||
an existing program that uses the POSIX API, pcre2posix.h will have to be
|
||||
-renamed or pointed at by a link (or the program modified, of course).
|
||||
-
|
||||
-If you are using the POSIX interface to PCRE2 and there is already a POSIX
|
||||
-regex library installed on your system, as well as worrying about the regex.h
|
||||
-header file (as mentioned above), you must also take care when linking programs
|
||||
-to ensure that they link with PCRE2's libpcre2-posix library. Otherwise they
|
||||
-may pick up the POSIX functions of the same name from the other library.
|
||||
-
|
||||
-To help with this issue, the libpcre2-posix library provides alternative names
|
||||
-for the POSIX functions. These are the POSIX names, prefixed with "pcre2_", for
|
||||
-example, pcre2_regcomp(). If an application can be compiled to use the
|
||||
-alternative names (for example by the use of -Dregcomp=pcre2_regcomp etc.) it
|
||||
-can be sure of linking with the PCRE2 functions.
|
||||
+renamed or pointed at by a link (or the program modified, of course). See the
|
||||
+pcre2posix documentation for more details.
|
||||
|
||||
|
||||
Documentation for PCRE2
|
||||
@@ -887,4 +876,4 @@ The distribution should contain the files listed below.
|
||||
Philip Hazel
|
||||
Email local part: ph10
|
||||
Email domain: cam.ac.uk
|
||||
-Last updated: 19 September 2018
|
||||
+Last updated: 29 January 2019
|
||||
diff --git a/doc/html/README.txt b/doc/html/README.txt
|
||||
index 2eb621b..4cd57e6 100644
|
||||
--- a/doc/html/README.txt
|
||||
+++ b/doc/html/README.txt
|
||||
@@ -53,20 +53,8 @@ The header file for the POSIX-style functions is called pcre2posix.h. The
|
||||
official POSIX name is regex.h, but I did not want to risk possible problems
|
||||
with existing files of that name by distributing it that way. To use PCRE2 with
|
||||
an existing program that uses the POSIX API, pcre2posix.h will have to be
|
||||
-renamed or pointed at by a link.
|
||||
-
|
||||
-If you are using the POSIX interface to PCRE2 and there is already a POSIX
|
||||
-regex library installed on your system, as well as worrying about the regex.h
|
||||
-header file (as mentioned above), you must also take care when linking programs
|
||||
-to ensure that they link with PCRE2's libpcre2-posix library. Otherwise they
|
||||
-may pick up the POSIX functions of the same name from the other library.
|
||||
-
|
||||
-One way of avoiding this confusion is to compile PCRE2 with the addition of
|
||||
--Dregcomp=PCRE2regcomp (and similarly for the other POSIX functions) to the
|
||||
-compiler flags (CFLAGS if you are using "configure" -- see below). This has the
|
||||
-effect of renaming the functions so that the names no longer clash. Of course,
|
||||
-you have to do the same thing for your applications, or write them using the
|
||||
-new names.
|
||||
+renamed or pointed at by a link (or the program modified, of course). See the
|
||||
+pcre2posix documentation for more details.
|
||||
|
||||
|
||||
Documentation for PCRE2
|
||||
@@ -888,4 +876,4 @@ The distribution should contain the files listed below.
|
||||
Philip Hazel
|
||||
Email local part: ph10
|
||||
Email domain: cam.ac.uk
|
||||
-Last updated: 17 June 2018
|
||||
+Last updated: 29 January 2019
|
||||
diff --git a/doc/html/pcre2posix.html b/doc/html/pcre2posix.html
|
||||
index 1da2460..b03948e 100644
|
||||
--- a/doc/html/pcre2posix.html
|
||||
+++ b/doc/html/pcre2posix.html
|
||||
@@ -15,51 +15,75 @@ please consult the man page, in case the conversion went wrong.
|
||||
<ul>
|
||||
<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
|
||||
<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
|
||||
-<li><a name="TOC3" href="#SEC3">COMPILING A PATTERN</a>
|
||||
-<li><a name="TOC4" href="#SEC4">MATCHING NEWLINE CHARACTERS</a>
|
||||
-<li><a name="TOC5" href="#SEC5">MATCHING A PATTERN</a>
|
||||
-<li><a name="TOC6" href="#SEC6">ERROR MESSAGES</a>
|
||||
-<li><a name="TOC7" href="#SEC7">MEMORY USAGE</a>
|
||||
-<li><a name="TOC8" href="#SEC8">AUTHOR</a>
|
||||
-<li><a name="TOC9" href="#SEC9">REVISION</a>
|
||||
+<li><a name="TOC3" href="#SEC3">USING THE POSIX FUNCTIONS</a>
|
||||
+<li><a name="TOC4" href="#SEC4">COMPILING A PATTERN</a>
|
||||
+<li><a name="TOC5" href="#SEC5">MATCHING NEWLINE CHARACTERS</a>
|
||||
+<li><a name="TOC6" href="#SEC6">MATCHING A PATTERN</a>
|
||||
+<li><a name="TOC7" href="#SEC7">ERROR MESSAGES</a>
|
||||
+<li><a name="TOC8" href="#SEC8">MEMORY USAGE</a>
|
||||
+<li><a name="TOC9" href="#SEC9">AUTHOR</a>
|
||||
+<li><a name="TOC10" href="#SEC10">REVISION</a>
|
||||
</ul>
|
||||
<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
|
||||
<P>
|
||||
<b>#include <pcre2posix.h></b>
|
||||
</P>
|
||||
<P>
|
||||
-<b>int regcomp(regex_t *<i>preg</i>, const char *<i>pattern</i>,</b>
|
||||
+<b>int pcre2_regcomp(regex_t *<i>preg</i>, const char *<i>pattern</i>,</b>
|
||||
<b> int <i>cflags</i>);</b>
|
||||
<br>
|
||||
<br>
|
||||
-<b>int regexec(const regex_t *<i>preg</i>, const char *<i>string</i>,</b>
|
||||
+<b>int pcre2_regexec(const regex_t *<i>preg</i>, const char *<i>string</i>,</b>
|
||||
<b> size_t <i>nmatch</i>, regmatch_t <i>pmatch</i>[], int <i>eflags</i>);</b>
|
||||
<br>
|
||||
<br>
|
||||
-<b>size_t regerror(int <i>errcode</i>, const regex_t *<i>preg</i>,</b>
|
||||
+<b>size_t pcre2_regerror(int <i>errcode</i>, const regex_t *<i>preg</i>,</b>
|
||||
<b> char *<i>errbuf</i>, size_t <i>errbuf_size</i>);</b>
|
||||
<br>
|
||||
<br>
|
||||
-<b>void regfree(regex_t *<i>preg</i>);</b>
|
||||
+<b>void pcre2_regfree(regex_t *<i>preg</i>);</b>
|
||||
</P>
|
||||
<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
|
||||
<P>
|
||||
This set of functions provides a POSIX-style API for the PCRE2 regular
|
||||
-expression 8-bit library. See the
|
||||
+expression 8-bit library. There are no POSIX-style wrappers for PCRE2's 16-bit
|
||||
+and 32-bit libraries. See the
|
||||
<a href="pcre2api.html"><b>pcre2api</b></a>
|
||||
documentation for a description of PCRE2's native API, which contains much
|
||||
-additional functionality. There are no POSIX-style wrappers for PCRE2's 16-bit
|
||||
-and 32-bit libraries.
|
||||
+additional functionality.
|
||||
</P>
|
||||
<P>
|
||||
-The functions described here are just wrapper functions that ultimately call
|
||||
-the PCRE2 native API. Their prototypes are defined in the <b>pcre2posix.h</b>
|
||||
-header file, and on Unix systems the library itself is called
|
||||
-<b>libpcre2-posix.a</b>, so can be accessed by adding <b>-lpcre2-posix</b> to the
|
||||
-command for linking an application that uses them. Because the POSIX functions
|
||||
-call the native ones, it is also necessary to add <b>-lpcre2-8</b>.
|
||||
+The functions described here are wrapper functions that ultimately call the
|
||||
+PCRE2 native API. Their prototypes are defined in the <b>pcre2posix.h</b> header
|
||||
+file, and they all have unique names starting with <b>pcre2_</b>. However, the
|
||||
+<b>pcre2posix.h</b> header also contains macro definitions that convert the
|
||||
+standard POSIX names such <b>regcomp()</b> into <b>pcre2_regcomp()</b> etc. This
|
||||
+means that a program can use the usual POSIX names without running the risk of
|
||||
+accidentally linking with POSIX functions from a different library.
|
||||
</P>
|
||||
<P>
|
||||
+On Unix-like systems the PCRE2 POSIX library is called <b>libpcre2-posix</b>, so
|
||||
+can be accessed by adding <b>-lpcre2-posix</b> to the command for linking an
|
||||
+application. Because the POSIX functions call the native ones, it is also
|
||||
+necessary to add <b>-lpcre2-8</b>.
|
||||
+</P>
|
||||
+<P>
|
||||
+Although they are not defined as protypes in <b>pcre2posix.h</b>, the library
|
||||
+does contain functions with the POSIX names <b>regcomp()</b> etc. These simply
|
||||
+pass their arguments to the PCRE2 functions. These functions are provided for
|
||||
+backwards compatibility with earlier versions of PCRE2, so that existing
|
||||
+programs do not have to be recompiled.
|
||||
+</P>
|
||||
+<P>
|
||||
+Calling the header file <b>pcre2posix.h</b> avoids any conflict with other POSIX
|
||||
+libraries. It can, of course, be renamed or aliased as <b>regex.h</b>, which is
|
||||
+the "correct" name, if there is no clash. It provides two structure types,
|
||||
+<i>regex_t</i> for compiled internal forms, and <i>regmatch_t</i> for returning
|
||||
+captured substrings. It also defines some constants whose names start with
|
||||
+"REG_"; these are used for setting options and identifying error codes.
|
||||
+</P>
|
||||
+<br><a name="SEC3" href="#TOC1">USING THE POSIX FUNCTIONS</a><br>
|
||||
+<P>
|
||||
Those POSIX option bits that can reasonably be mapped to PCRE2 native options
|
||||
have been implemented. In addition, the option REG_EXTENDED is defined with the
|
||||
value zero. This has no effect, but since programs that are written to the
|
||||
@@ -80,17 +104,13 @@ POSIX definition; it is not fully POSIX-compatible, and in multi-unit encoding
|
||||
domains it is probably even less compatible.
|
||||
</P>
|
||||
<P>
|
||||
-The header for these functions is supplied as <b>pcre2posix.h</b> to avoid any
|
||||
-potential clash with other POSIX libraries. It can, of course, be renamed or
|
||||
-aliased as <b>regex.h</b>, which is the "correct" name. It provides two
|
||||
-structure types, <i>regex_t</i> for compiled internal forms, and
|
||||
-<i>regmatch_t</i> for returning captured substrings. It also defines some
|
||||
-constants whose names start with "REG_"; these are used for setting options and
|
||||
-identifying error codes.
|
||||
+The descriptions below use the actual names of the functions, but, as described
|
||||
+above, the standard POSIX names (without the <b>pcre2_</b> prefix) may also be
|
||||
+used.
|
||||
</P>
|
||||
-<br><a name="SEC3" href="#TOC1">COMPILING A PATTERN</a><br>
|
||||
+<br><a name="SEC4" href="#TOC1">COMPILING A PATTERN</a><br>
|
||||
<P>
|
||||
-The function <b>regcomp()</b> is called to compile a pattern into an
|
||||
+The function <b>pcre2_regcomp()</b> is called to compile a pattern into an
|
||||
internal form. By default, the pattern is a C string terminated by a binary
|
||||
zero (but see REG_PEND below). The <i>preg</i> argument is a pointer to a
|
||||
<b>regex_t</b> structure that is used as a base for storing information about
|
||||
@@ -128,18 +148,18 @@ REG_UTF. Note that REG_NOSPEC is not part of the POSIX standard.
|
||||
<pre>
|
||||
REG_NOSUB
|
||||
</pre>
|
||||
-When a pattern that is compiled with this flag is passed to <b>regexec()</b> for
|
||||
-matching, the <i>nmatch</i> and <i>pmatch</i> arguments are ignored, and no
|
||||
-captured strings are returned. Versions of the PCRE library prior to 10.22 used
|
||||
-to set the PCRE2_NO_AUTO_CAPTURE compile option, but this no longer happens
|
||||
-because it disables the use of backreferences.
|
||||
+When a pattern that is compiled with this flag is passed to
|
||||
+<b>pcre2_regexec()</b> for matching, the <i>nmatch</i> and <i>pmatch</i> arguments
|
||||
+are ignored, and no captured strings are returned. Versions of the PCRE library
|
||||
+prior to 10.22 used to set the PCRE2_NO_AUTO_CAPTURE compile option, but this
|
||||
+no longer happens because it disables the use of backreferences.
|
||||
<pre>
|
||||
REG_PEND
|
||||
</pre>
|
||||
If this option is set, the <b>reg_endp</b> field in the <i>preg</i> structure
|
||||
(which has the type const char *) must be set to point to the character beyond
|
||||
-the end of the pattern before calling <b>regcomp()</b>. The pattern itself may
|
||||
-now contain binary zeros, which are treated as data characters. Without
|
||||
+the end of the pattern before calling <b>pcre2_regcomp()</b>. The pattern itself
|
||||
+may now contain binary zeros, which are treated as data characters. Without
|
||||
REG_PEND, a binary zero terminates the pattern and the <b>re_endp</b> field is
|
||||
ignored. This is a GNU extension to the POSIX standard and should be used with
|
||||
caution in software intended to be portable to other systems.
|
||||
@@ -174,18 +194,19 @@ newlines are matched by the dot metacharacter (they are not) or by a negative
|
||||
class such as [^a] (they are).
|
||||
</P>
|
||||
<P>
|
||||
-The yield of <b>regcomp()</b> is zero on success, and non-zero otherwise. The
|
||||
-<i>preg</i> structure is filled in on success, and one other member of the
|
||||
+The yield of <b>pcre2_regcomp()</b> is zero on success, and non-zero otherwise.
|
||||
+The <i>preg</i> structure is filled in on success, and one other member of the
|
||||
structure (as well as <i>re_endp</i>) is public: <i>re_nsub</i> contains the
|
||||
number of capturing subpatterns in the regular expression. Various error codes
|
||||
are defined in the header file.
|
||||
</P>
|
||||
<P>
|
||||
-NOTE: If the yield of <b>regcomp()</b> is non-zero, you must not attempt to
|
||||
-use the contents of the <i>preg</i> structure. If, for example, you pass it to
|
||||
-<b>regexec()</b>, the result is undefined and your program is likely to crash.
|
||||
+NOTE: If the yield of <b>pcre2_regcomp()</b> is non-zero, you must not attempt
|
||||
+to use the contents of the <i>preg</i> structure. If, for example, you pass it
|
||||
+to <b>pcre2_regexec()</b>, the result is undefined and your program is likely to
|
||||
+crash.
|
||||
</P>
|
||||
-<br><a name="SEC4" href="#TOC1">MATCHING NEWLINE CHARACTERS</a><br>
|
||||
+<br><a name="SEC5" href="#TOC1">MATCHING NEWLINE CHARACTERS</a><br>
|
||||
<P>
|
||||
This area is not simple, because POSIX and Perl take different views of things.
|
||||
It is not possible to get PCRE2 to obey POSIX semantics, but then PCRE2 was
|
||||
@@ -219,16 +240,16 @@ is no way to stop newline from matching [^a].
|
||||
Default POSIX newline handling can be obtained by setting PCRE2_DOTALL and
|
||||
PCRE2_DOLLAR_ENDONLY when calling <b>pcre2_compile()</b> directly, but there is
|
||||
no way to make PCRE2 behave exactly as for the REG_NEWLINE action. When using
|
||||
-the POSIX API, passing REG_NEWLINE to PCRE2's <b>regcomp()</b> function
|
||||
+the POSIX API, passing REG_NEWLINE to PCRE2's <b>pcre2_regcomp()</b> function
|
||||
causes PCRE2_MULTILINE to be passed to <b>pcre2_compile()</b>, and REG_DOTALL
|
||||
passes PCRE2_DOTALL. There is no way to pass PCRE2_DOLLAR_ENDONLY.
|
||||
</P>
|
||||
-<br><a name="SEC5" href="#TOC1">MATCHING A PATTERN</a><br>
|
||||
+<br><a name="SEC6" href="#TOC1">MATCHING A PATTERN</a><br>
|
||||
<P>
|
||||
-The function <b>regexec()</b> is called to match a compiled pattern <i>preg</i>
|
||||
-against a given <i>string</i>, which is by default terminated by a zero byte
|
||||
-(but see REG_STARTEND below), subject to the options in <i>eflags</i>. These can
|
||||
-be:
|
||||
+The function <b>pcre2_regexec()</b> is called to match a compiled pattern
|
||||
+<i>preg</i> against a given <i>string</i>, which is by default terminated by a
|
||||
+zero byte (but see REG_STARTEND below), subject to the options in <i>eflags</i>.
|
||||
+These can be:
|
||||
<pre>
|
||||
REG_NOTBOL
|
||||
</pre>
|
||||
@@ -272,7 +293,7 @@ are mutually exclusive; the error REG_INVARG is returned.
|
||||
<P>
|
||||
If the pattern was compiled with the REG_NOSUB flag, no data about any matched
|
||||
strings is returned. The <i>nmatch</i> and <i>pmatch</i> arguments of
|
||||
-<b>regexec()</b> are ignored (except possibly as input for REG_STARTEND).
|
||||
+<b>pcre2_regexec()</b> are ignored (except possibly as input for REG_STARTEND).
|
||||
</P>
|
||||
<P>
|
||||
The value of <i>nmatch</i> may be zero, and the value <i>pmatch</i> may be NULL
|
||||
@@ -294,24 +315,25 @@ array have both structure members set to -1.
|
||||
A successful match yields a zero return; various error codes are defined in the
|
||||
header file, of which REG_NOMATCH is the "expected" failure code.
|
||||
</P>
|
||||
-<br><a name="SEC6" href="#TOC1">ERROR MESSAGES</a><br>
|
||||
+<br><a name="SEC7" href="#TOC1">ERROR MESSAGES</a><br>
|
||||
<P>
|
||||
-The <b>regerror()</b> function maps a non-zero errorcode from either
|
||||
-<b>regcomp()</b> or <b>regexec()</b> to a printable message. If <i>preg</i> is not
|
||||
-NULL, the error should have arisen from the use of that structure. A message
|
||||
-terminated by a binary zero is placed in <i>errbuf</i>. If the buffer is too
|
||||
-short, only the first <i>errbuf_size</i> - 1 characters of the error message are
|
||||
-used. The yield of the function is the size of buffer needed to hold the whole
|
||||
-message, including the terminating zero. This value is greater than
|
||||
-<i>errbuf_size</i> if the message was truncated.
|
||||
+The <b>pcre2_regerror()</b> function maps a non-zero errorcode from either
|
||||
+<b>pcre2_regcomp()</b> or <b>pcre2_regexec()</b> to a printable message. If
|
||||
+<i>preg</i> is not NULL, the error should have arisen from the use of that
|
||||
+structure. A message terminated by a binary zero is placed in <i>errbuf</i>. If
|
||||
+the buffer is too short, only the first <i>errbuf_size</i> - 1 characters of the
|
||||
+error message are used. The yield of the function is the size of buffer needed
|
||||
+to hold the whole message, including the terminating zero. This value is
|
||||
+greater than <i>errbuf_size</i> if the message was truncated.
|
||||
</P>
|
||||
-<br><a name="SEC7" href="#TOC1">MEMORY USAGE</a><br>
|
||||
+<br><a name="SEC8" href="#TOC1">MEMORY USAGE</a><br>
|
||||
<P>
|
||||
Compiling a regular expression causes memory to be allocated and associated
|
||||
-with the <i>preg</i> structure. The function <b>regfree()</b> frees all such
|
||||
-memory, after which <i>preg</i> may no longer be used as a compiled expression.
|
||||
+with the <i>preg</i> structure. The function <b>pcre2_regfree()</b> frees all
|
||||
+such memory, after which <i>preg</i> may no longer be used as a compiled
|
||||
+expression.
|
||||
</P>
|
||||
-<br><a name="SEC8" href="#TOC1">AUTHOR</a><br>
|
||||
+<br><a name="SEC9" href="#TOC1">AUTHOR</a><br>
|
||||
<P>
|
||||
Philip Hazel
|
||||
<br>
|
||||
@@ -320,11 +342,11 @@ University Computing Service
|
||||
Cambridge, England.
|
||||
<br>
|
||||
</P>
|
||||
-<br><a name="SEC9" href="#TOC1">REVISION</a><br>
|
||||
+<br><a name="SEC10" href="#TOC1">REVISION</a><br>
|
||||
<P>
|
||||
-Last updated: 15 June 2017
|
||||
+Last updated: 30 January 2019
|
||||
<br>
|
||||
-Copyright © 1997-2017 University of Cambridge.
|
||||
+Copyright © 1997-2019 University of Cambridge.
|
||||
<br>
|
||||
<p>
|
||||
Return to the <a href="index.html">PCRE2 index page</a>.
|
||||
diff --git a/doc/pcre2.txt b/doc/pcre2.txt
|
||||
index 30ba2f9..b8d2d20 100644
|
||||
--- a/doc/pcre2.txt
|
||||
+++ b/doc/pcre2.txt
|
||||
@@ -9362,33 +9362,56 @@ SYNOPSIS
|
||||
|
||||
#include <pcre2posix.h>
|
||||
|
||||
- int regcomp(regex_t *preg, const char *pattern,
|
||||
+ int pcre2_regcomp(regex_t *preg, const char *pattern,
|
||||
int cflags);
|
||||
|
||||
- int regexec(const regex_t *preg, const char *string,
|
||||
+ int pcre2_regexec(const regex_t *preg, const char *string,
|
||||
size_t nmatch, regmatch_t pmatch[], int eflags);
|
||||
|
||||
- size_t regerror(int errcode, const regex_t *preg,
|
||||
+ size_t pcre2_regerror(int errcode, const regex_t *preg,
|
||||
char *errbuf, size_t errbuf_size);
|
||||
|
||||
- void regfree(regex_t *preg);
|
||||
+ void pcre2_regfree(regex_t *preg);
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
This set of functions provides a POSIX-style API for the PCRE2 regular
|
||||
- expression 8-bit library. See the pcre2api documentation for a descrip-
|
||||
- tion of PCRE2's native API, which contains much additional functional-
|
||||
- ity. There are no POSIX-style wrappers for PCRE2's 16-bit and 32-bit
|
||||
- libraries.
|
||||
-
|
||||
- The functions described here are just wrapper functions that ultimately
|
||||
- call the PCRE2 native API. Their prototypes are defined in the
|
||||
- pcre2posix.h header file, and on Unix systems the library itself is
|
||||
- called libpcre2-posix.a, so can be accessed by adding -lpcre2-posix to
|
||||
- the command for linking an application that uses them. Because the
|
||||
- POSIX functions call the native ones, it is also necessary to add
|
||||
- -lpcre2-8.
|
||||
+ expression 8-bit library. There are no POSIX-style wrappers for PCRE2's
|
||||
+ 16-bit and 32-bit libraries. See the pcre2api documentation for a
|
||||
+ description of PCRE2's native API, which contains much additional func-
|
||||
+ tionality.
|
||||
+
|
||||
+ The functions described here are wrapper functions that ultimately call
|
||||
+ the PCRE2 native API. Their prototypes are defined in the pcre2posix.h
|
||||
+ header file, and they all have unique names starting with pcre2_. How-
|
||||
+ ever, the pcre2posix.h header also contains macro definitions that con-
|
||||
+ vert the standard POSIX names such regcomp() into pcre2_regcomp() etc.
|
||||
+ This means that a program can use the usual POSIX names without running
|
||||
+ the risk of accidentally linking with POSIX functions from a different
|
||||
+ library.
|
||||
+
|
||||
+ On Unix-like systems the PCRE2 POSIX library is called libpcre2-posix,
|
||||
+ so can be accessed by adding -lpcre2-posix to the command for linking
|
||||
+ an application. Because the POSIX functions call the native ones, it is
|
||||
+ also necessary to add -lpcre2-8.
|
||||
+
|
||||
+ Although they are not defined as protypes in pcre2posix.h, the library
|
||||
+ does contain functions with the POSIX names regcomp() etc. These simply
|
||||
+ pass their arguments to the PCRE2 functions. These functions are pro-
|
||||
+ vided for backwards compatibility with earlier versions of PCRE2, so
|
||||
+ that existing programs do not have to be recompiled.
|
||||
+
|
||||
+ Calling the header file pcre2posix.h avoids any conflict with other
|
||||
+ POSIX libraries. It can, of course, be renamed or aliased as regex.h,
|
||||
+ which is the "correct" name, if there is no clash. It provides two
|
||||
+ structure types, regex_t for compiled internal forms, and regmatch_t
|
||||
+ for returning captured substrings. It also defines some constants whose
|
||||
+ names start with "REG_"; these are used for setting options and identi-
|
||||
+ fying error codes.
|
||||
+
|
||||
+
|
||||
+USING THE POSIX FUNCTIONS
|
||||
|
||||
Those POSIX option bits that can reasonably be mapped to PCRE2 native
|
||||
options have been implemented. In addition, the option REG_EXTENDED is
|
||||
@@ -9410,23 +9433,19 @@ DESCRIPTION
|
||||
POSIX-compatible, and in multi-unit encoding domains it is probably
|
||||
even less compatible.
|
||||
|
||||
- The header for these functions is supplied as pcre2posix.h to avoid any
|
||||
- potential clash with other POSIX libraries. It can, of course, be
|
||||
- renamed or aliased as regex.h, which is the "correct" name. It provides
|
||||
- two structure types, regex_t for compiled internal forms, and reg-
|
||||
- match_t for returning captured substrings. It also defines some con-
|
||||
- stants whose names start with "REG_"; these are used for setting
|
||||
- options and identifying error codes.
|
||||
+ The descriptions below use the actual names of the functions, but, as
|
||||
+ described above, the standard POSIX names (without the pcre2_ prefix)
|
||||
+ may also be used.
|
||||
|
||||
|
||||
COMPILING A PATTERN
|
||||
|
||||
- The function regcomp() is called to compile a pattern into an internal
|
||||
- form. By default, the pattern is a C string terminated by a binary zero
|
||||
- (but see REG_PEND below). The preg argument is a pointer to a regex_t
|
||||
- structure that is used as a base for storing information about the com-
|
||||
- piled regular expression. (It is also used for input when REG_PEND is
|
||||
- set.)
|
||||
+ The function pcre2_regcomp() is called to compile a pattern into an
|
||||
+ internal form. By default, the pattern is a C string terminated by a
|
||||
+ binary zero (but see REG_PEND below). The preg argument is a pointer to
|
||||
+ a regex_t structure that is used as a base for storing information
|
||||
+ about the compiled regular expression. (It is also used for input when
|
||||
+ REG_PEND is set.)
|
||||
|
||||
The argument cflags is either zero, or contains one or more of the bits
|
||||
defined by the following macros:
|
||||
@@ -9460,21 +9479,23 @@ COMPILING A PATTERN
|
||||
|
||||
REG_NOSUB
|
||||
|
||||
- When a pattern that is compiled with this flag is passed to regexec()
|
||||
- for matching, the nmatch and pmatch arguments are ignored, and no cap-
|
||||
- tured strings are returned. Versions of the PCRE library prior to 10.22
|
||||
- used to set the PCRE2_NO_AUTO_CAPTURE compile option, but this no
|
||||
- longer happens because it disables the use of backreferences.
|
||||
+ When a pattern that is compiled with this flag is passed to
|
||||
+ pcre2_regexec() for matching, the nmatch and pmatch arguments are
|
||||
+ ignored, and no captured strings are returned. Versions of the PCRE
|
||||
+ library prior to 10.22 used to set the PCRE2_NO_AUTO_CAPTURE compile
|
||||
+ option, but this no longer happens because it disables the use of back-
|
||||
+ references.
|
||||
|
||||
REG_PEND
|
||||
|
||||
If this option is set, the reg_endp field in the preg structure (which
|
||||
has the type const char *) must be set to point to the character beyond
|
||||
- the end of the pattern before calling regcomp(). The pattern itself may
|
||||
- now contain binary zeros, which are treated as data characters. Without
|
||||
- REG_PEND, a binary zero terminates the pattern and the re_endp field is
|
||||
- ignored. This is a GNU extension to the POSIX standard and should be
|
||||
- used with caution in software intended to be portable to other systems.
|
||||
+ the end of the pattern before calling pcre2_regcomp(). The pattern
|
||||
+ itself may now contain binary zeros, which are treated as data charac-
|
||||
+ ters. Without REG_PEND, a binary zero terminates the pattern and the
|
||||
+ re_endp field is ignored. This is a GNU extension to the POSIX standard
|
||||
+ and should be used with caution in software intended to be portable to
|
||||
+ other systems.
|
||||
|
||||
REG_UCP
|
||||
|
||||
@@ -9504,15 +9525,16 @@ COMPILING A PATTERN
|
||||
It does not affect the way newlines are matched by the dot metacharac-
|
||||
ter (they are not) or by a negative class such as [^a] (they are).
|
||||
|
||||
- The yield of regcomp() is zero on success, and non-zero otherwise. The
|
||||
- preg structure is filled in on success, and one other member of the
|
||||
- structure (as well as re_endp) is public: re_nsub contains the number
|
||||
- of capturing subpatterns in the regular expression. Various error codes
|
||||
- are defined in the header file.
|
||||
+ The yield of pcre2_regcomp() is zero on success, and non-zero other-
|
||||
+ wise. The preg structure is filled in on success, and one other member
|
||||
+ of the structure (as well as re_endp) is public: re_nsub contains the
|
||||
+ number of capturing subpatterns in the regular expression. Various
|
||||
+ error codes are defined in the header file.
|
||||
|
||||
- NOTE: If the yield of regcomp() is non-zero, you must not attempt to
|
||||
- use the contents of the preg structure. If, for example, you pass it to
|
||||
- regexec(), the result is undefined and your program is likely to crash.
|
||||
+ NOTE: If the yield of pcre2_regcomp() is non-zero, you must not attempt
|
||||
+ to use the contents of the preg structure. If, for example, you pass it
|
||||
+ to pcre2_regexec(), the result is undefined and your program is likely
|
||||
+ to crash.
|
||||
|
||||
|
||||
MATCHING NEWLINE CHARACTERS
|
||||
@@ -9549,17 +9571,17 @@ MATCHING NEWLINE CHARACTERS
|
||||
Default POSIX newline handling can be obtained by setting PCRE2_DOTALL
|
||||
and PCRE2_DOLLAR_ENDONLY when calling pcre2_compile() directly, but
|
||||
there is no way to make PCRE2 behave exactly as for the REG_NEWLINE
|
||||
- action. When using the POSIX API, passing REG_NEWLINE to PCRE2's reg-
|
||||
- comp() function causes PCRE2_MULTILINE to be passed to pcre2_compile(),
|
||||
- and REG_DOTALL passes PCRE2_DOTALL. There is no way to pass PCRE2_DOL-
|
||||
- LAR_ENDONLY.
|
||||
+ action. When using the POSIX API, passing REG_NEWLINE to PCRE2's
|
||||
+ pcre2_regcomp() function causes PCRE2_MULTILINE to be passed to
|
||||
+ pcre2_compile(), and REG_DOTALL passes PCRE2_DOTALL. There is no way to
|
||||
+ pass PCRE2_DOLLAR_ENDONLY.
|
||||
|
||||
|
||||
MATCHING A PATTERN
|
||||
|
||||
- The function regexec() is called to match a compiled pattern preg
|
||||
+ The function pcre2_regexec() is called to match a compiled pattern preg
|
||||
against a given string, which is by default terminated by a zero byte
|
||||
- (but see REG_STARTEND below), subject to the options in eflags. These
|
||||
+ (but see REG_STARTEND below), subject to the options in eflags. These
|
||||
can be:
|
||||
|
||||
REG_NOTBOL
|
||||
@@ -9603,7 +9625,8 @@ MATCHING A PATTERN
|
||||
|
||||
If the pattern was compiled with the REG_NOSUB flag, no data about any
|
||||
matched strings is returned. The nmatch and pmatch arguments of
|
||||
- regexec() are ignored (except possibly as input for REG_STARTEND).
|
||||
+ pcre2_regexec() are ignored (except possibly as input for REG_STAR-
|
||||
+ TEND).
|
||||
|
||||
The value of nmatch may be zero, and the value pmatch may be NULL
|
||||
(unless REG_STARTEND is set); in both these cases no data about any
|
||||
@@ -9626,22 +9649,22 @@ MATCHING A PATTERN
|
||||
|
||||
ERROR MESSAGES
|
||||
|
||||
- The regerror() function maps a non-zero errorcode from either regcomp()
|
||||
- or regexec() to a printable message. If preg is not NULL, the error
|
||||
- should have arisen from the use of that structure. A message terminated
|
||||
- by a binary zero is placed in errbuf. If the buffer is too short, only
|
||||
- the first errbuf_size - 1 characters of the error message are used. The
|
||||
- yield of the function is the size of buffer needed to hold the whole
|
||||
- message, including the terminating zero. This value is greater than
|
||||
- errbuf_size if the message was truncated.
|
||||
+ The pcre2_regerror() function maps a non-zero errorcode from either
|
||||
+ pcre2_regcomp() or pcre2_regexec() to a printable message. If preg is
|
||||
+ not NULL, the error should have arisen from the use of that structure.
|
||||
+ A message terminated by a binary zero is placed in errbuf. If the buf-
|
||||
+ fer is too short, only the first errbuf_size - 1 characters of the
|
||||
+ error message are used. The yield of the function is the size of buffer
|
||||
+ needed to hold the whole message, including the terminating zero. This
|
||||
+ value is greater than errbuf_size if the message was truncated.
|
||||
|
||||
|
||||
MEMORY USAGE
|
||||
|
||||
Compiling a regular expression causes memory to be allocated and asso-
|
||||
- ciated with the preg structure. The function regfree() frees all such
|
||||
- memory, after which preg may no longer be used as a compiled expres-
|
||||
- sion.
|
||||
+ ciated with the preg structure. The function pcre2_regfree() frees all
|
||||
+ such memory, after which preg may no longer be used as a compiled
|
||||
+ expression.
|
||||
|
||||
|
||||
AUTHOR
|
||||
@@ -9653,8 +9676,8 @@ AUTHOR
|
||||
|
||||
REVISION
|
||||
|
||||
- Last updated: 15 June 2017
|
||||
- Copyright (c) 1997-2017 University of Cambridge.
|
||||
+ Last updated: 30 January 2019
|
||||
+ Copyright (c) 1997-2019 University of Cambridge.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
diff --git a/doc/pcre2posix.3 b/doc/pcre2posix.3
|
||||
index a91ccbf..05eb605 100644
|
||||
--- a/doc/pcre2posix.3
|
||||
+++ b/doc/pcre2posix.3
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH PCRE2POSIX 3 "19 September 2018" "PCRE2 10.33"
|
||||
+.TH PCRE2POSIX 3 "30 January 2019" "PCRE2 10.33"
|
||||
.SH NAME
|
||||
PCRE2 - Perl-compatible regular expressions (revised API)
|
||||
.SH "SYNOPSIS"
|
||||
@@ -7,26 +7,15 @@ PCRE2 - Perl-compatible regular expressions (revised API)
|
||||
.B #include <pcre2posix.h>
|
||||
.PP
|
||||
.nf
|
||||
-.B int regcomp(regex_t *\fIpreg\fP, const char *\fIpattern\fP,
|
||||
-.B " int \fIcflags\fP);"
|
||||
-.sp
|
||||
.B int pcre2_regcomp(regex_t *\fIpreg\fP, const char *\fIpattern\fP,
|
||||
.B " int \fIcflags\fP);"
|
||||
.sp
|
||||
-.B int regexec(const regex_t *\fIpreg\fP, const char *\fIstring\fP,
|
||||
-.B " size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP);"
|
||||
-.sp
|
||||
.B int pcre2_regexec(const regex_t *\fIpreg\fP, const char *\fIstring\fP,
|
||||
.B " size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP);"
|
||||
.sp
|
||||
-.B "size_t regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP,"
|
||||
-.B " char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP);"
|
||||
-.sp
|
||||
.B "size_t pcre2_regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP,"
|
||||
.B " char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP);"
|
||||
.sp
|
||||
-.B void regfree(regex_t *\fIpreg\fP);
|
||||
-.sp
|
||||
.B void pcre2_regfree(regex_t *\fIpreg\fP);
|
||||
.fi
|
||||
.
|
||||
@@ -34,28 +23,44 @@ PCRE2 - Perl-compatible regular expressions (revised API)
|
||||
.rs
|
||||
.sp
|
||||
This set of functions provides a POSIX-style API for the PCRE2 regular
|
||||
-expression 8-bit library. See the
|
||||
+expression 8-bit library. There are no POSIX-style wrappers for PCRE2's 16-bit
|
||||
+and 32-bit libraries. See the
|
||||
.\" HREF
|
||||
\fBpcre2api\fP
|
||||
.\"
|
||||
documentation for a description of PCRE2's native API, which contains much
|
||||
-additional functionality. There are no POSIX-style wrappers for PCRE2's 16-bit
|
||||
-and 32-bit libraries.
|
||||
+additional functionality.
|
||||
+.P
|
||||
+The functions described here are wrapper functions that ultimately call the
|
||||
+PCRE2 native API. Their prototypes are defined in the \fBpcre2posix.h\fP header
|
||||
+file, and they all have unique names starting with \fBpcre2_\fP. However, the
|
||||
+\fBpcre2posix.h\fP header also contains macro definitions that convert the
|
||||
+standard POSIX names such \fBregcomp()\fP into \fBpcre2_regcomp()\fP etc. This
|
||||
+means that a program can use the usual POSIX names without running the risk of
|
||||
+accidentally linking with POSIX functions from a different library.
|
||||
.P
|
||||
-The functions described here are just wrapper functions that ultimately call
|
||||
-the PCRE2 native API. Their prototypes are defined in the \fBpcre2posix.h\fP
|
||||
-header file, and on Unix systems the library itself is called
|
||||
-\fBlibpcre2-posix.a\fP, so can be accessed by adding \fB-lpcre2-posix\fP to the
|
||||
-command for linking an application that uses them. Because the POSIX functions
|
||||
-call the native ones, it is also necessary to add \fB-lpcre2-8\fP.
|
||||
+On Unix-like systems the PCRE2 POSIX library is called \fBlibpcre2-posix\fP, so
|
||||
+can be accessed by adding \fB-lpcre2-posix\fP to the command for linking an
|
||||
+application. Because the POSIX functions call the native ones, it is also
|
||||
+necessary to add \fB-lpcre2-8\fP.
|
||||
.P
|
||||
-When another POSIX regex library is also installed, there is the possibility of
|
||||
-linking an application with the wrong library. To help avoid this issue, the
|
||||
-PCRE2 POSIX library provides alternative names for the functions, all starting
|
||||
-with "pcre2_". If an application uses these names, possible ambiguity is
|
||||
-avoided. In the following description, however, the standard POSIX function
|
||||
-names are used.
|
||||
+Although they are not defined as protypes in \fBpcre2posix.h\fP, the library
|
||||
+does contain functions with the POSIX names \fBregcomp()\fP etc. These simply
|
||||
+pass their arguments to the PCRE2 functions. These functions are provided for
|
||||
+backwards compatibility with earlier versions of PCRE2, so that existing
|
||||
+programs do not have to be recompiled.
|
||||
.P
|
||||
+Calling the header file \fBpcre2posix.h\fP avoids any conflict with other POSIX
|
||||
+libraries. It can, of course, be renamed or aliased as \fBregex.h\fP, which is
|
||||
+the "correct" name, if there is no clash. It provides two structure types,
|
||||
+\fIregex_t\fP for compiled internal forms, and \fIregmatch_t\fP for returning
|
||||
+captured substrings. It also defines some constants whose names start with
|
||||
+"REG_"; these are used for setting options and identifying error codes.
|
||||
+.
|
||||
+.
|
||||
+.SH "USING THE POSIX FUNCTIONS"
|
||||
+.rs
|
||||
+.sp
|
||||
Those POSIX option bits that can reasonably be mapped to PCRE2 native options
|
||||
have been implemented. In addition, the option REG_EXTENDED is defined with the
|
||||
value zero. This has no effect, but since programs that are written to the
|
||||
@@ -73,19 +78,15 @@ described below. "POSIX-like in style" means that the API approximates to the
|
||||
POSIX definition; it is not fully POSIX-compatible, and in multi-unit encoding
|
||||
domains it is probably even less compatible.
|
||||
.P
|
||||
-The header for these functions is supplied as \fBpcre2posix.h\fP to avoid any
|
||||
-potential clash with other POSIX libraries. It can, of course, be renamed or
|
||||
-aliased as \fBregex.h\fP, which is the "correct" name. It provides two
|
||||
-structure types, \fIregex_t\fP for compiled internal forms, and
|
||||
-\fIregmatch_t\fP for returning captured substrings. It also defines some
|
||||
-constants whose names start with "REG_"; these are used for setting options and
|
||||
-identifying error codes.
|
||||
+The descriptions below use the actual names of the functions, but, as described
|
||||
+above, the standard POSIX names (without the \fBpcre2_\fP prefix) may also be
|
||||
+used.
|
||||
.
|
||||
.
|
||||
.SH "COMPILING A PATTERN"
|
||||
.rs
|
||||
.sp
|
||||
-The function \fBregcomp()\fP is called to compile a pattern into an
|
||||
+The function \fBpcre2_regcomp()\fP is called to compile a pattern into an
|
||||
internal form. By default, the pattern is a C string terminated by a binary
|
||||
zero (but see REG_PEND below). The \fIpreg\fP argument is a pointer to a
|
||||
\fBregex_t\fP structure that is used as a base for storing information about
|
||||
@@ -122,18 +123,18 @@ REG_UTF. Note that REG_NOSPEC is not part of the POSIX standard.
|
||||
.sp
|
||||
REG_NOSUB
|
||||
.sp
|
||||
-When a pattern that is compiled with this flag is passed to \fBregexec()\fP for
|
||||
-matching, the \fInmatch\fP and \fIpmatch\fP arguments are ignored, and no
|
||||
-captured strings are returned. Versions of the PCRE library prior to 10.22 used
|
||||
-to set the PCRE2_NO_AUTO_CAPTURE compile option, but this no longer happens
|
||||
-because it disables the use of backreferences.
|
||||
+When a pattern that is compiled with this flag is passed to
|
||||
+\fBpcre2_regexec()\fP for matching, the \fInmatch\fP and \fIpmatch\fP arguments
|
||||
+are ignored, and no captured strings are returned. Versions of the PCRE library
|
||||
+prior to 10.22 used to set the PCRE2_NO_AUTO_CAPTURE compile option, but this
|
||||
+no longer happens because it disables the use of backreferences.
|
||||
.sp
|
||||
REG_PEND
|
||||
.sp
|
||||
If this option is set, the \fBreg_endp\fP field in the \fIpreg\fP structure
|
||||
(which has the type const char *) must be set to point to the character beyond
|
||||
-the end of the pattern before calling \fBregcomp()\fP. The pattern itself may
|
||||
-now contain binary zeros, which are treated as data characters. Without
|
||||
+the end of the pattern before calling \fBpcre2_regcomp()\fP. The pattern itself
|
||||
+may now contain binary zeros, which are treated as data characters. Without
|
||||
REG_PEND, a binary zero terminates the pattern and the \fBre_endp\fP field is
|
||||
ignored. This is a GNU extension to the POSIX standard and should be used with
|
||||
caution in software intended to be portable to other systems.
|
||||
@@ -166,15 +167,16 @@ Perl way, not the POSIX way. Note that setting PCRE2_MULTILINE has only
|
||||
newlines are matched by the dot metacharacter (they are not) or by a negative
|
||||
class such as [^a] (they are).
|
||||
.P
|
||||
-The yield of \fBregcomp()\fP is zero on success, and non-zero otherwise. The
|
||||
-\fIpreg\fP structure is filled in on success, and one other member of the
|
||||
+The yield of \fBpcre2_regcomp()\fP is zero on success, and non-zero otherwise.
|
||||
+The \fIpreg\fP structure is filled in on success, and one other member of the
|
||||
structure (as well as \fIre_endp\fP) is public: \fIre_nsub\fP contains the
|
||||
number of capturing subpatterns in the regular expression. Various error codes
|
||||
are defined in the header file.
|
||||
.P
|
||||
-NOTE: If the yield of \fBregcomp()\fP is non-zero, you must not attempt to
|
||||
-use the contents of the \fIpreg\fP structure. If, for example, you pass it to
|
||||
-\fBregexec()\fP, the result is undefined and your program is likely to crash.
|
||||
+NOTE: If the yield of \fBpcre2_regcomp()\fP is non-zero, you must not attempt
|
||||
+to use the contents of the \fIpreg\fP structure. If, for example, you pass it
|
||||
+to \fBpcre2_regexec()\fP, the result is undefined and your program is likely to
|
||||
+crash.
|
||||
.
|
||||
.
|
||||
.SH "MATCHING NEWLINE CHARACTERS"
|
||||
@@ -211,7 +213,7 @@ is no way to stop newline from matching [^a].
|
||||
Default POSIX newline handling can be obtained by setting PCRE2_DOTALL and
|
||||
PCRE2_DOLLAR_ENDONLY when calling \fBpcre2_compile()\fP directly, but there is
|
||||
no way to make PCRE2 behave exactly as for the REG_NEWLINE action. When using
|
||||
-the POSIX API, passing REG_NEWLINE to PCRE2's \fBregcomp()\fP function
|
||||
+the POSIX API, passing REG_NEWLINE to PCRE2's \fBpcre2_regcomp()\fP function
|
||||
causes PCRE2_MULTILINE to be passed to \fBpcre2_compile()\fP, and REG_DOTALL
|
||||
passes PCRE2_DOTALL. There is no way to pass PCRE2_DOLLAR_ENDONLY.
|
||||
.
|
||||
@@ -219,10 +221,10 @@ passes PCRE2_DOTALL. There is no way to pass PCRE2_DOLLAR_ENDONLY.
|
||||
.SH "MATCHING A PATTERN"
|
||||
.rs
|
||||
.sp
|
||||
-The function \fBregexec()\fP is called to match a compiled pattern \fIpreg\fP
|
||||
-against a given \fIstring\fP, which is by default terminated by a zero byte
|
||||
-(but see REG_STARTEND below), subject to the options in \fIeflags\fP. These can
|
||||
-be:
|
||||
+The function \fBpcre2_regexec()\fP is called to match a compiled pattern
|
||||
+\fIpreg\fP against a given \fIstring\fP, which is by default terminated by a
|
||||
+zero byte (but see REG_STARTEND below), subject to the options in \fIeflags\fP.
|
||||
+These can be:
|
||||
.sp
|
||||
REG_NOTBOL
|
||||
.sp
|
||||
@@ -263,7 +265,7 @@ are mutually exclusive; the error REG_INVARG is returned.
|
||||
.P
|
||||
If the pattern was compiled with the REG_NOSUB flag, no data about any matched
|
||||
strings is returned. The \fInmatch\fP and \fIpmatch\fP arguments of
|
||||
-\fBregexec()\fP are ignored (except possibly as input for REG_STARTEND).
|
||||
+\fBpcre2_regexec()\fP are ignored (except possibly as input for REG_STARTEND).
|
||||
.P
|
||||
The value of \fInmatch\fP may be zero, and the value \fIpmatch\fP may be NULL
|
||||
(unless REG_STARTEND is set); in both these cases no data about any matched
|
||||
@@ -286,22 +288,23 @@ header file, of which REG_NOMATCH is the "expected" failure code.
|
||||
.SH "ERROR MESSAGES"
|
||||
.rs
|
||||
.sp
|
||||
-The \fBregerror()\fP function maps a non-zero errorcode from either
|
||||
-\fBregcomp()\fP or \fBregexec()\fP to a printable message. If \fIpreg\fP is not
|
||||
-NULL, the error should have arisen from the use of that structure. A message
|
||||
-terminated by a binary zero is placed in \fIerrbuf\fP. If the buffer is too
|
||||
-short, only the first \fIerrbuf_size\fP - 1 characters of the error message are
|
||||
-used. The yield of the function is the size of buffer needed to hold the whole
|
||||
-message, including the terminating zero. This value is greater than
|
||||
-\fIerrbuf_size\fP if the message was truncated.
|
||||
+The \fBpcre2_regerror()\fP function maps a non-zero errorcode from either
|
||||
+\fBpcre2_regcomp()\fP or \fBpcre2_regexec()\fP to a printable message. If
|
||||
+\fIpreg\fP is not NULL, the error should have arisen from the use of that
|
||||
+structure. A message terminated by a binary zero is placed in \fIerrbuf\fP. If
|
||||
+the buffer is too short, only the first \fIerrbuf_size\fP - 1 characters of the
|
||||
+error message are used. The yield of the function is the size of buffer needed
|
||||
+to hold the whole message, including the terminating zero. This value is
|
||||
+greater than \fIerrbuf_size\fP if the message was truncated.
|
||||
.
|
||||
.
|
||||
.SH MEMORY USAGE
|
||||
.rs
|
||||
.sp
|
||||
Compiling a regular expression causes memory to be allocated and associated
|
||||
-with the \fIpreg\fP structure. The function \fBregfree()\fP frees all such
|
||||
-memory, after which \fIpreg\fP may no longer be used as a compiled expression.
|
||||
+with the \fIpreg\fP structure. The function \fBpcre2_regfree()\fP frees all
|
||||
+such memory, after which \fIpreg\fP may no longer be used as a compiled
|
||||
+expression.
|
||||
.
|
||||
.
|
||||
.SH AUTHOR
|
||||
@@ -318,6 +321,6 @@ Cambridge, England.
|
||||
.rs
|
||||
.sp
|
||||
.nf
|
||||
-Last updated: 19 September 2018
|
||||
-Copyright (c) 1997-2018 University of Cambridge.
|
||||
+Last updated: 30 January 2019
|
||||
+Copyright (c) 1997-2019 University of Cambridge.
|
||||
.fi
|
||||
diff --git a/src/pcre2posix.c b/src/pcre2posix.c
|
||||
index 3666100..34a8d80 100644
|
||||
--- a/src/pcre2posix.c
|
||||
+++ b/src/pcre2posix.c
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
- New API code Copyright (c) 2016-2018 University of Cambridge
|
||||
+ New API code Copyright (c) 2016-2019 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -41,9 +41,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
/* This module is a wrapper that provides a POSIX API to the underlying PCRE2
|
||||
functions. The operative functions are called pcre2_regcomp(), etc., with
|
||||
-wrappers that use the plain POSIX names. This makes it easier for an
|
||||
-application to be sure it gets the PCRE2 versions in the presence of other
|
||||
-POSIX regex libraries. */
|
||||
+wrappers that use the plain POSIX names. In addition, pcre2posix.h defines the
|
||||
+POSIX names as macros for the pcre2_xxx functions, so any program that includes
|
||||
+it and uses the POSIX names will call the base functions directly. This makes
|
||||
+it easier for an application to be sure it gets the PCRE2 versions in the
|
||||
+presence of other POSIX regex libraries. */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -177,24 +179,39 @@ static const char *const pstring[] = {
|
||||
* Wrappers with traditional POSIX names *
|
||||
*************************************************/
|
||||
|
||||
+/* Keep defining them to preseve the ABI for applications linked to the pcre2
|
||||
+POSIX library before these names were changed into macros in pcre2posix.h.
|
||||
+This also ensures that the POSIX names are callable from languages that do not
|
||||
+include pcre2posix.h. It is vital to #undef the macro definitions from
|
||||
+pcre2posix.h! */
|
||||
+
|
||||
+#undef regerror
|
||||
+PCRE2POSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
|
||||
PCRE2POSIX_EXP_DEFN size_t PCRE2_CALL_CONVENTION
|
||||
regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
|
||||
{
|
||||
return pcre2_regerror(errcode, preg, errbuf, errbuf_size);
|
||||
}
|
||||
|
||||
+#undef regfree
|
||||
+PCRE2POSIX_EXP_DECL void regfree(regex_t *);
|
||||
PCRE2POSIX_EXP_DEFN void PCRE2_CALL_CONVENTION
|
||||
regfree(regex_t *preg)
|
||||
{
|
||||
pcre2_regfree(preg);
|
||||
}
|
||||
|
||||
+#undef regcomp
|
||||
+PCRE2POSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
|
||||
PCRE2POSIX_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
regcomp(regex_t *preg, const char *pattern, int cflags)
|
||||
{
|
||||
return pcre2_regcomp(preg, pattern, cflags);
|
||||
}
|
||||
|
||||
+#undef regexec
|
||||
+PCRE2POSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
|
||||
+ regmatch_t *, int);
|
||||
PCRE2POSIX_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
regexec(const regex_t *preg, const char *string, size_t nmatch,
|
||||
regmatch_t pmatch[], int eflags)
|
||||
@@ -209,7 +226,7 @@ return pcre2_regexec(preg, string, nmatch, pmatch, eflags);
|
||||
*************************************************/
|
||||
|
||||
PCRE2POSIX_EXP_DEFN size_t PCRE2_CALL_CONVENTION
|
||||
-pcre2_regerror(int errcode, const regex_t *preg, char *errbuf,
|
||||
+pcre2_regerror(int errcode, const regex_t *preg, char *errbuf,
|
||||
size_t errbuf_size)
|
||||
{
|
||||
int used;
|
||||
diff --git a/src/pcre2posix.h b/src/pcre2posix.h
|
||||
index bfe347e..cb59d03 100644
|
||||
--- a/src/pcre2posix.h
|
||||
+++ b/src/pcre2posix.h
|
||||
@@ -9,7 +9,7 @@ POSIX wrapper interface.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
- New API code Copyright (c) 2016-2018 University of Cambridge
|
||||
+ New API code Copyright (c) 2016-2019 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -139,22 +139,29 @@ file. */
|
||||
#endif
|
||||
|
||||
/* The functions. The actual code is in functions with pcre2_xxx names for
|
||||
-uniqueness. Wrappers with the POSIX names are provided for those who can ensure
|
||||
-they get them from the PCRE2 library and not by accident from elsewhere. */
|
||||
+uniqueness. POSIX names are provided as macros for API compatibility with POSIX
|
||||
+regex functions. It's done this way to ensure to they are always linked from
|
||||
+the PCRE2 library and not by accident from elsewhere (regex_t differs in size
|
||||
+elsewhere). */
|
||||
|
||||
PCRE2POSIX_EXP_DECL int pcre2_regcomp(regex_t *, const char *, int);
|
||||
-PCRE2POSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
|
||||
-
|
||||
PCRE2POSIX_EXP_DECL int pcre2_regexec(const regex_t *, const char *, size_t,
|
||||
regmatch_t *, int);
|
||||
-PCRE2POSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
|
||||
- regmatch_t *, int);
|
||||
-
|
||||
PCRE2POSIX_EXP_DECL size_t pcre2_regerror(int, const regex_t *, char *, size_t);
|
||||
-PCRE2POSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
|
||||
-
|
||||
PCRE2POSIX_EXP_DECL void pcre2_regfree(regex_t *);
|
||||
-PCRE2POSIX_EXP_DECL void regfree(regex_t *);
|
||||
+
|
||||
+#define regcomp pcre2_regcomp
|
||||
+#define regexec pcre2_regexec
|
||||
+#define regerror pcre2_regerror
|
||||
+#define regfree pcre2_regfree
|
||||
+
|
||||
+/* Debian had a patch that used different names. These are now here to save
|
||||
+them having to maintain their own patch, but are not documented by PCRE2. */
|
||||
+
|
||||
+#define PCRE2regcomp pcre2_regcomp
|
||||
+#define PCRE2regexec pcre2_regexec
|
||||
+#define PCRE2regerror pcre2_regerror
|
||||
+#define PCRE2regfree pcre2_regfree
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,2 +1,6 @@
|
||||
from Config import *
|
||||
addFilter("spelling-error .* encodings");
|
||||
# sljit upstream does not make any releases
|
||||
addFilter("unversioned-explicit-provides bundled\(sljit\)");
|
||||
# Documentation is in a required pcre2-devel package
|
||||
addFilter("pcre2-static.* no-documentation");
|
||||
|
69
pcre2.spec
69
pcre2.spec
@ -6,10 +6,10 @@
|
||||
%bcond_with pcre2_enables_sealloc
|
||||
|
||||
# This is stable release:
|
||||
#%%global rcversion RC1
|
||||
%global rcversion RC1
|
||||
Name: pcre2
|
||||
Version: 10.32
|
||||
Release: %{?rcversion:0.}8%{?rcversion:.%rcversion}%{?dist}
|
||||
Version: 10.33
|
||||
Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist}
|
||||
%global myversion %{version}%{?rcversion:-%rcversion}
|
||||
Summary: Perl-compatible regular expression library
|
||||
# the library: BSD with exceptions
|
||||
@ -49,37 +49,6 @@ URL: http://www.pcre.org/
|
||||
Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{?rcversion:Testing/}%{name}-%{myversion}.tar.bz2
|
||||
# Do no set RPATH if libdir is not /usr/lib
|
||||
Patch0: pcre2-10.10-Fix-multilib.patch
|
||||
# Fix a subject buffer overread in JIT when UTF is disabled and \X or \R has
|
||||
# a greater than 1 fixed quantifier, upstream bug #2320, in upstream after
|
||||
# 10.32
|
||||
Patch1: pcre2-10.32-Fix-subject-buffer-overread-in-JIT.-Found-by-Yunho-K.patch
|
||||
# Fix caseless matching an extended class in JIT mode, upstream bug #2321,
|
||||
# in upstream after 10.32
|
||||
Patch2: pcre2-10.32-Fix-an-xclass-matching-issue-in-JIT.patch
|
||||
# Fix matching a zero-repeated subroutine call at a start of a pattern,
|
||||
# upstream bug #2332, in upstream after 10.32
|
||||
Patch3: pcre2-10.32-Fix-zero-repeated-subroutine-call-at-start-of-patter.patch
|
||||
# Fix heap limit checking overflow in pcre2_dfa_match(), upstream bug #2334,
|
||||
# in upstream after 10.32
|
||||
Patch4: pcre2-10.32-Fix-heap-limit-checking-overflow-bug-in-pcre2_dfa_ma.patch
|
||||
# Fix anchoring a pattern preceded with (*MARK), in upstream after 10.32
|
||||
Patch5: pcre2-10.32-Fix-non-recognition-of-anchoring-when-preceded-by-MA.patch
|
||||
# Fix OpenPOWER 64-bit ELFv2 ABI detection in JIT compiler, upstream bug #2353,
|
||||
# fix an undefined behavior in aarch64 JIT compiler, upstream bug #2355,
|
||||
# in upstream after 10.32
|
||||
Patch6: pcre2-10.32-JIT-compiler-update.patch
|
||||
# Define PCRE2-specific symbols in pcre2-posix library, bug #1667614,
|
||||
# upstream bug 1830, in upstream after 10.32
|
||||
Patch7: pcre2-10.32-Provide-alternative-POSIX-names.patch
|
||||
# Link applications to PCRE2-specific symbols when using POSIX API, bug #1667614,
|
||||
# upstream bug 1830, in upstram after 10.32
|
||||
Patch8: pcre2-10.32-Update-POSIX-wrapper-to-use-macros-in-the-.h-file-bu.patch
|
||||
# Fix version conditions in DFA engine, upstream bug #2367,
|
||||
# in upstream after 10.32
|
||||
Patch9: pcre2-10.32-Fix-bug-in-VERSION-conditional-test-in-DFA-matching.patch
|
||||
# Fix pcre2_pattern_info() documentation, upstream bug #2373,
|
||||
# in upstream after 10.32
|
||||
Patch10: pcre2-10.32-Fix-two-identical-documentation-typos.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: coreutils
|
||||
@ -156,16 +125,6 @@ Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
|
||||
%prep
|
||||
%setup -q -n %{name}-%{myversion}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
# Because of multilib patch
|
||||
libtoolize --copy --force
|
||||
autoreconf -vif
|
||||
@ -198,6 +157,7 @@ autoreconf -vif
|
||||
--enable-pcre2-16 \
|
||||
--enable-pcre2-32 \
|
||||
--enable-pcre2grep-callout \
|
||||
--enable-pcre2grep-callout-fork \
|
||||
--disable-pcre2grep-libbz2 \
|
||||
--disable-pcre2grep-libz \
|
||||
--disable-pcre2test-libedit \
|
||||
@ -206,16 +166,17 @@ autoreconf -vif
|
||||
%else
|
||||
--disable-pcre2test-libreadline \
|
||||
%endif
|
||||
--enable-percent-zt \
|
||||
--disable-rebuild-chartables \
|
||||
--enable-shared \
|
||||
--disable-silent-rules \
|
||||
--enable-static \
|
||||
--enable-unicode \
|
||||
--disable-valgrind
|
||||
make %{?_smp_mflags}
|
||||
%{make_build}
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
%{make_install}
|
||||
# Get rid of unneeded *.la files
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
# These are handled by %%doc in %%files
|
||||
@ -224,24 +185,19 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/pcre2
|
||||
%check
|
||||
make %{?_smp_mflags} check VERBOSE=yes
|
||||
|
||||
%ldconfig_scriptlets
|
||||
%ldconfig_scriptlets utf16
|
||||
%ldconfig_scriptlets utf32
|
||||
|
||||
%files
|
||||
%{_libdir}/libpcre2-8.so.*
|
||||
%{_libdir}/libpcre2-posix.so.*
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%{_libdir}/libpcre2-8.so.0*
|
||||
%{_libdir}/libpcre2-posix.so.2*
|
||||
%license COPYING LICENCE
|
||||
%doc AUTHORS ChangeLog NEWS
|
||||
|
||||
%files utf16
|
||||
%{_libdir}/libpcre2-16.so.*
|
||||
%{_libdir}/libpcre2-16.so.0*
|
||||
%license COPYING LICENCE
|
||||
%doc AUTHORS ChangeLog NEWS
|
||||
|
||||
%files utf32
|
||||
%{_libdir}/libpcre2-32.so.*
|
||||
%{_libdir}/libpcre2-32.so.0*
|
||||
%license COPYING LICENCE
|
||||
%doc AUTHORS ChangeLog NEWS
|
||||
|
||||
@ -267,6 +223,9 @@ make %{?_smp_mflags} check VERBOSE=yes
|
||||
%{_mandir}/man1/pcre2test.*
|
||||
|
||||
%changelog
|
||||
* Tue Mar 05 2019 Petr Pisar <ppisar@redhat.com> - 10.33-0.1.RC1
|
||||
- 10.33-RC1 bump
|
||||
|
||||
* Fri Feb 22 2019 Petr Pisar <ppisar@redhat.com> - 10.32-8
|
||||
- Fix pcre2_pattern_info() documentation (upstream bug #2373)
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (pcre2-10.32.tar.bz2) = 3d712e7d6afbaef227952680ded69fadbdec0b1abdfcac17cf071415c3c93edd152d6d268dec80570aedf24f82ba954f74f5f9e62c9b9991be75080a3d6ab5fe
|
||||
SHA512 (pcre2-10.33-RC1.tar.bz2) = 3011c2aca946e3668c02ae16b207dccbc794cf4e1fe07d9932e43ec7af2d58bb92cd65315948e69ea8f6fa96a64b91a71c5a7696b9e46486468a7044e887d009
|
||||
|
Loading…
Reference in New Issue
Block a user