| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
| |
* gnulib: update for clang-10 warning warning-avoidance
fixes in hash and regex-tests.
|
|
|
|
|
| |
* src/dfasearch.c (regex_compile): Parenthesize arith-OR vs
ternary, to placate clang-10.
|
|
|
|
|
|
|
|
|
|
| |
* doc/grep.texi (Fundamental Structure)
(Character Classes and Bracket Expressions)
(The Backslash Character and Special Expressions, Anchoring)
(Basic vs Extended): Clarify which characters are special,
and why \ is needed before } in grep even though } is not special.
Use Posix terminology for ordinary and special characters and for
interval expressions.
|
|
|
|
|
|
| |
* doc/grep.texi (Basic vs Extended Regular Expressions): Mention that
the right curly brace (}) meta-character must be backslash-escaped.
It had been omitted from the list.
|
| |
|
|
|
|
|
|
|
| |
* NEWS (Change in behavior): Mention this.
* src/grep.c (main): Warn about each use of obsolete
--unix-byte-offsets (-u).
* doc/grep.in.1 (-u): Remove its documentation.
|
|
|
|
|
|
|
|
| |
* doc/grep.in.1: Mark some manual names with B<...>.
Mark PATTERNS with I<...>.
Drop final period in SEE ALSO.
With suggestions from of several members of the manpage-l10n
translation community. This resolves https://bugs.gnu.org/45353
|
|
|
|
|
|
|
|
|
|
| |
* src/grep.c (hash_pattern): Switch from PJW to DJB2, to avoid an
O(N) to O(N^2) performance regression due to hash collisions with
patterns from e.g., seq 500000|tr 0-9 A-J
Reported by Frank Heckenbach in https://bugs.gnu.org/44754
* NEWS (Bug fixes): Mention it.
* tests/hash-collision-perf: New file.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
| |
* gnulib: Update submodule to latest.
* src/grep.c (printf_errno): Reflect gnulib's renaming: change
_GL_ATTRIBUTE_FORMAT_PRINTF to
_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
|
|
|
|
|
|
|
| |
* gnulib-tests/Makefile.am (AM_CFLAGS): Enable gnulib
warning options for these tests.
* configure.ac (GNULIB_TEST_WARN_CFLAGS): Disable the same three
warning options that coreutils does, and a few more for GCC11.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* NEWS: Mention this.
* doc/grep.in.1:
Remove GREP_OPTIONS documentation.
* doc/grep.texi (Environment Variables):
Move GREP_OPTIONS stuff into a “no longer implemented” paragraph.
* src/grep.c (prepend_args, prepend_default_options): Remove.
(main): Do not look at GREP_OPTIONS.
* tests/Makefile.am (TESTS_ENVIRONMENTS):
* tests/init.cfg (vars_): Remove GREP_OPTIONS.
|
|
|
|
|
|
|
| |
* src/dfasearch.c (regex_compile): New parameter. All callers changed.
(GEAcompile): Move setting syntax for regex into regex_compile()
function. This addresses a performance problem exposed by extreme
regular expressions, as described in https://bugs.gnu.org/43862 .
|
|
|
|
| |
* tests/ere.tests: Add new test.
|
|
|
|
|
| |
* gnulib: Update to latest, for dfa's invalid-merge fix.
* NEWS (Bug fixes): Mention this.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this, it could be tedious to determine which input
file evokes a PCRE-execution-time failure.
* src/pcresearch.c (Pexecute): When failing, include the
error-provoking file name in the diagnostic.
* src/grep.c (input_filename): Make extern, since used above.
* src/search.h (input_filename): Declare.
* tests/filename-lineno.pl: Test for this.
($no_pcre): Factor out.
* NEWS (Bug fixes): Mention this.
|
|
|
|
|
|
|
|
|
| |
* src/kwsearch.c (Fexecute):
Assume C99 to put declarations nearer uses.
* src/kwset.c (bmexec): Omit unnecessary test.
* src/kwset.h (struct kwsmatch): Make OFFSET and SIZE individual
elements, not arrays of size 1 (a revenant of an earlier API).
All uses changed.
|
|
|
|
|
| |
* src/kwsearch.c (Fcompile, Fexecute): Remove unused code. No longer these
are used after commit 016e590a8198009bce0e1078f6d4c7e037e2df3c.
|
| |
|
|
|
|
|
| |
* tests/filename-lineno.pl: Remove a stray envvar
that somehow slipped into expected output string.
|
|
|
|
|
|
|
|
|
| |
* tests/Makefile.am (TESTS_ENVIRONMENT):
Set PATH before setting PCRE_WORKS, so that the latter test
uses the just-built grep.
* tests/filename-lineno.pl (invalid-re-P-paren)
(invalid-re-P-star-paren): Adjust non-PCRE case to match
recently-changed behavior.
|
| |
|
|
|
|
|
|
|
|
| |
Problem reported by John Ruckstuhl (Bug#43782).
* doc/grep.texi (File and Directory Selection):
Document what happens if contradictory options are given,
or if no option matches a file name.
* doc/grep.in.1:
|
|
|
|
|
| |
* configure.ac: Quote args of AC_CONFIG_AUX_DIR, AC_CONFIG_SRCDIR
and AC_CHECK_FUNCS_ONCE.
|
|
|
|
|
|
|
|
|
|
|
| |
v3.4-almost-45-g8577dda deleted these two -P-using tests because a
grep built without PCRE support would fail those tests. This sets
an envvar with the equivalent of the result from the require_pcre_
function and restores the now-guarded tests. Tested by running this:
./configure --disable-perl-regexp && make check
* tests/Makefile.am (PCRE_WORKS): Set this envvar.
* tests/filename-lineno.pl: Restore invalid-re-P-paren and
invalid-re-P-star-paren, now each with a guard.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
|
|
|
|
| |
* configure.ac (AC_HEADER_STDC): Remove. It's been assumed for ages.
* m4/pcre.m4 (gl_FUNC_PCRE): Use AS_HELP_STRING, not AC_HELP_STRING.
|
| |
|
| |
|
|
|
|
|
| |
* tests/stack-overflow: Skip this test when the binary was built
with ASAN, to avoid spurious failures.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* tests/surrogate-pair: Avoid new failure on systems with
16-bit wchar_t. Detect the condition and exit before the
otherwise-failing tests. Remove the now-incorrect in-loop
test for that alternate failure mode. This was exposed by
testing on gcc119.fsffrance.org, a power8 AIX 7.2 system.
|
|
|
|
|
|
|
| |
* tests/filename-lineno.pl: Remove invalid-re-P-paren and
invalid-re-P-star-paren as they assume PCRE support, which
causes a false alarm "grep: Perl matching not supported in a
--disable-perl-regexp build" on platforms without PCRE.
|
|
|
|
|
|
|
| |
This suppresses a false alarm '"grep.c", line 720: warning:
initializer will be sign-extended: -1'.
* src/grep.c (uword_max): New static constant.
(initialize_unibyte_mask): Use it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix more bugs recently uncovered by Norihiro Tanaka (Bug#43577).
* NEWS: Mention new bug report.
* src/grep.c (ok_fold): New static var.
(setup_ok_fold): New function.
(fgrep_icase_charlen): Reject single-byte characters
if they match some multibyte characters when ignoring case.
This part of the patch is partly derived from
<https://bugs.gnu.org/43577#14>, which means it is:
Co-authored-by: Norihiro Tanaka <noritnk@kcn.ne.jp>
(main): Call setup_ok_fold if ok_fold might be needed.
* src/searchutils.c (kwsinit): With the grep.c changes,
this code can now revert to classic 7th Edition Unix style;
aborting would be wrong.
* tests/turkish-eyes: Add tests for these bugs.
|
|
|
|
| |
* NEWS: Mention Bug#43577, which this fixes.
|
|
|
|
|
|
| |
* src/grep.c (main): Do not double-increment update_patterns.
update_patterns increments n_patterns now; do not increment it
again, as the incorrect count would hurt performance heuristics later.
|
|
|
|
|
|
| |
* doc/grep.texi (Other Options): Document --line-buffered more
carefully, and say what happens when it is not used. Problem
reported by Dan Jacobson (Bug#35339).
|
|
|
|
|
|
|
|
| |
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/grep-devel/2020-09/msg00080.html
* tests/init.cfg (require_timeout_): Check that ‘timeout 0.01
sleep 0.02’ works as expected, to avoid spurious test failure
on Alpine.
|
|
|
|
|
|
|
| |
* tests/many-regex-performance: New test for this performance
regression.
* tests/Makefile.am: Add it.
* NEWS (Bug fixes): Describe it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Grep resorts to using the regex engine when the precision of either
-o or --color is required, or when the pattern is not supported by
our DFA engine (e.g., backref). Otherwise, grep would perform regex
compilation solely to check the syntax. This change makes grep skip
that compilation in the common case for which it is unnecessary.
The compilation we are avoiding is quite costly, consuming O(N^2)
RSS for N regular expressions.
* src/dfasearch.c (GEAcompile): Add new argument, and avoid unneeded
compilation of regex.
* src/grep.c (compile_fp_t): Update prototype.
(main): Update caller.
* src/kwsearch.c (Fcompile): Update caller and add new argument.
* src/pcresearch.c (Pcompile): Add new argument.
* src/search.h (GEAcompile, Fcompile, Pcompile): Update prototype.
|
| |
|
|
|
|
|
|
| |
* tests/stack-overflow: skip_ when run on this OS. See details
in https://lists.gnu.org/r/grep-devel/2020-09/msg00062.html
* tests/Makefile.am (host_triplet): Export.
|