Skip to content

Commit 7375089

Browse files
committed
More file tidies for 10.33-RC1
1 parent 02ff543 commit 7375089

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+394
-383
lines changed

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888

8989
PROJECT(PCRE2 C)
9090

91-
# Increased minimum to 2.8.0 to support newer add_test features.
91+
# Increased minimum to 2.8.0 to support newer add_test features.
9292
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
9393

9494
# Set policy CMP0026 to avoid warnings for the use of LOCATION in
@@ -324,7 +324,7 @@ ENDIF(PCRE2_SUPPORT_VALGRIND)
324324

325325
IF(PCRE2_DISABLE_PERCENT_ZT)
326326
SET(DISABLE_PERCENT_ZT 1)
327-
ENDIF(PCRE2_DISABLE_PERCENT_ZT)
327+
ENDIF(PCRE2_DISABLE_PERCENT_ZT)
328328

329329
# This next one used to reference ${READLINE_LIBRARY})
330330
# but I was advised to add the NCURSES test as well, along with
@@ -459,7 +459,7 @@ SET(PCRE2_SOURCES
459459
src/pcre2_newline.c
460460
src/pcre2_ord2utf.c
461461
src/pcre2_pattern_info.c
462-
src/pcre2_script_run.c
462+
src/pcre2_script_run.c
463463
src/pcre2_serialize.c
464464
src/pcre2_string_utils.c
465465
src/pcre2_study.c
@@ -651,10 +651,10 @@ IF(PCRE2_BUILD_TESTS)
651651

652652
# exes in Debug location tested by the RunTest and RunGrepTest shell scripts
653653
# via "make test"
654-
654+
655655
# The commented out code below provokes a warning about future removal
656656
# of the facility, and requires policy CMP0026 to be set to "OLD". I have
657-
# got fed-up with the warnings, but my plea for help on the mailing list
657+
# got fed-up with the warnings, but my plea for help on the mailing list
658658
# produced no response. So, I've hacked. The new code below seems to work on
659659
# Linux.
660660

@@ -857,9 +857,9 @@ IF(PCRE2_SHOW_REPORT)
857857
MESSAGE(STATUS " Support Valgrind .................: ${PCRE2_SUPPORT_VALGRIND}")
858858
IF(PCRE2_DISABLE_PERCENT_ZT)
859859
MESSAGE(STATUS " Use %zu and %td ..................: OFF" )
860-
ELSE(PCRE2_DISABLE_PERCENT_ZT)
860+
ELSE(PCRE2_DISABLE_PERCENT_ZT)
861861
MESSAGE(STATUS " Use %zu and %td ..................: AUTO" )
862-
ENDIF(PCRE2_DISABLE_PERCENT_ZT)
862+
ENDIF(PCRE2_DISABLE_PERCENT_ZT)
863863

864864
IF(MINGW AND NOT PCRE2_STATIC)
865865
MESSAGE(STATUS " Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}")

ChangeLog

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ a greater than 1 fixed quantifier. This issue was found by Yunho Kim.
1414

1515
3. Added support for callouts from pcre2_substitute().
1616

17-
4. The POSIX functions are now all called pcre2_regcomp() etc., with wrapper
17+
4. The POSIX functions are now all called pcre2_regcomp() etc., with wrapper
1818
functions that use the standard POSIX names. However, in pcre2posix.h the POSIX
1919
names are defined as macros. This should help avoid linking with the wrong
2020
library in some environments while still exporting the POSIX names for
21-
pre-existing programs that use them. (The Debian alternative names are also
21+
pre-existing programs that use them. (The Debian alternative names are also
2222
defined as macros, but not documented.)
2323

2424
5. Fix an xclass matching issue in JIT.
@@ -33,29 +33,29 @@ new "is lower case letter" bit. At the same time, the now unused "is
3333
hexadecimal digit" bit was removed. The default tables in
3434
src/pcre2_chartables.c.dist are updated.
3535

36-
8. Implement the new Perl "script run" features (*script_run:...) and
36+
8. Implement the new Perl "script run" features (*script_run:...) and
3737
(*atomic_script_run:...) aka (*sr:...) and (*asr:...).
3838

3939
9. Fixed two typos in change 22 for 10.21, which added special handling for
40-
ranges such as a-z in EBCDIC environments. The original code probably never
41-
worked, though there were no bug reports.
40+
ranges such as a-z in EBCDIC environments. The original code probably never
41+
worked, though there were no bug reports.
4242

4343
10. Implement PCRE2_COPY_MATCHED_SUBJECT for pcre2_match() (including JIT via
4444
pcre2_match()) and pcre2_dfa_match(), but *not* the pcre2_jit_match() fast
45-
path. Also, when a match fails, set the subject field in the match data to NULL
46-
for tidiness - none of the substring extractors should reference this after
45+
path. Also, when a match fails, set the subject field in the match data to NULL
46+
for tidiness - none of the substring extractors should reference this after
4747
match failure.
4848

49-
11. If a pattern started with a subroutine call that had a quantifier with a
50-
minimum of zero, an incorrect "match must start with this character" could be
51-
recorded. Example: /(?&xxx)*ABC(?<xxx>XYZ)/ would (incorrectly) expect 'A' to
52-
be the first character of a match.
49+
11. If a pattern started with a subroutine call that had a quantifier with a
50+
minimum of zero, an incorrect "match must start with this character" could be
51+
recorded. Example: /(?&xxx)*ABC(?<xxx>XYZ)/ would (incorrectly) expect 'A' to
52+
be the first character of a match.
5353

54-
12. The heap limit checking code in pcre2_dfa_match() could suffer from
55-
overflow if the heap limit was set very large. This could cause incorrect "heap
56-
limit exceeded" errors.
54+
12. The heap limit checking code in pcre2_dfa_match() could suffer from
55+
overflow if the heap limit was set very large. This could cause incorrect "heap
56+
limit exceeded" errors.
5757

58-
13. Add "kibibytes" to the heap limit output from pcre2test -C to make the
58+
13. Add "kibibytes" to the heap limit output from pcre2test -C to make the
5959
units clear.
6060

6161
14. Add a call to pcre2_jit_free_unused_memory() in pcre2grep, for tidiness.
@@ -71,77 +71,77 @@ inttypes.h. This supports environments that do not have stdint.h but do have
7171
inttypes.h, which are known to exist. A note in the autotools documentation
7272
says (November 2018) that there are none known that are the other way round.
7373

74-
17. Added --disable-percent-zt to "configure" (and equivalent to CMake) to
75-
forcibly disable the use of %zu and %td in formatting strings because there is
76-
at least one version of VMS that claims to be C99 but does not support these
74+
17. Added --disable-percent-zt to "configure" (and equivalent to CMake) to
75+
forcibly disable the use of %zu and %td in formatting strings because there is
76+
at least one version of VMS that claims to be C99 but does not support these
7777
modifiers.
7878

79-
18. Added --disable-pcre2grep-callout-fork, which restricts the callout support
80-
in pcre2grep to the inbuilt echo facility. This may be useful in environments
79+
18. Added --disable-pcre2grep-callout-fork, which restricts the callout support
80+
in pcre2grep to the inbuilt echo facility. This may be useful in environments
8181
that do not support fork().
8282

83-
19. Fix two instances of <= 0 being applied to unsigned integers (the VMS
83+
19. Fix two instances of <= 0 being applied to unsigned integers (the VMS
8484
compiler complains).
8585

86-
20. Added "fork" support for VMS to pcre2grep, for running an external program
86+
20. Added "fork" support for VMS to pcre2grep, for running an external program
8787
via a string callout.
8888

8989
21. Improve MAP_JIT flag usage on MacOS. Patch by Rich Siegel.
9090

91-
22. If a pattern started with (*MARK), (*COMMIT), (*PRUNE), (*SKIP), or (*THEN)
91+
22. If a pattern started with (*MARK), (*COMMIT), (*PRUNE), (*SKIP), or (*THEN)
9292
followed by ^ it was not recognized as anchored.
9393

94-
23. The RunGrepTest script used to cut out the test of NUL characters for
95-
Solaris and MacOS as printf and sed can't handle them. It seems that the *BSD
96-
systems can't either. I've inverted the test so that only those OS that are
94+
23. The RunGrepTest script used to cut out the test of NUL characters for
95+
Solaris and MacOS as printf and sed can't handle them. It seems that the *BSD
96+
systems can't either. I've inverted the test so that only those OS that are
9797
known to work (currently only Linux) try to run this test.
9898

99-
24. Some tests in RunGrepTest appended to testtrygrep from two different file
100-
descriptors instead of redirecting stderr to stdout. This worked on Linux, but
99+
24. Some tests in RunGrepTest appended to testtrygrep from two different file
100+
descriptors instead of redirecting stderr to stdout. This worked on Linux, but
101101
it was reported not to on other systems, causing the tests to fail.
102102

103103
25. In the RunTest script, make the test for stack setting use the same value
104104
for the stack as it needs for -bigstack.
105105

106106
26. Insert a cast in pcre2_dfa_match.c to suppress a compiler warning.
107107

108-
26. With PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL set, escape sequences such as \s
109-
which are valid in character classes, but not as the end of ranges, were being
110-
treated as literals. An example is [_-\s] (but not [\s-_] because that gave an
111-
error at the *start* of a range). Now an "invalid range" error is given
108+
26. With PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL set, escape sequences such as \s
109+
which are valid in character classes, but not as the end of ranges, were being
110+
treated as literals. An example is [_-\s] (but not [\s-_] because that gave an
111+
error at the *start* of a range). Now an "invalid range" error is given
112112
independently of PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL.
113113

114-
27. Related to 26 above, PCRE2_BAD_ESCAPE_IS_LITERAL was affecting known escape
114+
27. Related to 26 above, PCRE2_BAD_ESCAPE_IS_LITERAL was affecting known escape
115115
sequences such as \eX when they appeared invalidly in a character class. Now
116116
the option applies only to unrecognized or malformed escape sequences.
117117

118118
28. Fix word boundary in JIT compiler. Patch by Mike Munday.
119119

120120
29. The pcre2_dfa_match() function was incorrectly handling conditional version
121-
tests such as (?(VERSION>=0)...) when the version test was true. Incorrect
121+
tests such as (?(VERSION>=0)...) when the version test was true. Incorrect
122122
processing or a crash could result.
123123

124-
30. When PCRE2_UTF is set, allow non-ASCII letters and decimal digits in group
124+
30. When PCRE2_UTF is set, allow non-ASCII letters and decimal digits in group
125125
names, as Perl does. There was a small bug in this new code, found by
126126
ClusterFuzz 12950, fixed before release.
127127

128-
31. Implemented PCRE2_EXTRA_ALT_BSUX to support ECMAScript 6's \u{hhh}
128+
31. Implemented PCRE2_EXTRA_ALT_BSUX to support ECMAScript 6's \u{hhh}
129129
construct.
130130

131131
32. Compile \p{Any} to be the same as . in DOTALL mode, so that it benefits
132132
from auto-anchoring if \p{Any}* starts a pattern.
133133

134134
33. Compile invalid UTF check in JIT test when only pcre32 is enabled.
135135

136-
34. For some time now, CMake has been warning about the setting of policy
137-
CMP0026 to "OLD" in CmakeLists.txt, and hinting that the feature might be
138-
removed in a future version. A request for CMake expertise on the list produced
139-
no result, so I have now hacked CMakeLists.txt along the lines of some changes
140-
I found on the Internet. The new code no longer needs the policy setting, and
141-
it appears to work fine on Linux.
136+
34. For some time now, CMake has been warning about the setting of policy
137+
CMP0026 to "OLD" in CmakeLists.txt, and hinting that the feature might be
138+
removed in a future version. A request for CMake expertise on the list produced
139+
no result, so I have now hacked CMakeLists.txt along the lines of some changes
140+
I found on the Internet. The new code no longer needs the policy setting, and
141+
it appears to work fine on Linux.
142142

143143
35. Setting --enable-jit=auto for an out-of-tree build failed because the
144-
source directory wasn't in the search path for AC_TRY_COMPILE always. Patch
144+
source directory wasn't in the search path for AC_TRY_COMPILE always. Patch
145145
from Ross Burton.
146146

147147

NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ News about PCRE2 releases
55
Version 10.33-RC1 03-March-2019
66
-------------------------------
77

8-
Yet more bugfixes, tidies, and a few enhancements, summarized here (see
8+
Yet more bugfixes, tidies, and a few enhancements, summarized here (see
99
ChangeLog for the full list):
1010

1111
1. Callouts from pcre2_substitute() are now available.

NON-AUTOTOOLS-BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ can skip ahead to the CMake section.
4747
environment. In particular, you can alter the definition of the NEWLINE
4848
macro to specify what character(s) you want to be interpreted as line
4949
terminators by default.
50-
50+
5151
When you subsequently compile any of the PCRE2 modules, you must specify
5252
-DHAVE_CONFIG_H to your compiler so that src/config.h is included in the
5353
sources.
@@ -61,7 +61,7 @@ can skip ahead to the CMake section.
6161
configure/make world, this is handled automatically.) When upgrading to a
6262
new release, you are strongly advised to review src/config.h.generic
6363
before re-using what you had previously.
64-
64+
6565
Note also that the src/config.h.generic file is created from a config.h
6666
that was generated by Autotools, which automatically includes settings of
6767
a number of macros that are not actually used by PCRE2 (for example,
@@ -109,7 +109,7 @@ can skip ahead to the CMake section.
109109
pcre2_newline.c
110110
pcre2_ord2utf.c
111111
pcre2_pattern_info.c
112-
pcre2_script_run.c
112+
pcre2_script_run.c
113113
pcre2_serialize.c
114114
pcre2_string_utils.c
115115
pcre2_study.c

README

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The header file for the POSIX-style functions is called pcre2posix.h. The
5353
official POSIX name is regex.h, but I did not want to risk possible problems
5454
with existing files of that name by distributing it that way. To use PCRE2 with
5555
an existing program that uses the POSIX API, pcre2posix.h will have to be
56-
renamed or pointed at by a link (or the program modified, of course). See the
56+
renamed or pointed at by a link (or the program modified, of course). See the
5757
pcre2posix documentation for more details.
5858

5959

@@ -311,10 +311,10 @@ library. They are also documented in the pcre2build man page.
311311
. There is support for calling external programs during matching in the
312312
pcre2grep command, using PCRE2's callout facility with string arguments. This
313313
support can be disabled by adding --disable-pcre2grep-callout to the
314-
"configure" command. There are two kinds of callout: one that generates
315-
output from inbuilt code, and another that calls an external program. The
316-
latter has special support for Windows and VMS; otherwise it assumes the
317-
existence of the fork() function. This facility can be disabled by adding
314+
"configure" command. There are two kinds of callout: one that generates
315+
output from inbuilt code, and another that calls an external program. The
316+
latter has special support for Windows and VMS; otherwise it assumes the
317+
existence of the fork() function. This facility can be disabled by adding
318318
--disable-pcre2grep-callout-fork to the "configure" command.
319319

320320
. The pcre2grep program currently supports only 8-bit data files, and so
@@ -344,7 +344,7 @@ library. They are also documented in the pcre2build man page.
344344

345345
The default is either 1048576 or the value of --with-pcre2grep-bufsize,
346346
whichever is the larger.
347-
347+
348348
. It is possible to compile pcre2test so that it links with the libreadline
349349
or libedit libraries, by specifying, respectively,
350350

@@ -367,14 +367,14 @@ library. They are also documented in the pcre2build man page.
367367
If you get error messages about missing functions tgetstr, tgetent, tputs,
368368
tgetflag, or tgoto, this is the problem, and linking with the ncurses library
369369
should fix it.
370-
371-
. The C99 standard defines formatting modifiers z and t for size_t and
372-
ptrdiff_t values, respectively. By default, PCRE2 uses these modifiers in
373-
environments other than Microsoft Visual Studio when __STDC_VERSION__ is
370+
371+
. The C99 standard defines formatting modifiers z and t for size_t and
372+
ptrdiff_t values, respectively. By default, PCRE2 uses these modifiers in
373+
environments other than Microsoft Visual Studio when __STDC_VERSION__ is
374374
defined and has a value greater than or equal to 199901L (indicating C99).
375375
However, there is at least one environment that claims to be C99 but does not
376376
support these modifiers. If --disable-percent-zt is specified, no use is made
377-
of the z or t modifiers. Instead or %td or %zu, %lu is used, with a cast for
377+
of the z or t modifiers. Instead or %td or %zu, %lu is used, with a cast for
378378
size_t values.
379379

380380
. There is a special option called --enable-fuzz-support for use by people who
@@ -790,7 +790,7 @@ The distribution should contain the files listed below.
790790
src/pcre2_newline.c )
791791
src/pcre2_ord2utf.c )
792792
src/pcre2_pattern_info.c )
793-
src/pcre2_script_run.c )
793+
src/pcre2_script_run.c )
794794
src/pcre2_serialize.c )
795795
src/pcre2_string_utils.c )
796796
src/pcre2_study.c )

RunGrepTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ if $valgrind $vjs $pcre2grep --help | $valgrind $vjs $pcre2grep -q 'callout scri
753753
else
754754
$cf $srcdir/testdata/grepoutputC testtrygrep
755755
fi
756-
756+
757757
if [ $? != 0 ] ; then exit 1; fi
758758
else
759759
echo "Script callouts are not supported"

configure.ac

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ AC_ARG_ENABLE(jit,
147147
if test "$enable_jit" = "auto"; then
148148
AC_LANG(C)
149149
SAVE_CPPFLAGS=$CPPFLAGS
150-
CPPFLAGS=-I$srcdir
150+
CPPFLAGS=-I$srcdir
151151
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
152152
#define SLJIT_CONFIG_AUTO 1
153153
#include "src/sljit/sljitConfigInternal.h"
154154
#if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
155155
#error unsupported
156156
#endif]])], enable_jit=yes, enable_jit=no)
157-
CPPFLAGS=$SAVE_CPPFLAGS
157+
CPPFLAGS=$SAVE_CPPFLAGS
158158
echo checking for JIT support on this hardware... $enable_jit
159159
fi
160160

@@ -607,7 +607,7 @@ if test "$enable_percent_zt" = "no"; then
607607
Define to any value to disable the use of the z and t modifiers in
608608
formatting settings such as %zu or %td (this is rarely needed).])
609609
else
610-
enable_percent_zt=auto
610+
enable_percent_zt=auto
611611
fi
612612

