summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* maint: run "make update-copyright"Paul Eggert2021-01-01119-119/+119
|
* build: update gnulib submodule to latestPaul Eggert2021-01-011-0/+0
|
* build: update gnulib to latestJim Meyering2020-12-301-0/+0
| | | | | * gnulib: update for clang-10 warning warning-avoidance fixes in hash and regex-tests.
* maint: add parentheses to avoid new clang-10 warningJim Meyering2020-12-301-1/+1
| | | | | * src/dfasearch.c (regex_compile): Parenthesize arith-OR vs ternary, to placate clang-10.
* doc: clarify special chars and }Paul Eggert2020-12-291-16/+21
| | | | | | | | | | * 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: fix missing right curly braceMarek Suppa2020-12-291-3/+3
| | | | | | * 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.
* build: update gnulib to latestJim Meyering2020-12-251-0/+0
|
* grep: use of --unix-byte-offsets (-u) now elicits a warningJim Meyering2020-12-253-16/+7
| | | | | | | * 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: adjust man page syntaxHelge Kreutzmann2020-12-231-5/+5
| | | | | | | | * 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
* grep: avoid performance regression with many patternsJim Meyering2020-11-264-2/+64
| | | | | | | | | | * 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.
* build: update gnulib to latest for warning fixesJim Meyering2020-11-262-1/+1
| | | | | | | * 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
* tests: enable warnings for the gnulib-tests subdirJim Meyering2020-11-262-0/+17
| | | | | | | * 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.
* maint: post-release administriviaJim Meyering2020-11-083-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.6v3.6Jim Meyering2020-11-081-1/+1
| | | | * NEWS: Record release date.
* build: update gnulib to latest for test improvementsJim Meyering2020-11-051-0/+0
|
* build: update gnulib to latest for C++-ready dfa.h and test-verify.c fixJim Meyering2020-11-031-0/+0
|
* grep: remove GREP_OPTIONSPaul Eggert2020-11-036-98/+22
| | | | | | | | | | | | * 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.
* grep: use RE_NO_SUB when calling regex solely to check syntaxNorihiro Tanaka2020-11-011-4/+12
| | | | | | | * 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: add the test for bugfix in gnulib's dfaNorihiro Tanaka2020-11-011-0/+2
| | | | * tests/ere.tests: Add new test.
* grep: avoid erroneous matches for e.g., a+a+a+Jim Meyering2020-11-012-0/+5
| | | | | * gnulib: Update to latest, for dfa's invalid-merge fix. * NEWS (Bug fixes): Mention this.
* grep: -P: report input filename upon PCRE execution failureJim Meyering2020-10-115-8/+32
| | | | | | | | | | | | 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.
* grep: minor kwset cleanupsPaul Eggert2020-10-113-36/+20
| | | | | | | | | * 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.
* grep: remove unused codeNorihiro Tanaka2020-10-111-47/+0
| | | | | * src/kwsearch.c (Fcompile, Fexecute): Remove unused code. No longer these are used after commit 016e590a8198009bce0e1078f6d4c7e037e2df3c.
* build: update gnulib submodule to latestPaul Eggert2020-10-051-0/+0
|
* tests: correct filename-lineno.plJim Meyering2020-10-051-1/+1
| | | | | * tests/filename-lineno.pl: Remove a stray envvar that somehow slipped into expected output string.
* tests: fix tests when PCRE is not usedPaul Eggert2020-10-052-9/+10
| | | | | | | | | * 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.
* build: update gnulib submodule to latestPaul Eggert2020-10-051-0/+0
|
* doc: document --include/--exclude betterPaul Eggert2020-10-032-0/+15
| | | | | | | | 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:
* maint: add technically-required quotesJim Meyering2020-10-011-3/+3
| | | | | * configure.ac: Quote args of AC_CONFIG_AUX_DIR, AC_CONFIG_SRCDIR and AC_CHECK_FUNCS_ONCE.
* tests: restore deleted -P testsJim Meyering2020-09-282-0/+18
| | | | | | | | | | | 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.
* maint: post-release administriviaJim Meyering2020-09-273-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.5v3.5Jim Meyering2020-09-271-1/+1
| | | | * NEWS: Record release date.
* maint: avoid autoconf warningsJim Meyering2020-09-272-2/+1
| | | | | * 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.
* build: update gnulib to latestJim Meyering2020-09-271-0/+0
|
* build: update gnulib to latestJim Meyering2020-09-261-0/+0
|
* tests: skip stack-overflow test when built with ASANJim Meyering2020-09-261-0/+9
| | | | | * tests/stack-overflow: Skip this test when the binary was built with ASAN, to avoid spurious failures.
* build: update gnulib submodule to latestPaul Eggert2020-09-251-0/+0
|
* build: update gnulib submodule to latestPaul Eggert2020-09-251-0/+0
|
* tests: fix surrogate-pair test to work on 16-bit wchar_t systemsJim Meyering2020-09-241-5/+19
| | | | | | | | * 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.
* grep: don't assume PCRE in testsPaul Eggert2020-09-231-6/+0
| | | | | | | * 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.
* grep: pacify Sun C 5.15Paul Eggert2020-09-231-1/+1
| | | | | | | 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.
* grep: fix more Turkish-eyes bugsPaul Eggert2020-09-234-57/+102
| | | | | | | | | | | | | | | | | 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.
* build: update gnulib submodule to latestPaul Eggert2020-09-232-0/+6
| | | | * NEWS: Mention Bug#43577, which this fixes.
* grep: fix recently-introduced performance glitchPaul Eggert2020-09-231-1/+0
| | | | | | * 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: improve --line-buffer docPaul Eggert2020-09-221-2/+5
| | | | | | * 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).
* tests: port timeout test to AlpinePaul Eggert2020-09-221-0/+2
| | | | | | | | 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: test for many-regexp N^2 RSS regressionJim Meyering2020-09-223-0/+88
| | | | | | | * tests/many-regex-performance: New test for this performance regression. * tests/Makefile.am: Add it. * NEWS (Bug fixes): Describe it.
* grep: avoid unnecessary regex compilationNorihiro Tanaka2020-09-225-23/+28
| | | | | | | | | | | | | | | | | | | 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.
* build: update gnulib to latestJim Meyering2020-09-221-0/+0
|
* tests: skip stack-overflow test on midnightbsd*Jim Meyering2020-09-222-0/+6
| | | | | | * 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.