Skip to content

Commit 1fffb0d

Browse files
authored
Updates to the README and some documentation (#681)
1 parent ec7f0a7 commit 1fffb0d

File tree

117 files changed

+3813
-3803
lines changed

Some content is hidden

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

117 files changed

+3813
-3803
lines changed

AUTHORS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
PCRE2 Authorship and Contributors
22
=================================
33

4-
COPYRIGHT
4+
Copyright
55
---------
66

77
Please see the file [LICENCE](./LICENCE.md) in the PCRE2 distribution for
88
copyright details.
99

1010

11-
MAINTAINERS
11+
Maintainers
1212
-----------
1313

1414
The PCRE and PCRE2 libraries were authored and maintained by Philip Hazel.
@@ -62,7 +62,7 @@ Both administrators are volunteers acting in a personal capacity.
6262
</table>
6363

6464

65-
CONTRIBUTORS
65+
Contributors
6666
------------
6767

6868
Many others have participated and contributed to PCRE2 over its history.

LICENCE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,3 @@ not apply all the way down a chain of software. If binary package A includes
9999
PCRE2, it must respect the condition, but if package B is software that
100100
includes package A, the condition is not imposed on package B unless it uses
101101
PCRE2 independently.
102-
103-
End

NON-AUTOTOOLS-BUILD

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Building PCRE2 without using autotools
2-
--------------------------------------
2+
======================================
33

44
This document contains the following sections:
55

@@ -16,7 +16,8 @@ This document contains the following sections:
1616
Building PCRE2 under VMS
1717

1818

19-
GENERAL
19+
General
20+
-------
2021

2122
The source of the PCRE2 libraries consists entirely of code written in Standard
2223
C, and so should compile successfully on any system that has a Standard C
@@ -37,7 +38,8 @@ provided for those who build PCRE2 without using "configure" or CMake. If you
3738
use "configure" or CMake, the .generic versions are not used.
3839

3940

40-
GENERIC INSTRUCTIONS FOR THE PCRE2 C LIBRARIES
41+
Generic instructions for the PCRE2 C libraries
42+
----------------------------------------------
4143

4244
There are three possible PCRE2 libraries, each handling data with a specific
4345
code unit width: 8, 16, or 32 bits. You can build any combination of them. The
@@ -207,20 +209,23 @@ example.
207209
defining SUPPORT_JIT, pcre2grep does not try to make use of JIT.
208210

209211

210-
STACK SIZE IN WINDOWS ENVIRONMENTS
212+
Stack size in Windows environments
213+
----------------------------------
211214

212215
Prior to release 10.30 the default system stack size of 1MiB in some Windows
213216
environments caused issues with some tests. This should no longer be the case
214217
for 10.30 and later releases.
215218

216219

217-
LINKING PROGRAMS IN WINDOWS ENVIRONMENTS
220+
Linking programs in Windows environments
221+
----------------------------------------
218222

219223
If you want to statically link a program against a PCRE2 library in the form of
220224
a non-dll .a file, you must define PCRE2_STATIC before including src/pcre2.h.
221225

222226

223-
CALLING CONVENTIONS IN WINDOWS ENVIRONMENTS
227+
Calling conventions in Windows environments
228+
-------------------------------------------
224229

225230
It is possible to compile programs to use different calling conventions using
226231
MSVC. Search the web for "calling conventions" for more information. To make it
@@ -231,7 +236,8 @@ not set, it defaults to empty; the default calling convention is then used
231236
(which is what is wanted most of the time).
232237

233238

234-
COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE2 ON WINDOWS WITH CMAKE")
239+
Comments about Win32 builds (see also "Building PCRE2 on Windows with CMake")
240+
---------------------------
235241

236242
There are two ways of building PCRE2 using the "configure, make, make install"
237243
paradigm on Windows systems: using MinGW or using Cygwin. These are not at all
@@ -293,7 +299,8 @@ newline option that includes LF as a valid newline, it may be necessary to
293299
change the line terminators in the test files to get some of the tests to work.
294300

295301

296-
BUILDING PCRE2 ON WINDOWS WITH CMAKE
302+
Building PCRE2 on Windows with CMake
303+
------------------------------------
297304

298305
CMake is an alternative configuration facility that can be used instead of
299306
"configure". CMake creates project files (make files, solution files, etc.)
@@ -364,7 +371,8 @@ be deleted.
364371
Regardless of build system used, `ctest` will run the tests.
365372

366373

367-
BUILDING PCRE2 ON WINDOWS WITH VISUAL STUDIO
374+
Building PCRE2 on Windows with Visual Studio
375+
--------------------------------------------
368376

369377
The code currently cannot be compiled without an inttypes.h header, which is
370378
available only with Visual Studio 2013 or newer. However, this portable and
@@ -376,7 +384,8 @@ alternative:
376384
Just rename it and drop it into the top level of the build tree.
377385

378386

379-
TESTING WITH RUNTEST.BAT
387+
Testing with RunTest.bat
388+
------------------------
380389

381390
If configured with CMake, building the test project ("make test" or building
382391
ALL_TESTS in Visual Studio) creates (and runs) pcre2_test.bat (and depending
@@ -410,7 +419,8 @@ Otherwise:
410419
To independently test the just-in-time compiler, run pcre2_jit_test.exe.
411420

412421

413-
BUILDING PCRE2 ON NATIVE Z/OS AND Z/VM
422+
Building PCRE2 on native z/OS and z/VM
423+
--------------------------------------
414424

415425
z/OS and z/VM are operating systems for mainframe computers, produced by IBM.
416426
The character code used is EBCDIC, not ASCII or Unicode. In z/OS, UNIX APIs and
@@ -429,7 +439,8 @@ z/OS file formats. The port provides an API for LE languages such as COBOL and
429439
for the z/OS and z/VM versions of the Rexx languages.
430440

431441

432-
BUILDING PCRE2 UNDER VMS
442+
Building PCRE2 under VMS
443+
------------------------
433444

434445
Alexey Chuphin has contributed some auxiliary files for building PCRE2 under
435446
OpenVMS. They are in the "vms" directory in the distribution tarball. Please

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
README file for PCRE2 (Perl-compatible regular expression library)
2-
------------------------------------------------------------------
2+
==================================================================
33

44
PCRE2 is a re-working of the original PCRE1 library to provide an entirely new
55
API. Since its initial release in 2015, there has been further development of

README.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<picture>
2-
<source media="(prefers-color-scheme: dark)" width="100%" height="100px" srcset="https://raw.githubusercontent.com/PCRE2Project/pcre2/refs/heads/pages/pages/assets/pcre2-readme-dark.svg">
3-
<img alt="PCRE2: Perl-Compatible Regular Expressions" width="100%" height="100px" src="https://raw.githubusercontent.com/PCRE2Project/pcre2/refs/heads/pages/pages/assets/pcre2-readme-light.svg">
2+
<source media="(prefers-color-scheme: dark)" width="100%" height="100px" srcset="https://raw.githubusercontent.com/PCRE2Project/pcre2/refs/heads/pages/pages/static/images/pcre2-readme-dark.svg">
3+
<img alt="PCRE2: Perl-Compatible Regular Expressions" width="100%" height="100px" src="https://raw.githubusercontent.com/PCRE2Project/pcre2/refs/heads/pages/pages/static/images/pcre2-readme-light.svg">
44
</picture>
55

66
## Overview
@@ -64,7 +64,7 @@ x86, ARM, RISC-V, POWER, S390X; many others known to work
6464

6565
<picture>
6666
<source media="(prefers-color-scheme: dark)" width="787px" srcset="https://github.com/user-attachments/assets/1886bc4b-2e05-4827-af83-e4ed45f25ab1">
67-
<img width="787px" src="https://github.com/user-attachments/assets/7b90180e-276e-4202-b590-b72871cff91a">
67+
<img alt="Recording of a terminal session showing the PCRE2 quickstart; reproduced in text form below" width="787px" src="https://github.com/user-attachments/assets/7b90180e-276e-4202-b590-b72871cff91a">
6868
</picture>
6969

7070
<details>
@@ -86,12 +86,20 @@ git clone https://github.com/PCRE2Project/pcre2.git ./pcre2 \
8686

8787
# Here's a quick little demo to show how we can make use of PCRE2.
8888
# For a fuller example, see './pcre2/src/pcre2demo.c'.
89-
# Try this pre-prepared sample code:
90-
cat demo.c
89+
# See below for the demo code.
9190

92-
----------------------------------------------------------------------
93-
File: demo.c
94-
----------------------------------------------------------------------
91+
# Compile the demo:
92+
gcc -g -I./pcre2/build -L./pcre2/build demo.c -o demo -lpcre2-8
93+
94+
# Finally, run our demo:
95+
./demo 'c.t' 'dogs and cats'
96+
97+
# We fetched, built, and called PCRE2 successfully! :)
98+
```
99+
100+
File `demo.c`:
101+
102+
```c
95103
/* Set PCRE2_CODE_UNIT_WIDTH to indicate we will use 8-bit input. */
96104
#define PCRE2_CODE_UNIT_WIDTH 8
97105
#include <pcre2.h>
@@ -150,15 +158,6 @@ int main(int argc, char* argv[]) {
150158
pcre2_code_free(re);
151159
return 0;
152160
}
153-
----------------------------------------------------------------------
154-
155-
# Compile the demo:
156-
gcc -g -I./pcre2/build -L./pcre2/build demo.c -o demo -lpcre2-8
157-
158-
# Finally, run our demo:
159-
./demo 'c.t' 'dogs and cats'
160-
161-
# We fetched, built, and called PCRE2 successfully! :)
162161
```
163162
164163
</details>
@@ -213,7 +212,7 @@ There are accompanying utility functions for converting glob patterns and POSIX
213212
214213
As well as the PCRE2 API, the library also offers a POSIX-compatible `<regex.h>` header and `regexec()` function. However, this does not provide the ability to pass PCRE2 flags, so we recommend users consume the PCRE2 API if possible.
215214
216-
See the [full library and API documentation](https://pcre2project.github.io/pcre2/doc/html/index.html) for further details.
215+
See the [full library and API documentation](https://pcre2project.github.io/pcre2/doc/) for further details.
217216
218217
For third-party documentation, see further:
219218
@@ -241,7 +240,7 @@ Other systems are likely to work (including mobile, embedded platforms, and comm
241240
242241
PCRE2 releases support CMake for building, and for UNIX platforms include a `./configure` script built by Autoconf. Build files for the Bazel build system and `zig build` are also included. Integrating PCRE2 with other systems can be done by including the `.c` files in an existing project.
243242
244-
Please see the files [README](./README) and [NON-AUTOTOOLS-BUILD](./NON-AUTOTOOLS-BUILD) for full build documentation, as well as the man pages, including [`man pcre2/doc/pcre2build.3`](https://pcre2project.github.io/pcre2/doc/html/pcre2build.html).
243+
Please see the files [README](./README) and [NON-AUTOTOOLS-BUILD](./NON-AUTOTOOLS-BUILD) for full build documentation, as well as the man pages, including [`man pcre2/doc/pcre2build.3`](https://pcre2project.github.io/pcre2/doc/pcre2build/).
245244
246245
## Licence
247246

SECURITY.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Security policies
1+
Security policies
2+
=================
23

3-
## Release security
4+
Release security
5+
----------------
46

57
The PCRE2 project provides source-only releases, with no binaries.
68

@@ -20,7 +22,8 @@ Git checkout of the (GPG-signed) release tag.
2022
Please contact the maintainers for any queries about release integrity or the
2123
project's supply-chain.
2224

23-
## Reporting vulnerabilities
25+
Reporting vulnerabilities
26+
-------------------------
2427

2528
The PCRE2 project prioritises security. We appreciate third-party testing and
2629
security research, and would be grateful if you could responsibly disclose your

doc/html/NON-AUTOTOOLS-BUILD.txt

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Building PCRE2 without using autotools
2-
--------------------------------------
2+
======================================
33

44
This document contains the following sections:
55

@@ -16,7 +16,8 @@ This document contains the following sections:
1616
Building PCRE2 under VMS
1717

1818

19-
GENERAL
19+
General
20+
-------
2021

2122
The source of the PCRE2 libraries consists entirely of code written in Standard
2223
C, and so should compile successfully on any system that has a Standard C
@@ -37,7 +38,8 @@ provided for those who build PCRE2 without using "configure" or CMake. If you
3738
use "configure" or CMake, the .generic versions are not used.
3839

3940

40-
GENERIC INSTRUCTIONS FOR THE PCRE2 C LIBRARIES
41+
Generic instructions for the PCRE2 C libraries
42+
----------------------------------------------
4143

4244
There are three possible PCRE2 libraries, each handling data with a specific
4345
code unit width: 8, 16, or 32 bits. You can build any combination of them. The
@@ -207,20 +209,23 @@ example.
207209
defining SUPPORT_JIT, pcre2grep does not try to make use of JIT.
208210

209211

210-
STACK SIZE IN WINDOWS ENVIRONMENTS
212+
Stack size in Windows environments
213+
----------------------------------
211214

212215
Prior to release 10.30 the default system stack size of 1MiB in some Windows
213216
environments caused issues with some tests. This should no longer be the case
214217
for 10.30 and later releases.
215218

216219

217-
LINKING PROGRAMS IN WINDOWS ENVIRONMENTS
220+
Linking programs in Windows environments
221+
----------------------------------------
218222

219223
If you want to statically link a program against a PCRE2 library in the form of
220224
a non-dll .a file, you must define PCRE2_STATIC before including src/pcre2.h.
221225

222226

223-
CALLING CONVENTIONS IN WINDOWS ENVIRONMENTS
227+
Calling conventions in Windows environments
228+
-------------------------------------------
224229

225230
It is possible to compile programs to use different calling conventions using
226231
MSVC. Search the web for "calling conventions" for more information. To make it
@@ -231,7 +236,8 @@ not set, it defaults to empty; the default calling convention is then used
231236
(which is what is wanted most of the time).
232237

233238

234-
COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE2 ON WINDOWS WITH CMAKE")
239+
Comments about Win32 builds (see also "Building PCRE2 on Windows with CMake")
240+
---------------------------
235241

236242
There are two ways of building PCRE2 using the "configure, make, make install"
237243
paradigm on Windows systems: using MinGW or using Cygwin. These are not at all
@@ -293,7 +299,8 @@ newline option that includes LF as a valid newline, it may be necessary to
293299
change the line terminators in the test files to get some of the tests to work.
294300

295301

296-
BUILDING PCRE2 ON WINDOWS WITH CMAKE
302+
Building PCRE2 on Windows with CMake
303+
------------------------------------
297304

298305
CMake is an alternative configuration facility that can be used instead of
299306
"configure". CMake creates project files (make files, solution files, etc.)
@@ -364,7 +371,8 @@ be deleted.
364371
Regardless of build system used, `ctest` will run the tests.
365372

366373

367-
BUILDING PCRE2 ON WINDOWS WITH VISUAL STUDIO
374+
Building PCRE2 on Windows with Visual Studio
375+
--------------------------------------------
368376

369377
The code currently cannot be compiled without an inttypes.h header, which is
370378
available only with Visual Studio 2013 or newer. However, this portable and
@@ -376,7 +384,8 @@ alternative:
376384
Just rename it and drop it into the top level of the build tree.
377385

378386

379-
TESTING WITH RUNTEST.BAT
387+
Testing with RunTest.bat
388+
------------------------
380389

381390
If configured with CMake, building the test project ("make test" or building
382391
ALL_TESTS in Visual Studio) creates (and runs) pcre2_test.bat (and depending
@@ -410,7 +419,8 @@ Otherwise:
410419
To independently test the just-in-time compiler, run pcre2_jit_test.exe.
411420

412421

413-
BUILDING PCRE2 ON NATIVE Z/OS AND Z/VM
422+
Building PCRE2 on native z/OS and z/VM
423+
--------------------------------------
414424

415425
z/OS and z/VM are operating systems for mainframe computers, produced by IBM.
416426
The character code used is EBCDIC, not ASCII or Unicode. In z/OS, UNIX APIs and
@@ -429,7 +439,8 @@ z/OS file formats. The port provides an API for LE languages such as COBOL and
429439
for the z/OS and z/VM versions of the Rexx languages.
430440

431441

432-
BUILDING PCRE2 UNDER VMS
442+
Building PCRE2 under VMS
443+
------------------------
433444

434445
Alexey Chuphin has contributed some auxiliary files for building PCRE2 under
435446
OpenVMS. They are in the "vms" directory in the distribution tarball. Please

doc/html/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
README file for PCRE2 (Perl-compatible regular expression library)
2-
------------------------------------------------------------------
2+
==================================================================
33

44
PCRE2 is a re-working of the original PCRE1 library to provide an entirely new
55
API. Since its initial release in 2015, there has been further development of

0 commit comments

Comments
 (0)