| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* m4/pcre.m4: Also check for <pcre/pcre.h>.
* src/pcresearch.c: Include <pcre/pcre.h>, if needed.
Guard inclusions with HAVE_PCRE_H and HAVE_PCRE_PCRE_H, not HAVE_LIBPCRE.
* NEWS (Bug fixes): Mention it.
Dmitry V. Levin reported that PCRE support was not detected
on systems with <pcre.h> not in the default include path.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
|
|
|
|
|
| |
* lib/savedir.c (isdir): Avoid shadowing a declaration.
* src/main.c (get_nondigit_option): Cast away const to avoid
compiler warning.
|
|
|
|
| |
* .gitignore: Enhance.
|
|
|
|
|
| |
* NEWS: Consolidate the two --include/exclude-related entries.
Suggested by Eric Blake.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/backref.sh: Use `...' instead of ``...'' in comments.
* tests/bre.awk: Use $(...) instead of `...`.
* tests/ere.awk: Use $(...) instead of `...`.
* tests/euc-mb: Use $(...) instead of `...`.
* tests/fmbtest: Use $(...) instead of `...`.
* tests/foad1: Use $(...) instead of `...`.
* tests/pcre-z: Use $(...) instead of `...`. Quote output of grep.
* tests/spencer1-locale.awk: Use $(...) instead of `...`.
* tests/spencer1.awk: Use $(...) instead of `...`.
* tests/yesno.sh: Use $(...) instead of `...`.
|
|
|
|
|
|
|
|
|
| |
* doc/Makefile.am (egrep.1 fgrep.1): Generate robustly, i.e.,
do not redirect directly to $@.
Use $(AM_V_GEN).
Do not distribute intermediate files like fgrep.man and egrep.man.
Likewise, do not use them to generate their %.1 images.
Instead, generate the .1 files directly.
|
|
|
|
|
|
|
|
| |
* tests/Makefile.am (check_PROGRAMS): Add get-mb-cur-max.
* tests/get-mb-cur-max.c: New.
* tests/euc-mb: Use it. Fail if the former detection test fails.
* tests/sjis-mb: Use it. Fail if the former detection test fails. Expand
comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attached test will be skipped unless (on a glibc system) you run
something like
mkdir /usr/lib/locale/ja_JP.SHIFT_JIS
zcat /usr/share/i18n/charmaps/SHIFT_JIS.gz | \
localedef \
-f - \
-i /usr/share/i18n/locales/ja_JP \
/usr/lib/locale/ja_JP.SHIFT_JIS
* tests/Makefile.am: Add sjis-mb.
* tests/sjis-mb: New.
|
|
|
|
|
|
|
|
|
|
|
| |
Commit db9d6 would erroneously skip matches in SJIS character sets. In
this character set low bytes (i.e. ASCII bytes) are also valid second
bytes in a double-byte character, so you have to continue looking for
a match, even if you match in the middle of a double-byte character.
* src/kwsearch.c: Ensure that beg is advanced by at least one byte,
but do not fail immediately after matching in the middle of a double-byte
character.
|
|
|
|
|
| |
* src/Makefile.am (AM_LDFLAGS): Define. Use gnulib's new
$(IGNORE_UNUSED_LIBRARIES_CFLAGS).
|
|
|
|
| |
* cfg.mk (local-checks-to-skip): Add new sc_texinfo_acronym, to skip it.
|
|
|
|
|
| |
* tests/prefix-of-multibyte: New file.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just as Perl prints nothing in this case,
printf '\357\274\241\n' | perl -CIO -lne '/\357/ and print'
grep should also print nothing when used as follows.
However, these would mistakenly match with grep prior to 2.6.2:
printf '\357\274\241\n' | LC_ALL=en_US.UTF-8 src/grep -F $'\357'
printf '\357\274\241\n' | LC_ALL=en_US.UTF-8 src/grep -F $'\357\274'
* src/searchutils.c (is_mb_middle): New parameter: the length of the
match, in bytes, as determined by kwsexec. Use this to detect when
the nominal match found by kwsexec must be skipped because it is for
an incomplete multi-byte character that is a prefix of a character
in the input.
* src/dfasearch.c (EGexecute): Update caller.
* src/kwsearch.c (Fexecute): Likewise.
* src/search.h: Update prototype.
* NEWS (Bug fixes): Mention it.
Report and analysis by Norihiro Tanaka.
|
|
|
|
|
|
| |
* tests/init.cfg (require_timeout_): New function.
* tests/fgrep-infloop: New file. Test for the above fix.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Searching for an incomplete non-prefix of a multi-byte character
should find no match.
Just as these print nothing,
printf '\357\274\241\357\274\241\n' \
| perl -CIO -ne '/\241\357/ and print'
printf '\357\274\241\n' | perl -CIO -ne '/\274\241/ and print'
printf '\357\274\241\n' | perl -CIO -ne '/\241/ and print'
printf '\357\274\241\n' | perl -CIO -ne '/\274/ and print'
These should also print nothing, but with grep-2.6 and grep-2.6.1,
they would infloop:
printf '\357\274\241\n' | LC_ALL=en_US.UTF-8 src/grep -F $'\241'
printf '\357\274\241\n' | LC_ALL=en_US.UTF-8 src/grep -F $'\274'
printf '\357\274\241\n' | LC_ALL=en_US.UTF-8 src/grep -F $'\274\241'
* src/kwsearch.c (Fexecute): Don't infloop when searching for
an incomplete non-prefix part of a multi-byte character.
* NEWS (Bug fixes): Mention it.
Reported and diagnosed by Norihiro Tanaka.
|
|
|
|
|
|
| |
* tests/fmbtest.sh: Rename to ...
* tests/fmbtest: ...this, dropping the .sh suffix.
* tests/Makefile.am (TESTS): Reflect renaming.
|
|
|
|
|
| |
* tests/fmbtest.sh: Use init.sh and adapt accordingly:
Use "grep", not ${GREP}. Use Exit, not exit.
|
|
|
|
| |
* tests/include-exclude: Exercise Javier's fix.
|
|
|
|
|
|
|
| |
The previous fix addressed only the non-glob case.
* src/main.c (main): Use add_exclude's EXCLUDE_WILDCARDS option,
to enable the use of fnmatch with --include=GLOB.
gnulib: Update to latest, for the fixed exclude.c.
|
|
|
|
|
|
|
|
| |
* lib/savedir.c (savedir): Fix logic error. Introduced by commit
bf3bd92c, "build: adapt to the newer exclude API we now get from gnulib"
* tests/include-exclude: Test for this bug by exercising --include, too.
* NEWS (Bug fixes): Mention it.
Reported by Philipp Kohlbecher in http://savannah.gnu.org/bugs/?29358
|
|
|
|
|
|
|
|
|
| |
* src/kwset.c (kwsexec): Correct comments. This function has been
returning an offset, not a pointer, for 9 years.
Do not test for kwsmatch == NULL. All callers pass non-NULL.
(cwexec): Likewise.
* src/kwset.h (kwsexec): Mark the 4th parameter, kwsmatch, as non-NULL.
Include "arg-nonnull.h".
|
|
|
|
|
|
|
| |
* src/Makefile.am (AM_CPPFLAGS): Rename from INCLUDES to avoid
warning from automake -Wall.
Add -I$(top_builddir)/lib, so we find generated .h files like
getopt.h in a non-srcdir build.
|
|
|
|
|
|
| |
* src/Makefile.am (INCLUDES): Remove unnecessary definition of
LOCALEDIR here. Now, it's defined via gnulib's configmake.h.
* src/system.h: Include "configmake.h" for its LOCALEDIR definition.
|
|
|
|
|
|
|
|
| |
* lib/savedir.c (isdir1): Fix fatal typo: deref "dir" argument,
not the global (initially-NULL) "path". Reported by Standish Parsley.
* tests/include-exclude: New file.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
|
|
|
|
|
|
| |
* tests/foad1.sh: Rename to ...
* tests/foad1: ...this, dropping the .sh suffix.
* tests/Makefile.am (TESTS): Reflect renaming.
|
|
|
|
|
|
|
|
|
|
| |
This fixes a spurious test failure when "make check" is run with
certain envvars set, e.g., "make check GREP_COLOR=always"
* tests/foad1.sh: Use init.sh and adapt accordingly:
Use "grep", not ${GREP}. Test VERBOSE against "yes", not "1",
to be consistent with init.sh.
Use Exit, not exit.
Reported by Nelson H. F. Beebe.
|
|
|
|
|
|
| |
* tests/init.cfg (vars_): Unset each envvar that can affect how
grep works. This protects only those tests that have been
converted to use init.sh.
|
|
|
|
| |
* .gitignore: Add more exemptions.
|
|
|
|
|
|
|
| |
* tests/init.cfg: New file. If either $LOCALE_FR or $LOCALE_FR_UTF8
is set to "none", reset it to the empty string.
Reported by Mike Frysinger and Sven Joachim.
* tests/Makefile.am (EXTRA_DIST): Add init.cfg.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac: Do not use PKG_PROG_PKG_CONFIG or PKG_CHECK_MODULES.
Do not modify CPPFLAGS; that belongs to those who invoke make.
Instead, use autoconf's AC_CHECK_HEADERS and AC_SEARCH_LIBS via the
new macro, gl_FUNC_PCRE, defined in...
* m4/pcre.m4 (gl_FUNC_PCRE): New macro, to handle pcre-related
configure-time tests.
* src/Makefile.am (grep_LDADD): Use LIB_PCRE, not PCRE_LIBS.
* src/pcresearch.c: Test HAVE_LIBPCRE via "#if", not "#ifdef".
All other cpp tests of this symbol used "#if".
Prompted by a suggestion from Bruno Haible.
* NEWS (Build-related): Mention this.
|
|
|
|
|
|
|
| |
* NEWS (Bug fixes): Correct character ranges bug description.
Add an example from Dmitry V. Levin.
Add that the word-with-backref bug was introduced in 2.5.1.
* cfg.mk (old_NEWS_hash): Update to match.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
|
|
|
|
| |
* tests/spencer1-locale: Add a space between awk's "-v" option and
the following VAR=value string, to avoid test failure on Mac OS X.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/dfa.c (cur_mb_len): Initialize to 1 and always make it available.
(setbit_case_fold): Do not use wint_t in prototype if !MBS_SUPPORT.
(parse_bracket_exp): Fix compilation with !MBS_SUPPORT.
* src/kwsearch.c (kwsinit): Do not use mbtolower and MB_CUR_MAX
if !MBS_SUPPORT.
* src/searchutils.c (kwsinit): Do not refer to MB_CUR_MAX if !MBS_SUPPORT.
* tests/char-class-multibyte: Skip if UTF-8 matching does not work.
* tests/fmbtest.sh: Likewise.
|
|
|
|
|
|
|
|
| |
* src/grep.c (Gcompile, Ecompile, Acompile): Do not "return X"
from a function returning void, not even when X itself is a
function returning void. This avoids warnings from Sun Studio 11
reported by Dagobert Michelsen.
* src/egrep.c (Ecompile): Likewise.
|
|
|
|
|
|
|
|
| |
* NEWS: Document bugfix.
* src/dfasearch.c (EGexecute): After assess_pattern_match len, is either
invalid or end-beg; jump to success.
* tests/Makefile.am (TESTS): Add new test.
* tests/backref-word: New.
|
|
|
|
|
|
|
|
| |
* src/dfa.c (in_coll_range): Fix ordering for second strcoll. Reported
by Dmitry V. Levin.
* tests/spencer1-locale.awk: Also test single-byte character sets.
* NEWS: Add a note about this bugfix.
* THANKS: Add Dmitry.
|
|
|
|
|
|
| |
* src/searchutils.c (is_mb_middle): When treating an invalid sequence
or a truncated multibyte character as a single byte character, reset
mbstate
|
|
|
|
|
| |
* src/main.c (print_line_middle): Restrict match_icase code
to MB_CUR_MAX == 1. Adjust comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The shell function "framework_failure" was called in the unusual
event that some fundamental test set-up operation would fail.
However it was not defined. Define it, but with a trailing underscore
to impinge less on the test writer's name space. Adjust all uses.
* tests/init.sh (framework_failure_): New function.
* tests/case-fold-backref: s/framework_failure/framework_failure_/
* tests/case-fold-char-class: Likewise.
* tests/case-fold-char-range: Likewise.
* tests/case-fold-char-type: Likewise.
* tests/char-class-multibyte: Likewise.
* tests/dfaexec-multibyte: Likewise.
* tests/max-count-vs-context: Likewise.
* tests/word-multi-file: Likewise.
|
|
|
|
| |
* THANKS: Update Arnold's name and address, per request.
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Use gnulib's lseek wrapper,
for improved portability. lseek does not fail with ESPIPE on
pipes on some systems.
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add wctob.
* NEWS (Portability): Mention this.
Reported by Dagobert Michelsen in <http://sv.gnu.org/bugs/?29325>.
|
|
|
|
| |
* src/main.c: Translate "after_options".
|
|
|
|
| |
* NEWS: Clarify.
|
|
|
|
| |
* tests/char-class-multibyte: Make it pass.
|
|
|
|
| |
* src/dfa.c (setbit_case_fold) [!MBS_SUPPORT]: Fix curly brace mismatch.
|