diff options
author | Carlo Marcelo Arenas Belón <carenas@gmail.com> | 2021-11-12 16:45:04 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-11-14 12:13:28 -0800 |
commit | e0d39a9133e1507345d73ac5aff85f037f39aa54 (patch) | |
tree | 6180f608c8e7aeb689e8fba01da7d5848b0501a5 /doc | |
parent | b07c82ccdb9fcb97d99a5871134b2227e7f08915 (diff) | |
download | grep-e0d39a9133e1507345d73ac5aff85f037f39aa54.tar.gz |
grep: migrate to pcre2
Mostly a bug by bug translation of the original code to the PCRE2 API.
Code still could do with some optimizations but should be good as a
starting point.
The API changes the sign of some types and therefore some ugly casts
were needed, some of the changes are just to make sure all variables
fit into the newer types better.
Includes backward compatibility and could be made to build all the way
to 10.00, but assumes a recent enough version and has been tested with
10.23 (from CentOS 7, the oldest).
Performance seems equivalent, and it also seems functionally complete.
* m4/pcre.m4 (gl_FUNC_PCRE): Check for PCRE2, not the original PCRE.
* src/pcresearch.c (struct pcre_comp, jit_exec)
(Pcompile, Pexecute):
Use PCRE2, not the original PCRE.
* tests/filename-lineno.pl: Adjust to match PCRE2 diagnostics.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/grep.in.1 | 8 | ||||
-rw-r--r-- | doc/grep.texi | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/doc/grep.in.1 b/doc/grep.in.1 index b014f657..208cb76d 100644 --- a/doc/grep.in.1 +++ b/doc/grep.in.1 @@ -756,7 +756,7 @@ In other implementations, basic regular expressions are less powerful. The following description applies to extended regular expressions; differences for basic regular expressions are summarized afterwards. Perl-compatible regular expressions give additional functionality, and are -documented in B<pcresyntax>(3) and B<pcrepattern>(3), but work only if +documented in B<pcre2syntax>(3) and B<pcre2pattern>(3), but work only if PCRE support is enabled. .PP The fundamental building blocks are the regular expressions @@ -1360,9 +1360,9 @@ from the globbing syntax that the shell uses to match file names. .BR sort (1), .BR xargs (1), .BR read (2), -.BR pcre (3), -.BR pcresyntax (3), -.BR pcrepattern (3), +.BR pcre2 (3), +.BR pcre2syntax (3), +.BR pcre2pattern (3), .BR terminfo (5), .BR glob (7), .BR regex (7) diff --git a/doc/grep.texi b/doc/grep.texi index e5b9fd8a..c3c4bbfa 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -1168,7 +1168,7 @@ In other implementations, basic regular expressions are less powerful. The following description applies to extended regular expressions; differences for basic regular expressions are summarized afterwards. Perl-compatible regular expressions give additional functionality, and -are documented in the @i{pcresyntax}(3) and @i{pcrepattern}(3) manual +are documented in the @i{pcre2syntax}(3) and @i{pcre2pattern}(3) manual pages, but work only if PCRE is available in the system. @menu |