613613
# Unless running under Windows, JIT support requires pthreads.
@@ -647,13 +647,13 @@ if test "$enable_pcre2grep_callout" = "yes"; then
647647
fi
648648
AC_DEFINE([SUPPORT_PCRE2GREP_CALLOUT_FORK], [], [
649649
Define to any value to enable fork support in pcre2grep callout scripts.
650-
This will have no effect unless SUPPORT_PCRE2GREP_CALLOUT is also
651-
defined.])
650+
This will have no effect unless SUPPORT_PCRE2GREP_CALLOUT is also
651+
defined.])
652652
fi
653653
AC_DEFINE([SUPPORT_PCRE2GREP_CALLOUT], [], [
654654
Define to any value to enable callout script support in pcre2grep.])
655655
else
656-
enable_pcre2grep_callout_fork="no"
656+
enable_pcre2grep_callout_fork="no"
657657
fi
658658

659659
if test "$enable_unicode" = "yes"; then
@@ -1055,7 +1055,7 @@ $PACKAGE-$VERSION configuration summary:
10551055
Build static libs .................. : ${enable_static}
10561056
Use JIT in pcre2grep ............... : ${enable_pcre2grep_jit}
10571057
Enable callouts in pcre2grep ....... : ${enable_pcre2grep_callout}
1058-
Enable fork in pcre2grep callouts .. : ${enable_pcre2grep_callout_fork}
1058+
Enable fork in pcre2grep callouts .. : ${enable_pcre2grep_callout_fork}
10591059
Initial buffer size for pcre2grep .. : ${with_pcre2grep_bufsize}
10601060
Maximum buffer size for pcre2grep .. : ${with_pcre2grep_max_bufsize}
10611061
Link pcre2grep with libz ........... : ${enable_pcre2grep_libz}

0 commit comments

Comments
 (0)