Skip to content

Commit d0c7544

Browse files
committed
Documentation update
1 parent f28e826 commit d0c7544

File tree

5 files changed

+22
-10
lines changed

5 files changed

+22
-10
lines changed

doc/html/pcre2_compile.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,14 @@ <h1>pcre2_compile man page</h1>
9292
function.
9393
</P>
9494
<P>
95-
The yield of this function is a pointer to a private data structure that
96-
contains the compiled pattern, or NULL if an error was detected.
95+
If either of <i>errorcode</i> or <i>erroroffset</i> is NULL, the function returns
96+
NULL immediately. Otherwise, the yield of this function is a pointer to a
97+
private data structure that contains the compiled pattern, or NULL if an error
98+
was detected. In the error case, a text error message can be obtained by
99+
passing the value returned via the <i>errorcode</i> argument to the the
100+
<b>pcre2_get_error_message()</b> function. The offset (in code units) where the
101+
error was encountered is returned via the <i>erroroffset</i> argument. Both
102+
values are set to zero for a successful return.
97103
</P>
98104
<P>
99105
There is a complete description of the PCRE2 native API, with more detail on

doc/html/pcre2api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ <h1>pcre2api man page</h1>
13831383
NULL immediately. Otherwise, the variables to which these point are set to an
13841384
error code and an offset (number of code units) within the pattern,
13851385
respectively, when <b>pcre2_compile()</b> returns NULL because a compilation
1386-
error has occurred. The values are not defined when compilation is successful
1386+
error has occurred. The values are both zero when compilation is successful
13871387
and <b>pcre2_compile()</b> returns a non-NULL value.
13881388
</P>
13891389
<P>

doc/pcre2.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,8 +1372,8 @@ COMPILING A PATTERN
13721372
diately. Otherwise, the variables to which these point are set to an
13731373
error code and an offset (number of code units) within the pattern, re-
13741374
spectively, when pcre2_compile() returns NULL because a compilation er-
1375-
ror has occurred. The values are not defined when compilation is suc-
1376-
cessful and pcre2_compile() returns a non-NULL value.
1375+
ror has occurred. The values are both zero when compilation is success-
1376+
ful and pcre2_compile() returns a non-NULL value.
13771377

13781378
There are nearly 100 positive error codes that pcre2_compile() may re-
13791379
turn if it finds an error in the pattern. There are also some negative

doc/pcre2_compile.3

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH PCRE2_COMPILE 3 "23 May 2019" "PCRE2 10.34"
1+
.TH PCRE2_COMPILE 3 "22 April 2022" "PCRE2 10.41"
22
.SH NAME
33
PCRE2 - Perl-compatible regular expressions (revised API)
44
.SH SYNOPSIS
@@ -80,8 +80,14 @@ Additional options may be set in the compile context via the
8080
.\"
8181
function.
8282
.P
83-
The yield of this function is a pointer to a private data structure that
84-
contains the compiled pattern, or NULL if an error was detected.
83+
If either of \fIerrorcode\fP or \fIerroroffset\fP is NULL, the function returns
84+
NULL immediately. Otherwise, the yield of this function is a pointer to a
85+
private data structure that contains the compiled pattern, or NULL if an error
86+
was detected. In the error case, a text error message can be obtained by
87+
passing the value returned via the \fIerrorcode\fP argument to the the
88+
\fBpcre2_get_error_message()\fP function. The offset (in code units) where the
89+
error was encountered is returned via the \fIerroroffset\fP argument. Both
90+
values are set to zero for a successful return.
8591
.P
8692
There is a complete description of the PCRE2 native API, with more detail on
8793
each option, in the

doc/pcre2api.3

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH PCRE2API 3 "14 December 2021" "PCRE2 10.40"
1+
.TH PCRE2API 3 "22 April 2022" "PCRE2 10.41"
22
.SH NAME
33
PCRE2 - Perl-compatible regular expressions (revised API)
44
.sp
@@ -1323,7 +1323,7 @@ If \fIerrorcode\fP or \fIerroroffset\fP is NULL, \fBpcre2_compile()\fP returns
13231323
NULL immediately. Otherwise, the variables to which these point are set to an
13241324
error code and an offset (number of code units) within the pattern,
13251325
respectively, when \fBpcre2_compile()\fP returns NULL because a compilation
1326-
error has occurred. The values are not defined when compilation is successful
1326+
error has occurred. The values are both zero when compilation is successful
13271327
and \fBpcre2_compile()\fP returns a non-NULL value.
13281328
.P
13291329
There are nearly 100 positive error codes that \fBpcre2_compile()\fP may return

0 commit comments

Comments
 (0)