diff options
author | Philip Hazel <Philip.Hazel@gmail.com> | 2022-12-06 15:53:25 +0000 |
---|---|---|
committer | Philip Hazel <Philip.Hazel@gmail.com> | 2022-12-06 15:53:25 +0000 |
commit | 7c49b40e8aed10cc2667dd3c4b7bb692d13ade2a (patch) | |
tree | 93e959588acd27c0f52616063212c3e799b55e37 | |
parent | 106faa23893aad071e0e6cb8368dd249ca91ba25 (diff) | |
download | pcre-7c49b40e8aed10cc2667dd3c4b7bb692d13ade2a.tar.gz |
File and documentation tidies for 10.41 release
-rw-r--r-- | ChangeLog | 46 | ||||
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | NEWS | 10 | ||||
-rwxr-xr-x | RunGrepTest | 2 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | doc/html/pcre2api.html | 2 | ||||
-rw-r--r-- | doc/html/pcre2grep.html | 10 | ||||
-rw-r--r-- | doc/html/pcre2limits.html | 4 | ||||
-rw-r--r-- | doc/html/pcre2perform.html | 14 | ||||
-rw-r--r-- | doc/pcre2.txt | 60 | ||||
-rw-r--r-- | doc/pcre2api.3 | 2 | ||||
-rw-r--r-- | doc/pcre2grep.1 | 10 | ||||
-rw-r--r-- | doc/pcre2limits.3 | 4 | ||||
-rw-r--r-- | doc/pcre2perform.3 | 14 | ||||
-rw-r--r-- | src/config.h.generic | 12 | ||||
-rw-r--r-- | src/pcre2.h.generic | 4 | ||||
-rw-r--r-- | src/pcre2_compile.c | 2 | ||||
-rw-r--r-- | src/pcre2_context.c | 2 | ||||
-rw-r--r-- | src/pcre2_match.c | 10 | ||||
-rw-r--r-- | src/pcre2grep.c | 12 | ||||
-rw-r--r-- | src/pcre2posix.c | 10 | ||||
-rw-r--r-- | src/pcre2test.c | 4 |
22 files changed, 143 insertions, 113 deletions
@@ -2,11 +2,11 @@ Change Log for PCRE2 - see also the Git log ------------------------------------------- -Version 10.41 xx-xxx-2022 -------------------------- +Version 10.41 06-December-2022 +------------------------------ 1. Add fflush() before and after a fork callout in pcre2grep to get its output -to be the same on all systems. (THere were previously ordering differences in +to be the same on all systems. (There were previously ordering differences in Alpine Linux). 2. Merged patch from @carenas (GitHub #110) for pthreads support in CMake. @@ -32,35 +32,35 @@ tidied up an untidy #ifdef arrangement in pcre2test. 8. Fixed an issue in the backtracking optimization of character repeats in JIT. Furthermore optimize star repetitions, not just plus repetitions. -9. Removed the use of an initial backtracking frames vector on the system stack -in pcre2_match() so that it now always uses the heap. (In a multi-thread -environment with very small stacks there had been an issue.) This also is -tidier for JIT matching, which didn't need that vector. The heap vector is now -remembered in the match data block and re-used if that block itself is re-used. +9. Removed the use of an initial backtracking frames vector on the system stack +in pcre2_match() so that it now always uses the heap. (In a multi-thread +environment with very small stacks there had been an issue.) This also is +tidier for JIT matching, which didn't need that vector. The heap vector is now +remembered in the match data block and re-used if that block itself is re-used. It is freed with the match data block. 10. Adjusted the find_limits code in pcre2test to work with change 9 above. -11. Added find_limits_noheap to pcre2test, because the heap limits are now -different in different environments and so cannot be included in the standard +11. Added find_limits_noheap to pcre2test, because the heap limits are now +different in different environments and so cannot be included in the standard tests. -12. Created a test for pcre2_match() heap processing that is not part of the -tests run by 'make check', but can be run manually. The current output is from +12. Created a test for pcre2_match() heap processing that is not part of the +tests run by 'make check', but can be run manually. The current output is from a 64-bit system. 13. Implemented -Z aka --null in pcre2grep. 14. A minor change to pcre2test and the addition of several new pcre2grep tests -have improved LCOV coverage statistics. At the same time, code in pcre2grep and +have improved LCOV coverage statistics. At the same time, code in pcre2grep and elsewhere that can never be obeyed in normal testing has been excluded from coverage. 15. Fixed a bug in pcre2grep that could cause an extra newline to be written after output generaed by --output. -16. If a file has a .bz2 extension but is not in fact compressed, pcre2grep -should process it as a plain text file. A bug stopped this happening; now fixed +16. If a file has a .bz2 extension but is not in fact compressed, pcre2grep +should process it as a plain text file. A bug stopped this happening; now fixed and added to the tests. 17. When pcre2grep was running not in UTF mode, if a string specified by @@ -75,20 +75,22 @@ pointers had out of place PCRE2_CALL_CONVENTION in src/pcre2.h.*. These produced errors when building for Windows with #define PCRE2_CALL_CONVENTION __stdcall. -20. A negative repeat value in a pcre2test subject line was not being +20. A negative repeat value in a pcre2test subject line was not being diagnosed, leading to infinite looping. -21. Updated RunGrepTest to discard the warning that Bash now gives when setting -LC_CTYPE to an bad value (because older versions didn't). +21. Updated RunGrepTest to discard the warning that Bash now gives when setting +LC_CTYPE to a bad value (because older versions didn't). -22. Updated pcre2grep so that it behaves like GNU grep when matching more than -one pattern and a later pattern matches at an earlier point in the subject when +22. Updated pcre2grep so that it behaves like GNU grep when matching more than +one pattern and a later pattern matches at an earlier point in the subject when the matched substrings are being identified by colour or by offsets. -23. Updated the PrepareRelease script so that the man page that it makes for -the pcre2demo demonstration program is more standard and does not cause errors +23. Updated the PrepareRelease script so that the man page that it makes for +the pcre2demo demonstration program is more standard and does not cause errors when processed by lexgrog or mandb -c (GitHub issue #160). +24. The JIT compiler was updated. + Version 10.40 15-April-2022 --------------------------- diff --git a/Makefile.am b/Makefile.am index 740ff37a..0e66c41f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -632,15 +632,23 @@ EXTRA_DIST += \ testdata/grepinput \ testdata/grepinput3 \ testdata/grepinput8 \ + testdata/grepinputC.bz2 \ + testdata/grepinputC.gz \ testdata/grepinputM \ testdata/grepinputv \ testdata/grepinputx \ testdata/greplist \ + testdata/grepnot.bz2 \ testdata/grepoutput \ testdata/grepoutput8 \ testdata/grepoutputC \ testdata/grepoutputCN \ + testdata/grepoutputCNU \ + testdata/grepoutputCU \ + testdata/grepoutputCbz2 \ + testdata/grepoutputCgz \ testdata/grepoutputN \ + testdata/grepoutputUN \ testdata/greppatN4 \ testdata/testbtables \ testdata/testinput1 \ @@ -670,6 +678,7 @@ EXTRA_DIST += \ testdata/testinput25 \ testdata/testinput26 \ testdata/testinputEBC \ + testdata/testinputheap \ testdata/testoutput1 \ testdata/testoutput2 \ testdata/testoutput3 \ @@ -713,6 +722,9 @@ EXTRA_DIST += \ testdata/testoutput25 \ testdata/testoutput26 \ testdata/testoutputEBC \ + testdata/testoutputheap-16 \ + testdata/testoutputheap-32 \ + testdata/testoutputheap-8 \ testdata/valgrind-jit.supp \ testdata/wintestinput3 \ testdata/wintestoutput3 \ @@ -2,6 +2,16 @@ News about PCRE2 releases ------------------------- +Version 10.41 06-December-2022 +------------------------------ + +This is another mainly bug-fixing and code-tidying release. There is one +significant upgrade to pcre2grep: it now behaves like GNU grep when matching +more than one pattern and a later pattern matches at an earlier point in the +subject when the matched substrings are being identified by colour or by +offsets. + + Version 10.40 15-April-2022 --------------------------- diff --git a/RunGrepTest b/RunGrepTest index 9006be6f..d5bd16a6 100755 --- a/RunGrepTest +++ b/RunGrepTest @@ -846,7 +846,7 @@ if [ $? -ne 0 ]; then echo "RC=2" >>testtrygrep else -# Bash has started giving a warning when LC_CTYPE is set to a bad value. In +# Bash has started giving a warning when LC_CTYPE is set to a bad value. In # order to remain compatible with older versions, the following code is a bit # contorted. diff --git a/configure.ac b/configure.ac index fc2c1c99..b6cfff69 100644 --- a/configure.ac +++ b/configure.ac @@ -11,13 +11,13 @@ dnl be defined as -RC2, for example. For real releases, it should be empty. m4_define(pcre2_major, [10]) m4_define(pcre2_minor, [41]) m4_define(pcre2_prerelease, []) -m4_define(pcre2_date, [2022-xx-xx]) +m4_define(pcre2_date, [2022-12-06]) # Libtool shared library interface versions (current:revision:age) -m4_define(libpcre2_8_version, [11:0:11]) -m4_define(libpcre2_16_version, [11:0:11]) -m4_define(libpcre2_32_version, [11:0:11]) -m4_define(libpcre2_posix_version, [3:2:0]) +m4_define(libpcre2_8_version, [11:1:11]) +m4_define(libpcre2_16_version, [11:1:11]) +m4_define(libpcre2_32_version, [11:1:11]) +m4_define(libpcre2_posix_version, [3:3:0]) # NOTE: The CMakeLists.txt file searches for the above variables in the first # 50 lines of this file. Please update that if the variables above are moved. diff --git a/doc/html/pcre2api.html b/doc/html/pcre2api.html index 2602032b..95d80232 100644 --- a/doc/html/pcre2api.html +++ b/doc/html/pcre2api.html @@ -1381,7 +1381,7 @@ If <i>errorcode</i> or <i>erroroffset</i> is NULL, <b>pcre2_compile()</b> 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 <b>pcre2_compile()</b> returns NULL because a compilation -error has occurred. +error has occurred. </P> <P> There are nearly 100 positive error codes that <b>pcre2_compile()</b> may return diff --git a/doc/html/pcre2grep.html b/doc/html/pcre2grep.html index cba30df1..29ab0311 100644 --- a/doc/html/pcre2grep.html +++ b/doc/html/pcre2grep.html @@ -103,7 +103,7 @@ Patterns can be no longer than 8KiB or BUFSIZ bytes, whichever is the greater. BUFSIZ is defined in <b><stdio.h></b>. When there is more than one pattern (specified by the use of <b>-e</b> and/or <b>-f</b>), each pattern is applied to each line in the order in which they are defined, except that all the <b>-e</b> -patterns are tried before the <b>-f</b> patterns. +patterns are tried before the <b>-f</b> patterns. </P> <P> By default, as soon as one pattern matches a line, no further patterns are @@ -123,8 +123,8 @@ later matches on the same line can be found. Note, however, that an overlapping match that starts in the middle of another match will not be processed. </P> <P> -The above behaviour was changed at release 10.41 to be more compatible with GNU -grep. In earlier releases, <b>pcre2grep</b> did not recognize matches from +The above behaviour was changed at release 10.41 to be more compatible with GNU +grep. In earlier releases, <b>pcre2grep</b> did not recognize matches from later patterns that were earlier in the subject. </P> <P> @@ -325,7 +325,7 @@ line in the order in which they are defined. <br> If <b>-f</b> is used with <b>-e</b>, the command line patterns are matched first, followed by the patterns from the file(s), independent of the order in which -these options are specified. +these options are specified. </P> <P> <b>--exclude</b>=<i>pattern</i> @@ -487,7 +487,7 @@ given any number of times. If a directory matches both <b>--include-dir</b> and <b>-L</b>, <b>--files-without-match</b> Instead of outputting lines from the files, just output the names of the files that do not contain any lines that would have been output. Each file name is -output once, on a separate line by default, but if the <b>-Z</b> option is set, +output once, on a separate line by default, but if the <b>-Z</b> option is set, they are separated by zero bytes instead of newlines. This option overrides any previous <b>-H</b>, <b>-h</b>, or <b>-l</b> options. </P> diff --git a/doc/html/pcre2limits.html b/doc/html/pcre2limits.html index 43a15d34..fca5e89c 100644 --- a/doc/html/pcre2limits.html +++ b/doc/html/pcre2limits.html @@ -72,8 +72,8 @@ The maximum length of a string argument to a callout is the largest number a 32-bit unsigned integer can hold. </P> <P> -The maximum amount of heap memory used for matching is controlled by the heap -limit, which can be set in a pattern or in a match context. The default is a +The maximum amount of heap memory used for matching is controlled by the heap +limit, which can be set in a pattern or in a match context. The default is a very large number, effectively unlimited. </P> <br><b> diff --git a/doc/html/pcre2perform.html b/doc/html/pcre2perform.html index ab7dfc84..55fdf202 100644 --- a/doc/html/pcre2perform.html +++ b/doc/html/pcre2perform.html @@ -83,7 +83,7 @@ From release 10.30, the interpretive (non-JIT) version of <b>pcre2_match()</b> uses very little system stack at run time. In earlier releases recursive function calls could use a great deal of stack, and this could cause problems, but this usage has been eliminated. Backtracking positions are now explicitly -remembered in memory frames controlled by the code. +remembered in memory frames controlled by the code. </P> <P> The size of each frame depends on the size of pointer variables and the number @@ -92,7 +92,7 @@ system the frame size for a pattern with no captures is 128 bytes. For each capturing group the size increases by 16 bytes. </P> <P> -Until release 10.41, an initial 20KiB frames vector was allocated on the system +Until release 10.41, an initial 20KiB frames vector was allocated on the system stack, but this still caused some issues for multi-thread applications where each thread has a very small stack. From release 10.41 backtracking memory frames are always held in heap memory. An initial heap allocation is obtained @@ -101,12 +101,12 @@ remembered with the match data block and re-used if that block is used for another match. It is freed when the match data block itself is freed. </P> <P> -The size of the initial block is the larger of 20KiB or ten times the pattern's -frame size, unless the heap limit is less than this, in which case the heap +The size of the initial block is the larger of 20KiB or ten times the pattern's +frame size, unless the heap limit is less than this, in which case the heap limit is used. If the initial block proves to be too small during matching, it -is replaced by a larger block, subject to the heap limit. The heap limit is -checked only when a new block is to be allocated. Reducing the heap limit -between calls to <b>pcre2_match()</b> with the same match data block does not +is replaced by a larger block, subject to the heap limit. The heap limit is +checked only when a new block is to be allocated. Reducing the heap limit +between calls to <b>pcre2_match()</b> with the same match data block does not affect the saved block. </P> <P> diff --git a/doc/pcre2.txt b/doc/pcre2.txt index 762c3262..73abead8 100644 --- a/doc/pcre2.txt +++ b/doc/pcre2.txt @@ -185,8 +185,8 @@ REVISION Last updated: 27 August 2021 Copyright (c) 1997-2021 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2API(3) Library Functions Manual PCRE2API(3) @@ -3859,8 +3859,8 @@ REVISION Last updated: 27 July 2022 Copyright (c) 1997-2022 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2BUILD(3) Library Functions Manual PCRE2BUILD(3) @@ -4454,8 +4454,8 @@ REVISION Last updated: 27 July 2022 Copyright (c) 1997-2022 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2CALLOUT(3) Library Functions Manual PCRE2CALLOUT(3) @@ -4884,8 +4884,8 @@ REVISION Last updated: 03 February 2019 Copyright (c) 1997-2019 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2COMPAT(3) Library Functions Manual PCRE2COMPAT(3) @@ -5107,8 +5107,8 @@ REVISION Last updated: 08 December 2021 Copyright (c) 1997-2021 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2JIT(3) Library Functions Manual PCRE2JIT(3) @@ -5534,8 +5534,8 @@ REVISION Last updated: 30 November 2021 Copyright (c) 1997-2021 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2LIMITS(3) Library Functions Manual PCRE2LIMITS(3) @@ -5608,8 +5608,8 @@ REVISION Last updated: 26 July 2022 Copyright (c) 1997-2022 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2MATCHING(3) Library Functions Manual PCRE2MATCHING(3) @@ -5833,8 +5833,8 @@ REVISION Last updated: 28 August 2021 Copyright (c) 1997-2021 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2PARTIAL(3) Library Functions Manual PCRE2PARTIAL(3) @@ -6213,8 +6213,8 @@ REVISION Last updated: 04 September 2019 Copyright (c) 1997-2019 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2PATTERN(3) Library Functions Manual PCRE2PATTERN(3) @@ -9699,8 +9699,8 @@ REVISION Last updated: 12 January 2022 Copyright (c) 1997-2022 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2PERFORM(3) Library Functions Manual PCRE2PERFORM(3) @@ -9951,8 +9951,8 @@ REVISION Last updated: 27 July 2022 Copyright (c) 1997-2022 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2POSIX(3) Library Functions Manual PCRE2POSIX(3) @@ -10285,8 +10285,8 @@ REVISION Last updated: 26 April 2021 Copyright (c) 1997-2021 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2SAMPLE(3) Library Functions Manual PCRE2SAMPLE(3) @@ -10563,8 +10563,8 @@ REVISION Last updated: 27 June 2018 Copyright (c) 1997-2018 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2SYNTAX(3) Library Functions Manual PCRE2SYNTAX(3) @@ -11111,8 +11111,8 @@ REVISION Last updated: 12 January 2022 Copyright (c) 1997-2022 University of Cambridge. ------------------------------------------------------------------------------ - - + + PCRE2UNICODE(3) Library Functions Manual PCRE2UNICODE(3) @@ -11548,5 +11548,5 @@ REVISION Last updated: 22 December 2021 Copyright (c) 1997-2021 University of Cambridge. ------------------------------------------------------------------------------ - - + + diff --git a/doc/pcre2api.3 b/doc/pcre2api.3 index b4590adf..75fca76d 100644 --- a/doc/pcre2api.3 +++ b/doc/pcre2api.3 @@ -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. +error has occurred. .P There are nearly 100 positive error codes that \fBpcre2_compile()\fP may return if it finds an error in the pattern. There are also some negative error codes diff --git a/doc/pcre2grep.1 b/doc/pcre2grep.1 index ea50b875..956633d1 100644 --- a/doc/pcre2grep.1 +++ b/doc/pcre2grep.1 @@ -72,7 +72,7 @@ Patterns can be no longer than 8KiB or BUFSIZ bytes, whichever is the greater. BUFSIZ is defined in \fB<stdio.h>\fP. When there is more than one pattern (specified by the use of \fB-e\fP and/or \fB-f\fP), each pattern is applied to each line in the order in which they are defined, except that all the \fB-e\fP -patterns are tried before the \fB-f\fP patterns. +patterns are tried before the \fB-f\fP patterns. .P By default, as soon as one pattern matches a line, no further patterns are considered. However, if \fB--colour\fP (or \fB--color\fP) is used to colour the @@ -89,8 +89,8 @@ Scanning with all the patterns resumes immediately following the match, so that later matches on the same line can be found. Note, however, that an overlapping match that starts in the middle of another match will not be processed. .P -The above behaviour was changed at release 10.41 to be more compatible with GNU -grep. In earlier releases, \fBpcre2grep\fP did not recognize matches from +The above behaviour was changed at release 10.41 to be more compatible with GNU +grep. In earlier releases, \fBpcre2grep\fP did not recognize matches from later patterns that were earlier in the subject. .P Patterns that can match an empty string are accepted, but empty string @@ -278,7 +278,7 @@ line in the order in which they are defined. .sp If \fB-f\fP is used with \fB-e\fP, the command line patterns are matched first, followed by the patterns from the file(s), independent of the order in which -these options are specified. +these options are specified. .TP \fB--exclude\fP=\fIpattern\fP Files (but not directories) whose names match the pattern are skipped without @@ -422,7 +422,7 @@ given any number of times. If a directory matches both \fB--include-dir\fP and \fB-L\fP, \fB--files-without-match\fP Instead of outputting lines from the files, just output the names of the files that do not contain any lines that would have been output. Each file name is -output once, on a separate line by default, but if the \fB-Z\fP option is set, +output once, on a separate line by default, but if the \fB-Z\fP option is set, they are separated by zero bytes instead of newlines. This option overrides any previous \fB-H\fP, \fB-h\fP, or \fB-l\fP options. .TP diff --git a/doc/pcre2limits.3 b/doc/pcre2limits.3 index da56f2f5..9281aa66 100644 --- a/doc/pcre2limits.3 +++ b/doc/pcre2limits.3 @@ -52,8 +52,8 @@ is 255 code units for the 8-bit library and 65535 code units for the 16-bit and The maximum length of a string argument to a callout is the largest number a 32-bit unsigned integer can hold. .P -The maximum amount of heap memory used for matching is controlled by the heap -limit, which can be set in a pattern or in a match context. The default is a +The maximum amount of heap memory used for matching is controlled by the heap +limit, which can be set in a pattern or in a match context. The default is a very large number, effectively unlimited. . . diff --git a/doc/pcre2perform.3 b/doc/pcre2perform.3 index e1e392a8..72aa67a8 100644 --- a/doc/pcre2perform.3 +++ b/doc/pcre2perform.3 @@ -69,14 +69,14 @@ From release 10.30, the interpretive (non-JIT) version of \fBpcre2_match()\fP uses very little system stack at run time. In earlier releases recursive function calls could use a great deal of stack, and this could cause problems, but this usage has been eliminated. Backtracking positions are now explicitly -remembered in memory frames controlled by the code. +remembered in memory frames controlled by the code. .P The size of each frame depends on the size of pointer variables and the number of capturing parenthesized groups in the pattern being matched. On a 64-bit system the frame size for a pattern with no captures is 128 bytes. For each capturing group the size increases by 16 bytes. .P -Until release 10.41, an initial 20KiB frames vector was allocated on the system +Until release 10.41, an initial 20KiB frames vector was allocated on the system stack, but this still caused some issues for multi-thread applications where each thread has a very small stack. From release 10.41 backtracking memory frames are always held in heap memory. An initial heap allocation is obtained @@ -84,12 +84,12 @@ the first time any match data block is passed to \fBpcre2_match()\fP. This is remembered with the match data block and re-used if that block is used for another match. It is freed when the match data block itself is freed. .P -The size of the initial block is the larger of 20KiB or ten times the pattern's -frame size, unless the heap limit is less than this, in which case the heap +The size of the initial block is the larger of 20KiB or ten times the pattern's +frame size, unless the heap limit is less than this, in which case the heap limit is used. If the initial block proves to be too small during matching, it -is replaced by a larger block, subject to the heap limit. The heap limit is -checked only when a new block is to be allocated. Reducing the heap limit -between calls to \fBpcre2_match()\fP with the same match data block does not +is replaced by a larger block, subject to the heap limit. The heap limit is +checked only when a new block is to be allocated. Reducing the heap limit +between calls to \fBpcre2_match()\fP with the same match data block does not affect the saved block. .P In contrast to \fBpcre2_match()\fP, \fBpcre2_dfa_match()\fP does use recursive diff --git a/src/config.h.generic b/src/config.h.generic index 76dc5868..01ee8bfe 100644 --- a/src/config.h.generic +++ b/src/config.h.generic @@ -236,7 +236,7 @@ sure both macros are undefined; an emulation function will then be used. */ #define PACKAGE_NAME "PCRE2" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PCRE2 10.40" +#define PACKAGE_STRING "PCRE2 10.41" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pcre2" @@ -245,7 +245,7 @@ sure both macros are undefined; an emulation function will then be used. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "10.40" +#define PACKAGE_VERSION "10.41" /* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested parentheses (of any kind) in a pattern. This limits the amount of system @@ -438,7 +438,13 @@ sure both macros are undefined; an emulation function will then be used. */ #endif /* Version number of package */ -#define VERSION "10.40" +#define VERSION "10.41" + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/src/pcre2.h.generic b/src/pcre2.h.generic index d37af37c..231baf2d 100644 --- a/src/pcre2.h.generic +++ b/src/pcre2.h.generic @@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE. /* The current PCRE version information. */ #define PCRE2_MAJOR 10 -#define PCRE2_MINOR 40 +#define PCRE2_MINOR 41 #define PCRE2_PRERELEASE -#define PCRE2_DATE 2022-04-14 +#define PCRE2_DATE 2022-12-06 /* When an application links to a PCRE DLL in Windows, the symbols that are imported have to be identified as such. When building PCRE2, the appropriate diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index 1b40ed56..edf7e82e 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -1266,7 +1266,7 @@ PCRE2_SIZE* ref_count; if (code != NULL) { -#ifdef SUPPORT_JIT +#ifdef SUPPORT_JIT if (code->executable_jit != NULL) PRIV(jit_free)(code->executable_jit, &code->memctl); #endif diff --git a/src/pcre2_context.c b/src/pcre2_context.c index 882d9640..8e05ede5 100644 --- a/src/pcre2_context.c +++ b/src/pcre2_context.c @@ -444,7 +444,7 @@ return 0; } /* These functions became obsolete at release 10.30. The first is kept as a -synonym for backwards compatibility. The second now does nothing. Exclude both +synonym for backwards compatibility. The second now does nothing. Exclude both from coverage reports. */ /* LCOV_EXCL_START */ diff --git a/src/pcre2_match.c b/src/pcre2_match.c index a3960609..168b9fad 100644 --- a/src/pcre2_match.c +++ b/src/pcre2_match.c @@ -636,7 +636,7 @@ copied when a new frame is created. */ frame_copy_size = frame_size - offsetof(heapframe, eptr); /* Set up the first frame and the end of the frames vector. We set the local -heapframes_size to the usuable amount of the vector, that is, a whole number of +heapframes_size to the usuable amount of the vector, that is, a whole number of frames. */ F = match_data->heapframes; @@ -684,7 +684,7 @@ if (N >= frames_top) match_data->memctl.free(match_data->heapframes, match_data->memctl.memory_data); match_data->heapframes = new; match_data->heapframes_size = newsize; - + heapframes_size = (newsize / frame_size) * frame_size; frames_top = (heapframe *)((char *)new + heapframes_size); } @@ -6847,11 +6847,11 @@ if (match_data->heapframes_size < heapframes_size) match_data->memctl.memory_data); match_data->heapframes = match_data->memctl.malloc(heapframes_size, match_data->memctl.memory_data); - if (match_data->heapframes == NULL) + if (match_data->heapframes == NULL) { - match_data->heapframes_size = 0; + match_data->heapframes_size = 0; return PCRE2_ERROR_NOMEMORY; - } + } match_data->heapframes_size = heapframes_size; } diff --git a/src/pcre2grep.c b/src/pcre2grep.c index 6ed9be06..e7eb311a 100644 --- a/src/pcre2grep.c +++ b/src/pcre2grep.c @@ -1855,21 +1855,21 @@ for (int i = 1; p != NULL; p = p->next, i++) /* Handle a successful match. When all_matches is false, we are done. Otherwise we must save the earliest match. */ - + if (rc >= 0) { - if (!all_matches) + if (!all_matches) { - *mrc = rc; + *mrc = rc; return TRUE; - } - + } + if (first < 0 || offsets[0] < offsets_pair[first][0] || (offsets[0] == offsets_pair[first][0] && offsets[1] > offsets_pair[first][1])) { first = match_data_toggle; - firstrc = rc; + firstrc = rc; match_data_toggle ^= 1; match_data = match_data_pair[match_data_toggle]; offsets = offsets_pair[match_data_toggle]; diff --git a/src/pcre2posix.c b/src/pcre2posix.c index 5d32f72d..3ffdc954 100644 --- a/src/pcre2posix.c +++ b/src/pcre2posix.c @@ -342,10 +342,10 @@ preg->re_erroffset = (size_t)(-1); /* No meaning after successful compile */ if (preg->re_match_data == NULL) { - /* LCOV_EXCL_START */ + /* LCOV_EXCL_START */ pcre2_code_free(preg->re_pcre2_code); return REG_ESPACE; - /* LCOV_EXCL_STOP */ + /* LCOV_EXCL_STOP */ } return 0; @@ -424,7 +424,7 @@ if (rc >= 0) if (rc <= PCRE2_ERROR_UTF8_ERR1 && rc >= PCRE2_ERROR_UTF8_ERR21) return REG_INVARG; - + /* Most of these are events that won't occur during testing, so exclude them from coverage. */ @@ -432,7 +432,7 @@ switch(rc) { case PCRE2_ERROR_HEAPLIMIT: return REG_ESPACE; case PCRE2_ERROR_NOMATCH: return REG_NOMATCH; - + /* LCOV_EXCL_START */ case PCRE2_ERROR_BADMODE: return REG_INVARG; case PCRE2_ERROR_BADMAGIC: return REG_INVARG; @@ -442,7 +442,7 @@ switch(rc) case PCRE2_ERROR_NOMEMORY: return REG_ESPACE; case PCRE2_ERROR_NULL: return REG_INVARG; default: return REG_ASSERT; - /* LCOV_EXCL_STOP */ + /* LCOV_EXCL_STOP */ } } diff --git a/src/pcre2test.c b/src/pcre2test.c index f6f5d66c..18e3f0f1 100644 --- a/src/pcre2test.c +++ b/src/pcre2test.c @@ -5452,9 +5452,9 @@ if (pat_patctl.locale[0] != 0) { strcpy((char *)locale_name, (char *)pat_patctl.locale); if (locale_tables != NULL) - { + { PCRE2_MAKETABLES_FREE(general_context, (void *)locale_tables); - } + } PCRE2_MAKETABLES(locale_tables, general_context); } use_tables = locale_tables; |