diff --git a/doc/html/pcre2_compile.html b/doc/html/pcre2_compile.html index f6485f2..2c85655 100644 --- a/doc/html/pcre2_compile.html +++ b/doc/html/pcre2_compile.html @@ -92,8 +92,14 @@ Additional options may be set in the compile context via the function.

-The yield of this function is a pointer to a private data structure that -contains the compiled pattern, or NULL if an error was detected. +If either of errorcode or erroroffset is NULL, the function returns +NULL immediately. Otherwise, the yield of this function is a pointer to a +private data structure that contains the compiled pattern, or NULL if an error +was detected. In the error case, a text error message can be obtained by +passing the value returned via the errorcode argument to the the +pcre2_get_error_message() function. The offset (in code units) where the +error was encountered is returned via the erroroffset argument. Both +values are set to zero for a successful return.

There is a complete description of the PCRE2 native API, with more detail on diff --git a/doc/html/pcre2api.html b/doc/html/pcre2api.html index 047e242..c1fe824 100644 --- a/doc/html/pcre2api.html +++ b/doc/html/pcre2api.html @@ -1383,7 +1383,7 @@ If errorcode or erroroffset is NULL, pcre2_compile() return NULL immediately. Otherwise, the variables to which these point are set to an error code and an offset (number of code units) within the pattern, respectively, when pcre2_compile() returns NULL because a compilation -error has occurred. The values are not defined when compilation is successful +error has occurred. The values are both zero when compilation is successful and pcre2_compile() returns a non-NULL value.

diff --git a/doc/pcre2.txt b/doc/pcre2.txt index c57bb34..d2aefaa 100644 --- a/doc/pcre2.txt +++ b/doc/pcre2.txt @@ -1372,8 +1372,8 @@ COMPILING A PATTERN diately. Otherwise, the variables to which these point are set to an error code and an offset (number of code units) within the pattern, re- spectively, when pcre2_compile() returns NULL because a compilation er- - ror has occurred. The values are not defined when compilation is suc- - cessful and pcre2_compile() returns a non-NULL value. + ror has occurred. The values are both zero when compilation is success- + ful and pcre2_compile() returns a non-NULL value. There are nearly 100 positive error codes that pcre2_compile() may re- turn if it finds an error in the pattern. There are also some negative diff --git a/doc/pcre2_compile.3 b/doc/pcre2_compile.3 index 58a60c1..441f45d 100644 --- a/doc/pcre2_compile.3 +++ b/doc/pcre2_compile.3 @@ -1,4 +1,4 @@ -.TH PCRE2_COMPILE 3 "23 May 2019" "PCRE2 10.34" +.TH PCRE2_COMPILE 3 "22 April 2022" "PCRE2 10.41" .SH NAME PCRE2 - Perl-compatible regular expressions (revised API) .SH SYNOPSIS @@ -80,8 +80,14 @@ Additional options may be set in the compile context via the .\" function. .P -The yield of this function is a pointer to a private data structure that -contains the compiled pattern, or NULL if an error was detected. +If either of \fIerrorcode\fP or \fIerroroffset\fP is NULL, the function returns +NULL immediately. Otherwise, the yield of this function is a pointer to a +private data structure that contains the compiled pattern, or NULL if an error +was detected. In the error case, a text error message can be obtained by +passing the value returned via the \fIerrorcode\fP argument to the the +\fBpcre2_get_error_message()\fP function. The offset (in code units) where the +error was encountered is returned via the \fIerroroffset\fP argument. Both +values are set to zero for a successful return. .P There is a complete description of the PCRE2 native API, with more detail on each option, in the diff --git a/doc/pcre2api.3 b/doc/pcre2api.3 index edde3db..4c840c3 100644 --- a/doc/pcre2api.3 +++ b/doc/pcre2api.3 @@ -1,4 +1,4 @@ -.TH PCRE2API 3 "14 December 2021" "PCRE2 10.40" +.TH PCRE2API 3 "22 April 2022" "PCRE2 10.41" .SH NAME PCRE2 - Perl-compatible regular expressions (revised API) .sp @@ -1323,7 +1323,7 @@ If \fIerrorcode\fP or \fIerroroffset\fP is NULL, \fBpcre2_compile()\fP returns NULL immediately. Otherwise, the variables to which these point are set to an error code and an offset (number of code units) within the pattern, respectively, when \fBpcre2_compile()\fP returns NULL because a compilation -error has occurred. The values are not defined when compilation is successful +error has occurred. The values are both zero when compilation is successful and \fBpcre2_compile()\fP returns a non-NULL value. .P There are nearly 100 positive error codes that \fBpcre2_compile()\fP may return