pcre2/src
Carlo Marcelo Arenas Belón 7db8784296
pcre2grep: correctly handle multiple passes (#35)
* tests: use a explicit filehandle to share in testing -m

The way stdin is shared to all participants of a subshell varies
per shell, and at least the standard /bin/sh in Solaris seem to
create a new copy for each command, defeating the purpose of the
test.

Use instead exec to create a filehandle that could then be used
explicitly in the test to confirm that the stream is set.

* pcre2grep: correctly handle multiple passes

When the -m option is used, pcre2grep is meant to exit after enough
matches are found but while leaving the stream pinned to the next position
after the last match.

Unfortunately, it wasn't tracking correctly the beginning of the stream
on subsequent passes, and therefore it will fail to use the right seek
value.

Grab the position of the stream at the beginning and while at it, make
sure that the stream passed hasn't been consumed already.
2021-11-09 16:57:48 +00:00
..
sljit JIT compiler update 2021-05-27 08:11:15 +00:00
config.h.generic Final file tidies for 10.39. 2021-10-29 17:09:37 +01:00
config.h.in Update ChangeLog for GitHub commits and generate HTML docs. 2021-10-29 15:12:56 +01:00
pcre2.h.generic Final file tidies for 10.39. 2021-10-29 17:09:37 +01:00
pcre2.h.in inttypes and stdint cleanup (#30) 2021-10-29 15:05:19 +01:00
pcre2_auto_possess.c Final file tidies for 10.37-RC1 2021-04-28 16:44:51 +00:00
pcre2_chartables.c.dist Renamed dftables as pcre2_dftables and enable it to write the tables in binary. 2020-03-20 18:09:59 +00:00
pcre2_compile.c Update dates and tidy files for 10.38 release. 2021-10-01 16:44:09 +01:00
pcre2_config.c Renamed dftables as pcre2_dftables and enable it to write the tables in binary. 2020-03-20 18:09:59 +00:00
pcre2_context.c Correct tables argument data type for pcre2_set_character_tables() and fix 2019-07-28 15:58:24 +00:00
pcre2_convert.c Fix two instances of <= 0 being applied to unsigned integers. 2018-11-17 16:59:39 +00:00
pcre2_dfa_match.c Doc file tidies for 10.38-RC1 2021-08-31 17:14:42 +01:00
pcre2_dftables.c File tidies for 10.36-RC1 2020-11-06 17:27:35 +00:00
pcre2_error.c Lock out \K in lookaround assertions by default, but provide an option to 2021-08-30 16:57:44 +01:00
pcre2_extuni.c Change a number of expressions like 1<<10 to 1u<<10. 2019-04-12 14:40:27 +00:00
pcre2_find_bracket.c File tidies and documentation update for 10.32-RC1 Release Candidate. 2018-08-13 11:57:09 +00:00
pcre2_fuzzsupport.c Make pcre2_dfa_match() take notice of the match limit, to catch patterns that 2017-05-30 10:42:57 +00:00
pcre2_internal.h Added tests for __attribute__((uninitialized)) to both the configure and 2020-04-23 16:50:45 +00:00
pcre2_intmodedep.h Source tidies (trailing spaces) etc. for 10.34-RC1. 2019-10-17 16:39:38 +00:00
pcre2_jit_compile.c fix building on ancient compilers (#32) 2021-10-29 16:07:53 +01:00
pcre2_jit_match.c Remove incorrect comment. 2019-07-29 16:03:25 +00:00
pcre2_jit_misc.c JIT compiler update. 2020-08-27 06:19:17 +00:00
pcre2_jit_neon_inc.h Fix ARM64 compilation warning in JIT. 2020-11-13 08:04:06 +00:00
pcre2_jit_simd_inc.h Minor improvement for s390x SIMD. 2021-05-30 04:56:42 +00:00
pcre2_jit_test.c Fix incorrect detection of alternatives in first character search. 2021-10-05 16:41:13 +00:00
pcre2_maketables.c Renamed dftables as pcre2_dftables and enable it to write the tables in binary. 2020-03-20 18:09:59 +00:00
pcre2_match.c Doc file tidies for 10.38-RC1 2021-08-31 17:14:42 +01:00
pcre2_match_data.c Implemented pcre2_get_match_data_size(). 2019-07-16 15:50:09 +00:00
pcre2_newline.c Final file updates for 10.21 release. 2016-01-12 14:44:34 +00:00
pcre2_ord2utf.c Remove all "register" declarations. 2016-11-03 17:35:59 +00:00
pcre2_pattern_info.c File tidies and documentation update for 10.32-RC1 Release Candidate. 2018-08-13 11:57:09 +00:00
pcre2_printint.c Source tidies (trailing spaces) etc. for 10.34-RC1. 2019-10-17 16:39:38 +00:00
pcre2_script_run.c Update Script Run code to use the Script Extension property instead of the 2018-10-09 16:42:21 +00:00
pcre2_serialize.c Renamed dftables as pcre2_dftables and enable it to write the tables in binary. 2020-03-20 18:09:59 +00:00
pcre2_string_utils.c Make bcopy() emulation of memmove() work properly. 2018-08-10 16:27:44 +00:00
pcre2_study.c File tidies for 10.35-RC1 release candidate. 2020-04-15 16:34:36 +00:00
pcre2_substitute.c Unicode upper/lower casing is now used when UCP is set, even if UTF is not set. 2020-02-23 16:40:05 +00:00
pcre2_substring.c Avoid pointer overflow for unset captures in pcre2_substring_list_get(), though 2018-01-12 18:48:27 +00:00
pcre2_tables.c Update to Unicode 14.0.0 (#29) 2021-10-29 14:44:17 +01:00
pcre2_ucd.c Update to Unicode 14.0.0 (#29) 2021-10-29 14:44:17 +01:00
pcre2_ucp.h Update to Unicode 14.0.0 (#29) 2021-10-29 14:44:17 +01:00
pcre2_valid_utf.c Fix bug in UTF-16 checker returning wrong offset for missing low surrogate. 2020-02-24 15:39:56 +00:00
pcre2_xclass.c Change a number of expressions like 1<<10 to 1u<<10. 2019-04-12 14:40:27 +00:00
pcre2demo.c Doc file tidies for 10.38-RC1 2021-08-31 17:14:42 +01:00
pcre2grep.c pcre2grep: correctly handle multiple passes (#35) 2021-11-09 16:57:48 +00:00
pcre2posix.c Doc file tidies for 10.38-RC1 2021-08-31 17:14:42 +01:00
pcre2posix.h More file tidies for 10.33-RC1 2019-03-04 18:07:04 +00:00
pcre2test.c improve on 'auto' mode for DISABLE_PERCENT_ZT (#28) 2021-10-29 14:29:47 +01:00