| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Problem reported by Anthony Sottile (Bug#28105).
* NEWS, doc/grep.texi (Exit Status), src/grep.c (usage): Document this.
* src/grep.c (grepdesc): Implement it.
* tests/skip-read: Test it.
|
|
|
|
|
| |
* doc/grep.texi (Matching Control):
Give example of why -w differs from \<...\> (Bug#27813).
|
|
|
|
|
|
| |
Problem reported by Bjarni I. Gislason via Santiago R.R. (Bug#27651).
* doc/grep.in.1 (dT): New macro.
(Dt): Define this string.
|
|
|
|
| |
* doc/grep.texi (File and Directory Selection): Fix typo: s/afer/after/
|
|
|
|
|
|
|
|
| |
Use wording that is less likely to make readers think that
support for -P may be removed.
* doc/grep.in.1: s/highly experimental/experimental/
* doc/grep.texi: Likewise.
Suggested by Evan Sheahan.
|
|
|
|
| |
* doc/grep.texi (Performance): s/suprisingly/surprisingly/
|
|
|
|
|
|
|
|
|
| |
Problem reported by Markus Jochim (Bug#26254).
* NEWS, doc/grep.texi (General Output Control): Document this.
* src/grep.c (prpending): Selected lines no longer cut off context.
(usage): Say "selected" instead of "matching", where appropriate.
* tests/foad1, tests/max-count-vs-context, tests/yesno:
Adjust to match new behavior.
|
|
|
|
| |
* doc/grep.texi (Performance): New section.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by a suggestion by Eric Blake (Bug#25707#17).
* bootstrap.conf (gnulib_modules): Add xbinary-io,
and remove binary-io and xfreopen.
* doc/grep.texi (Other Options):
Fix typo and reword to be a bit more general.
* src/grep.c: Include xbinary-io.h instead of xfreopen.h.
(grepfile): Open with O_BINARY if binary.
(grepdesc): No need for set_binary_mode now.
(grep_command_line_arg, main): Set stdin to binary mode if binary.
(main): Avoid unnecessary test of stdin == NULL.
Use xsetmode instead of xfreopen.
* src/system.h: Do not include binary-io.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suggested by Eric Blake (Bug#25707#11).
* NEWS, doc/grep.texi: Document this.
* src/dosbuf.c: Remove.
* bootstrap.conf (gnulib_modules): Add xfreopen.
* src/grep.c: Include xfreopen.h, not dosbuf.c.
(fillbuf, print_line_head): Do not undossify input.
(binary): New static var.
(grepdesc): Apply BINARY to input file.
(usage): Remove -u help.
(main): Set BINARY if -U, and apply it to stdout. Do nothing if -u.
With -f, apply BINARY to input file.
|
|
|
|
|
|
|
| |
* TODO: Bring up-to-date and fix formatting glitches.
* doc/grep.in.1, doc/grep.texi: Fix minor glitches.
The above patches should address the same problems that recent
Debian doc patches address, albeit in a different way.
|
|
|
|
|
|
|
| |
* doc/grep.in.1:
* src/grep.c (usage): Clarify default input when -r.
* src/grep.c (usage): Do not bother documenting egrep and fgrep;
the manual is enough.
|
|
|
|
|
| |
* gnulib: Update to latest.
* all files: Run "make update-copyright".
|
|
|
|
| |
* doc/grep.texi (--perl-regexp): s/the\nthe/the/
|
|
|
|
|
|
|
|
|
| |
* NEWS, doc/grep.texi (Output Line Prefix Control):
Document this (Bug#24451).
* src/grep.c (offset_width): New static var.
(print_offset): Use it instead of arg. All callers changed.
(grep): Set it.
* tests/initial-tab: Test this.
|
|
|
|
| |
* doc/grep.texi (General Output Control, Usage): Tweak (Bug#24961).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Stephane Chazelas (Bug#22655).
* NEWS: Document this.
* doc/grep.texi (grep Programs): Warn about -Pz.
* src/pcresearch.c (reflags): New static var.
(multibyte_locale): Remove static var; now local to Pcompile.
(Pcompile): Check for (? and (* too. Set reflags instead of
dying when problematic operators are found.
(Pexecute): Use reflags to decide whether searches should
be multiline.
* tests/pcre: Test new behavior.
|
|
|
|
|
|
|
|
| |
From a suggestion by Marcello Perathoner (Bug#22838).
* NEWS, doc/grep.texi (File and Directory Selection): Document this.
* src/grep.c (print_line_head): Do not suppress later output lines
merely because an earlier output line would have had an encoding error.
* tests/encoding-error: Test for the new behavior.
|
|
|
|
|
| |
Reported by Igor Bogomazov via Santiago Ruano Rincón (Bug#24024).
* doc/grep.texi (Context Line Control): Define "context lines".
|
|
|
|
|
| |
Problem reported by Björn Voigt in: http://bugs.gnu.org/23763#27
* doc/grep.in.1: Fix more inconsistencies with grep.texi.
|
|
|
|
|
| |
* doc/grep.in.1: Remove obsolete discussion of MS-DOS heuristics.
Problem reported by Björn Voigt in: http://bugs.gnu.org/23763
|
|
|
|
|
|
|
|
| |
Problem reported by Santiago Ruano Rincón in: http://bugs.gnu.org/22911
* doc/grep.in.1:
* doc/grep.texi (Matching Control, grep Programs)
(Regular Expressions):
Document -e, -f, and PCRE more carefully.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works around glibc bug 19932:
https://sourceware.org/bugzilla/show_bug.cgi?id=19932
The actual bug fix was the update to the current version of Gnulib.
grep problem reported by Björn Jacke in: http://bugs.gnu.org/23234
* NEWS: Mention this.
* doc/grep.texi (File and Directory Selection): Crossref to LC_*
section. Suggest why -a or LC_ALL=C might be useful.
(Environment Variables): Mention 'locale -a'.
Say that LC_CTYPE also specifies encoding, and that every
byte is a valid character in the C or POSIX locale.
* tests/c-locale: New test.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
| |
Problem reported by Shlomi Fish
* doc/grep.texi (File and Directory Selection):
Document that 'q$' might match 'q' followed by a NUL
if --binary-files=binary is in effect.
|
|
|
|
|
|
|
|
|
| |
* NEWS: Document this.
* doc/grep.texi (Other Options): Clarify that -z affects output
as well as input data.
* src/grep.c (print_line_middle): Output eolbyte, not newline, if -o.
* tests/null-byte: Test -o too.
* tests/pcre-context: Adjust test to match new behavior.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* NEWS, doc/grep.texi (Matching Control): Mention this.
* src/dfasearch.c (EGexecute):
* src/pcresearch.c (Pcompile):
Don't get confused by -w if -x is also present.
* src/pcresearch.c (Pcompile): Remove misleading comment about
non-UTF-8 multibyte locales, as PCRE doesn't support them.
Calculate buffer sizes more carefully; the old method
allocated a buffer slightly too big, seemingly due to luck.
* tests/backref-word, tests/pcre: Add tests for this bug.
|
|
|
|
|
|
|
|
| |
Run "make update-copyright" and then...
* gnulib: Update to latest.
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
|
|
|
|
|
|
|
|
| |
* NEWS:
* doc/grep.texi (File and Directory Selection):
Make it clearer that grep can now output matching text before
reporting a binary match. Problem reported by Norihiro Tanaka in:
http://bugs.gnu.org/20526#83
|
|
|
|
|
|
| |
* doc/grep.in.1, doc/grep.texi: Minor clarifications suggested by
Debian documentation patches. Problem reported by Santiago Ruano
Rincón in: http://bugs.gnu.org/18651
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a longstanding problem introduced in grep 2.21,
which is overly picky about binary files.
* NEWS:
* doc/grep.texi (File and Directory Selection): Document this.
* src/grep.c (input_textbin, textbin_is_binary, buffer_textbin)
(file_textbin):
Remove. All uses removed.
(encoding_error_output): New static var.
(buf_has_encoding_errors, buf_has_nulls, file_must_have_nulls):
New functions, which reuse bits
and pieces of the removed functions.
(lastout, print_line_head, print_line_middle, print_line_tail, prline)
(prpending, prtext, grepbuf):
Avoid use of const, now that we have
functions that require modifying a sentinel.
(print_line_head): New arg LEN. All uses changed.
(print_line_head, print_line_tail):
Return indicator whether the output line was printed.
All uses changed.
(print_line_middle): Exit early on encoding error.
(grep): Use new method for determining whether file is binary.
* src/grep.h (enum textbin, TEXTBIN_BINARY, TEXTBIN_UNKNOWN)
(TEXTBIN_TEXT, input_textbin): Remove decls. All uses removed.
* src/pcresearch.c (Pexecute): Remove multiline optimization,
since the main program no longer checks for encoding errors on input.
* tests/encoding-error: New file.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Vincent Lefevre in:
http://bugs.gnu.org/22144
* NEWS:
* doc/grep.texi (File and Directory Selection): Document this.
* src/grep.c (excluded_patterns, excluded_directory_patterns):
Now 2-element arrays, with one element for subfiles and another
for command-line args. All uses changed. This implements the change.
(exclude_options): New function.
* tests/include-exclude: Test the change.
|
|
|
|
| |
* doc/.gitignore: Add '/gendocs_template_min'.
|
|
|
|
|
|
| |
* doc/grep.texi (Environment Variables): Give an example of a
wrapper script, as an alternative to using GREP_OPTIONS.
Fixes: bug#19998
|
|
|
|
|
|
|
| |
* doc/grep.in.1, doc/grep.texi (File and Directory Selection):
Give an example of how non-text bytes affect pattern matching in
binary files.
Fixes: bug#20080
|
|
|
|
|
| |
Run "make update-copyright". Also, ...
* grep.texi: Update manually, converting each "--" to "-".
|
|
|
|
|
|
|
| |
Problem reported by Martin Hoch in: http://bugs.gnu.org/19388
* doc/grep.texi (File and Directory Selection):
Document what non-text bytes are.
(Usage): Fix cross reference.
|
|
|
|
|
|
|
| |
* doc/grep.texi (--recursive, -r): Mention the new behavior
of recursively searching "." when there is no FILE argument.
* doc/grep.in.1: Likewise.
That change first appeared in grep-2.11, released on 2012-03-02.
|
|
|
|
|
|
|
|
|
| |
* doc/Makefile.am (grep.1): Use mv -f to move temporary to target,
in case the target is read-only. Also, always make the generated
files read-only.
(egrep.1 fgrep.1): Likewise.
This avoids a build failure reported by Eric Blake in
http://lists.gnu.org/archive/html/bug-grep/2014-10/msg00112.html
|
|
|
|
|
|
|
|
| |
* doc/grep.in.1 (Tx, Id): Remove. All uses removed.
(MTO, URL): New macros, used for email and URL.
Use them when appropriate.
In main text, omit chatty discussions of other implementations;
the full manual suffices for this sort of thing.
|
|
|
|
|
|
| |
Reported by Santiago Ruano Rincón in: http://bugs.gnu.org/18651
* doc/grep.in.1 (EXIT STATUS):
* doc/grep.texi (Exit Status): Clarify.
|
|
|
|
|
|
|
|
| |
* NEWS, doc/grep.texi (File and Directory Selection):
Document this change.
* src/grep.c (zap_nuls): New function.
(grep): Use it.
* tests/null-byte: Relax to allow new behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* NEWS:
* doc/grep.texi (File and Directory Selection):
Document this.
* src/grep.c (buffer_encoding, buffer_textbin): New functions.
(file_textbin): Rename from file_is_binary. Now returns 3-way value.
All callers changed.
(file_textbin, grep): Check the input more carefully for text vs
binary data.
(contains_encoding_error): Remove; use replaced by buffer_encoding.
* tests/backref-multibyte-slow:
* tests/high-bit-range:
* tests/invalid-multibyte-infloop:
Use -a, since the input is now considered to be binary.
* tests/invalid-multibyte-infloop: Add a check for new behavior.
|
|
|
|
|
|
|
|
|
| |
* NEWS:
* doc/grep.in.1 (ENVIRONMENT_VARIABLES):
* doc/grep.texi (Environment Variables):
Document that GREP_OPTIONS is obsolescent now.
* src/grep.c (main): Warn if GREP_OPTIONS is used.
* tests/r-dot, tests/skip-device: Don't use GREP_OPTIONS.
|
|
|
|
|
|
| |
* README (KNOWN BUGS):
* doc/grep.in.1:
* doc/grep.texi (Reporting Bugs): Document this.
|
|
|
|
|
| |
Reported by Benno Schulenberg in: http://bugs.gnu.org/18185
* doc/grep.texi (Environment Variables): Document LANGUAGE.
|
|
|
|
|
| |
Reported by Benno Schulenberg in: http://bugs.gnu.org/18184
* doc/grep.texi: Avoid @code in favor of @env, or of nothing at all.
|
|
|
|
|
|
|
| |
Problem reported by Hugues Andreux in: http://bugs.gnu.org/17763
* doc/grep.texi (File and Directory Selection): Be more careful
about documenting the interaction between recursive searching,
--include, --exclude, and --exclude-dir.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* cfg.mk (sc_long_lines): New rule, from coreutils; exempt tests/*
* src/grep.c (usage): Tweak -F wording to shorten a line.
Correct grammar in a comment.
Split the --exclude-file=... description to fit within 80 columns.
Use emit_bug_reporting_address, eliminating another long line.
* src/dfa.c: Split long lines. No semantic change.
* doc/grep.texi: Likewise.
* tests/include-exclude: Split a long line.
* tests/backref: Split long lines.
* tests/empty: Likewise.
* tests/fmbtest: Likewise.
|
|
|
|
|
|
|
|
| |
Problem reported by Nathan Weeks in: http://bugs.gnu.org/17856
* src/grep.c (Ecompile): Also specify RE_UNMATCHED_RIGHT_PAREN_ORD.
* doc/grep.texi (Fundamental Structure), NEWS: Document this.
* tests/ere.tests: Add a couple of tests for this.
* tests/spencer1.tests: Fix exit status.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This led to problems, such as the prompt "mv: try to overwrite
'egrep', overriding mode 0555 (r-xr-xr-x)? " during a build.
It can be worked around, but the cure is worse than the disease;
making output files read-only is more trouble than it's worth.
* doc/Makefile.am (grep.1, egrep.1, fgrep.1):
* lib/Makefile.am (colorize.c):
* src/Makefile.am (egrep fgrep):
Don't make output files read-only. Prefer separate commands to
'&&' when either will do.
|