17 Commits

Author SHA1 Message Date
Jim Meyering
c635f7dd92 maint: update copyright dates 2026-01-02 16:42:12 -08:00
Paul Eggert
b1eaccd96d maint: update all copyright dates via "make update-copyright" 2025-01-01 19:15:26 -08:00
Jim Meyering
e248db797a maint: update all copyright dates via "make update-copyright" 2024-01-05 09:19:41 -08:00
Paul Eggert
b63a992346 tests: fix test -eq problem
Do not use ‘test "" -eq 1’ when get-mb-cur-max fails,
as Bash complains about this.  Problem found on AIX.
2023-01-15 16:38:56 -08:00
Jim Meyering
45e1158a4b maint: update copyright dates 2023-01-01 20:36:23 -08:00
Jim Meyering
f9290127f3 maint: make update-copyright 2022-01-01 10:29:09 -08:00
Paul Eggert
e84a2ea9d2 maint: run "make update-copyright" 2021-01-01 19:00:09 -08:00
Jim Meyering
5909bc45ad maint: update all copyright year number ranges
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* doc/grep.in.1: Use "-" in copyright year ranges, not \en.
2020-01-01 09:12:07 -08:00
Jim Meyering
1019e6e35a maint: update all copyright dates via "make update-copyright"
* gnulib: Also update submodule for its copyright updates.
2019-01-01 19:00:38 -08:00
Paul Eggert
7a89c66674 maint: update URLs
Mostly this is just changing http: to https:.
In one or two places it removes no-longer-useful URLs.
2018-04-21 13:47:28 -07:00
Jim Meyering
e8feb1ce5c maint: update gnulib and copyright dates for 2018
* gnulib: Update to latest.
* all files: Run "make update-copyright".
* bootstrap: Update from gnulib.
2018-01-06 16:14:06 -08:00
Jim Meyering
3cd2e8625a maint: update gnulib and copyright dates for 2017
* gnulib: Update to latest.
* all files: Run "make update-copyright".
2017-01-01 03:34:33 -08:00
Jim Meyering
c65dcd72d1 maint: update copyright year, bootstrap, init.sh
Run "make update-copyright" and then...

* gnulib: Update to latest.
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
2016-01-01 14:34:20 -08:00
Jim Meyering
d433dad3f4 maint: update copyright year ranges to include 2015
Run "make update-copyright".  Also, ...
* grep.texi: Update manually, converting each "--" to "-".
2015-01-01 18:55:33 -08:00
Paul Eggert
370c37425c fgrep: fix case-fold incompatibility with plain 'grep'
fgrep converted to lowercase, whereas the regex code converted
to uppercase.  The resulting behaviors don't agree in offbeat
cases like Greek sigmas and Turkish Is.  Fix this by changing
fgrep to agree with the regex code.
* src/kwsearch.c (Fcompile, Fexecute):
* src/searchutils.c (kwsinit, mbtoupper):
Convert to uppercase, not to lowercase, for compatibility with
plain 'grep'.
* src/search.h, src/searchutils.c (mbtoupper):
Rename from mbtolower, since it now converts to uppercase.
All uses changed.
* tests/case-fold-titlecase: Add tests for this.
2014-03-07 19:41:00 -08:00
Paul Eggert
4f88962189 grep: fix case-fold mismatches between DFA and regex
The DFA code and the regex code didn't use the same semantics for
case-folding.  The regex code says that the data char d matches
the pattern char p if uc (d) == uc (p).  POSIX is unclear in this
area; the simplest fix for now is to change the DFA code to agree
with the regex code.  See <http://bugs.gnu.org/16919>.
* src/dfa.c (static_assert): New macro, if not already defined.
(setbit_case_fold_c): Assume MB_CUR_MAX is 1 and that case_fold
is nonzero; all callers changed.
(setbit_case_fold_c, parse_bracket_exp, lex, atom):
Case-fold like the regex code does.
(lonesome_lower): New constant.
(case_folded_counterparts): New function.
(parse_bracket_exp): Prefer plain setbit when case-folding is
not needed.
* src/dfa.h (CASE_FOLDED_BUFSIZE): New constant.
(case_folded_counterparts): New function decl.
* src/main.c (trivial_case_ignore): Case-fold like the regex code does.
(main): Try to improve comment re trivial_case_ignore.
* tests/case-fold-titlecase: Add lots more test cases.
2014-03-07 18:27:44 -08:00
Paul Eggert
c50283a3a8 grep: fix bugs with -i and titlecase
* NEWS: Document this.
* src/dfa.c (setbit_wc): Simplify.
(setbit_c): Remove; no longer used.
(setbit_case_fold_c, parse_bracket_exp, atom):
Don't mishandle titlecase.  For 'atom', this removes the need for
the refactoring of Bug#16729.
(lex): Use the slower approach only for letters that have a
differing case.
* tests/case-fold-titlecase: New file.
* tests/Makefile.am (TESTS): Add it.
2014-02-28 22:47:43 -08:00