History log of /freebsd-10.1-release/gnu/usr.bin/grep/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


270776 29-Aug-2014 gjb

MFC r270668, r270669, r270672:

r270668:
Add gnugrep.1 to CLEANFILES.

r270669:
Add host.1 to CLEANFILES.

r270672:
Add svnlite.1 to CLEANFILES.

Sponsored by: The FreeBSD Foundation


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


254093 08-Aug-2013 ache

Part of r245761 makes "grep -D skip" broken for pipes, i.e.
echo xxx | grep -D skip xxx
returns nothing. Instead of just removing added S_ISFIFO condition
(originally absent in this version of grep), make it work as latest
GNU version does: don't skip directories and devices if fd == STDIN_FILENO.


251468 06-Jun-2013 jkim

Adjust CFLAGS to pick up correct regex.h and posix/regex.h. Note this
actually reverts r250860 and r250861.

Reported by: gjb, tinderbox


251438 05-Jun-2013 jkim

Connect libgnuregex 2.17 to the build.


250861 21-May-2013 marcel

Don't look for headers outside of the source or object directories. In
particular, don't use DESTDIR. Such creates an unnecessary dependency
on the build machine.

Obtained from: Juniper Networks, Inc.


250823 20-May-2013 pfg

grep: change some int types.

Change several int variables to size_t, ssize_t, or ptrdiff_t.
This should fix the bug described in CVE-2012-5667 when an input
line is so long that its length cannot be stored in an int
variable.

This is based on NetBSD's revision which says:

This change to NetBSD's version of GNU grep 2.5.1 (licenced under
GPLv2) was made without direct reference to any code licenced
under GPLv3.

Obtained from: NetBSD
MFC after: 3 days


245761 22-Jan-2013 davidxu

Make "-D skip" option work with FIFO by opening file in non-blocking mode.

Reviewed by: jhb
Tested by: delphij


222273 25-May-2011 obrien

Build and install a BSD licensed grep.
If WITH_BSD_GREP is not set, it will be 'bsdgrep' and GNUgrep will be
'[ef]grep'. Otherwise, BSD-grep will be the grep family, and GNUgrep
will be 'gnugrep'.

Discussed with: brooks


187907 30-Jan-2009 obrien

For files not named on the command line, only the basename is compared
to the exclude pattern.
Change this so that "grep --exclude='*/.svn/*' -[Rr] foo *" DWIM.

Obtained from: dave+news001@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Dave Gibson)
Obtained from: comp.unix.questions [Thu, 15 Mar 2007 18:54:38 +0000]
Obtained from: http://unix.derkeiler.com/Newsgroups/comp.unix.questions/2007-03/msg00046.html


163231 11-Oct-2006 trhodes

Add the -P option back, but with a note that it is not supported on FreeBSD.

Requested by: ru


163188 10-Oct-2006 trhodes

grep -P xxx file.txt
"The -P option is not supported"
Removed from the manual page via this commit.

PR: 99831


155829 19-Feb-2006 tjr

Correctly locate the character preceeding the matched string in -w
mode when in non-UTF-8 multibyte locales (e.g. EUC, GB2312, etc.).

PR: 91909


153507 18-Dec-2005 ru

Fix a markup nit.

PR: docs/88848
Prodded by: remko


151647 25-Oct-2005 tjr

Fix 'grep -Fw' for encodings other than UTF-8 (RH bug #161700).

PR: 87969
Obtained from: Fedora (Tim Waugh)


151584 23-Oct-2005 stefanf

Document [:blank:].


151534 21-Oct-2005 jkim

Remove redundant string length check from the previous commit.


151527 20-Oct-2005 jkim

Fix a longstanding buglet in bz-prefixed grep(1).


146820 31-May-2005 tjr

Pass the RE_ICASE flag to re_set_syntax() as appropriate to fix
case-insensitive matching (-i option) in certain multibyte locales.

Obtained from: Fedora


146208 14-May-2005 tjr

Add a note explaining what local modifications have been made to GNU grep,
and giving advice on importing future releases.


146207 14-May-2005 tjr

Fixed -w handling for EGexecute.

Obtained from: Fedora (Tim Waugh)


146206 14-May-2005 tjr

Automatically disable DFA when processing multibyte input. GREP_USE_DFA
environment variable overrides.

Obtained from: Fedora (Tim Waugh)


146205 14-May-2005 tjr

Better multibyte handling in EGexecute() and Fexecute(). Fixed -Fi for
multibyte input (RH bug #143079).

Obtained from: Fedora (Jakub Jelinek, Tim Waugh)


146204 14-May-2005 tjr

Removed redundant (and incorrect) code in prline. Fixes grep -i --color "",
among other things.

PR: 79063
Obtained from: Fedora (Tim Waugh)


146203 14-May-2005 tjr

Fix background colour problems with --color output (RH bug #138913).

Obtained from: Karsten Hopp via Fedora


146201 14-May-2005 tjr

Fixed a bug in the fgrep patch, exposed by the dfa-optional patch
(RH bug #138558). Removed bogus part of grep-2.5.1-fgrep patch.

Obtained from: Fedora (Jakub Jelinek, Tim Waugh)


146200 14-May-2005 tjr

Fix dfa multibyte character class matching when -i is used (RH bug #123363).

Obtained from: Fedora (Tim Waugh)


146199 14-May-2005 tjr

Remove mb-caching hack.

Obtained from: Fedora (Tim Waugh)


141847 13-Feb-2005 obrien

Fix regression in output with -R compared to previous version.

PR: 77466
Submitted by: Andre Guibert de Bruet <andy@siliconlandmark.com>


137465 09-Nov-2004 keramida

The correct name of the long option is --line-buffered,
not --line-bufferring.

PR: docs/72985
Submitted by: John Engelhart <johne@zang.com>
MFC after: 1 week


133552 12-Aug-2004 tjr

Change version string to distinguish our modified version of GNU grep
from the original.


131578 04-Jul-2004 tjr

Fix bug causing `[' to be wrongly included in character class expressions
in some multibyte locales (Red Hat bug #108484).

Obtained from: Fedora (Tim Waugh)


131576 04-Jul-2004 tjr

Make grep run much (~10x) faster in multibyte locales by caching the wide
character representation of input data across calls to dfaexec(), and by
caching the lengths of character across calls to check_multibyte_string().

Obtained from: Fedora (Tim Waugh)


131569 04-Jul-2004 tjr

Avoid accessing accessing memory past the end of mb_properties in the
degenerate case of fgrep with an empty pattern in a multibyte locale.
Found by phkmalloc.


131564 04-Jul-2004 tjr

Improve case-insensitive matching in multibyte locales.

Obtained from: Isamu Hasegawa (IBM) via Fedora


131563 04-Jul-2004 tjr

Fix failure of fgrep to report some matches (Red Hat bug #116909).

Obtained from: Fedora (Tim Waugh)


131561 04-Jul-2004 tjr

Use hard_locale() to check whether collating order is "hard" regardless
of whether NLS is enabled.


131560 04-Jul-2004 tjr

Ignore ENABLE_NLS when deciding whether we can use setlocale().
Use the same shortcut as glibc to test for the "C" or "POSIX" locale.


131558 04-Jul-2004 tjr

Update for grep 2.5.1.


131557 04-Jul-2004 tjr

Merge local changes.


131555 04-Jul-2004 tjr

This commit was generated by cvs2svn to compensate for changes in r131554,
which included commits to RCS files with non-trunk default branches.


126435 01-Mar-2004 ache

Merge conflicts, upgrade


126433 01-Mar-2004 ache

This commit was generated by cvs2svn to compensate for changes in r126432,
which included commits to RCS files with non-trunk default branches.


125931 17-Feb-2004 ache

Oops, use -I${DESTDIR}/usr/include/gnu instead of ... /../../include/gnu


125894 16-Feb-2004 ache

1) Remove files no longer needed.
2) Switch back to regex.h


125503 05-Feb-2004 ru

Fixed style of DPADD and LDADD assignments as per style.Makefile(5).


105502 20-Oct-2002 obrien

We HAVE_STPCPY now.


104614 07-Oct-2002 ru

Added bzip2 variants to the NAME section.
Added missing break.
Remove the statement that -J requires zlib(3).


104555 06-Oct-2002 obrien

Allow -J to simultaneously do non-bzip2 grepping.
Don't allow -J and -Z together.

Partially submitted by: knu


103372 16-Sep-2002 obrien

Create bzgrep.


102661 31-Aug-2002 keramida

Typo in [^[:alnum:]] character class.

PR: docs/41728
Submitted by: osgene@web.de


99809 11-Jul-2002 keramida

Mention zegrep and zfgrep too,
and what their equivalent grep options are.

PR: docs/35603
Submitted by: "Gary W. Swearingen" <swear@blarg.net>


86946 27-Nov-2001 ru

Removed glibc specific stuff.

PR: docs/31431


83661 19-Sep-2001 ru

In FreeBSD, -Z is reserved for zgrep(1), and only
a long version of the --null option is supported.

PR: gnu/30644


79454 09-Jul-2001 dd

mdoc(7) police: remove extraneous .Pp before and/or after .Sh.


69983 13-Dec-2000 ru

This file was not regenerated for the latest import, thus the
reported grep version is wrong. The correct version is 2.4d.


61088 30-May-2000 ru

Restore backwards compatible -R option.
Broken in revision 1.17.

Noticed by: hoek


56920 31-Jan-2000 ru

Merge FreeBSD changes into 2.4d.


56919 31-Jan-2000 ru

Merge FreeBSD changes into 2.4d.

FreeBSD changes OBE'ed by 2.4d:
* rev 1.5 - use collate for alpha character ranges.


56918 31-Jan-2000 ru

This is the stock GNU grep 2.4d file.


56916 31-Jan-2000 ru

This commit was generated by cvs2svn to compensate for changes in r56915,
which included commits to RCS files with non-trunk default branches.


56234 18-Jan-2000 ru

Back out previous revision because someone upgraded our
texinfo system to one that understands "command{foo}".


56233 18-Jan-2000 ru

Fix conflicts.


56231 18-Jan-2000 ru

This commit was generated by cvs2svn to compensate for changes in r56230,
which included commits to RCS files with non-trunk default branches.


55405 04-Jan-2000 ru

Decompression is supported via -Z, not -z.


55404 04-Jan-2000 ru

* Make --null option work in (HAVE_LIBZ > 0) case.
* Remove "why we need this decl..." comment. The `matcher' variable
is defined in *grepmat.c files in the original distribution, which
we did not import.


55382 04-Jan-2000 obrien

Update for version 2.4.


55381 04-Jan-2000 obrien

Turn off GNU Info docs until someone upgrades our texinfo system to one
that understands "command{foo}".


55379 04-Jan-2000 obrien

Merge FreeBSD chagnes into GNU grep 2.4.


55361 03-Jan-2000 obrien

This commit was generated by cvs2svn to compensate for changes in r55360,
which included commits to RCS files with non-trunk default branches.


55358 03-Jan-2000 obrien

This commit was generated by cvs2svn to compensate for changes in r55357,
which included commits to RCS files with non-trunk default branches.


55278 30-Dec-1999 ru

This is the stock 2.3 file. Since someone majorly SPAMMED the
repository by NOT vendor importing the virgin 2.0 sources, CVS
had no idea what to do here.


53705 26-Nov-1999 obrien

Support the environtmental var "GREP_OPTIONS". Which can hold a set of
default options for diff. These options are interpreted first and can be
overwritten by explicit command line parameters.

Obtained from: GNU Grep 2.3h


53668 24-Nov-1999 obrien

GNU killed this sometime before 2.3.


53601 22-Nov-1999 obrien

Missed two.

Submitted by: Philippe Charnier <charnier@xp11.frmug.org>


53575 22-Nov-1999 obrien

This commit was generated by cvs2svn to compensate for changes in r53574,
which included commits to RCS files with non-trunk default branches.


53571 22-Nov-1999 obrien

Make the tests work again.


53570 22-Nov-1999 obrien

spencer.tests is now spencer1.tests. The other files aren't part of
GNU Grep any longer.


53569 22-Nov-1999 obrien

This commit was generated by cvs2svn to compensate for changes in r53568,
which included commits to RCS files with non-trunk default branches.


53567 22-Nov-1999 obrien

Finish proper hookup of GNU Grep 2.3, including docs & config header file,
rather than the compile commandline from hell.

Submitted by: ru


53566 22-Nov-1999 obrien

Build and install GNU Grep 2.3 docs.


53565 22-Nov-1999 obrien

This commit was generated by cvs2svn to compensate for changes in r53564,
which included commits to RCS files with non-trunk default branches.


53519 21-Nov-1999 obrien

Restore the 2.3 config file.


53496 21-Nov-1999 peter

Apply a bandaid to the grep Makefile to try and get it to compile and stop
breaking world.


53482 21-Nov-1999 obrien

Spell command names correctly. Even when they appear at the beginning
of a sentence.


53481 21-Nov-1999 obrien

Merge FreeBSD changes into 2.3:
* revs 1.5-6 - added builtin decompression using zlib library, option -Z.

Submitted by: ru


53479 21-Nov-1999 obrien

Merge FreeBSD changes into 2.3:
* rev 1.2 - use -lgnuregex

FreeBSD changes OBE'ed by 2.3:
* revs 1.4-5 - icase searches & ctype macro changes, fuctionality moved
elsewhere.
* rev 1.3 - Remove trailing whitespace. The GNU Grep maintainers did this
for us.

Submitted by: ru


53478 21-Nov-1999 obrien

Alias -R to -r for backward compatibility.

Submitted by: ru
Requested by: wosch


53477 21-Nov-1999 obrien

Set default matcher from argv[0].

Merge FreeBSD changes into 2.3:
* revs 1.9-10 - built-in decompression using zlib(3) library

FreeBSD changes OBE'ed by 2.3:
* rev 1.7 - our "-q" flag. Use "-L" or "-l" now.
* revs 1.{4,6} - colleate, and with correct LC_ type.
* rev 1.3 - remove trailing whitespace.

Submitted by: ru


53475 20-Nov-1999 obrien

This is the stock 2.3 file (+ FreeBSD id). Since someone added 2.0 rather
than vendor importing the virgin 2.0 sources, we have to manually put this
on the HEAD branch.


53474 20-Nov-1999 obrien

This is the stock 2.3 file (+ FreeBSD id). Since someone majorly SPAMMED
the repository by NOT vendor importing the virgin 2.0 sources, CVS had no
idea what to do here.


53473 20-Nov-1999 obrien

This is the stock 2.3 file (+ FreeBSD id). Since someone majorly SPAMMED
the repository by NOT vendor importing the virgin 2.0 sources, CVS had no
idea what to do here.


53472 20-Nov-1999 obrien

Merge FreeBSD changes into 2.3:
* rev 1.5 - use collate for alpha character ranges
* rev 1.3 - use -lgnuregex

Submitted by: ru


53470 20-Nov-1999 obrien

This commit was generated by cvs2svn to compensate for changes in r53469,
which included commits to RCS files with non-trunk default branches.


53451 20-Nov-1999 peter

Back out the botched attempt to update to gnu grep 2.3 (lots of history
was lost). Restore original version to try and avoid breaking the build
while David O'brien does a proper set of imports and merges.

Requested by: obrien


52591 28-Oct-1999 ru

Upgrade grep to version 2.3


52209 13-Oct-1999 ru

Cast tp[-2] to unsigned char before comparing.

PR: 14011
Ignored by: maintainer
Obtained from: GNU grep 2.3


50472 27-Aug-1999 peter

$Id$ -> $FreeBSD$


43805 09-Feb-1999 wosch

Added myself as maintainer.


41155 14-Nov-1998 wosch

Use mmap for reading files. This is faster than read().


39886 02-Oct-1998 obrien

Install z*grep manpages


37313 30-Jun-1998 bde

Fixed printf format errors.


34189 07-Mar-1998 wosch

Delete cc(1) debug option, typo from last commit.

Pointed out by: Søren Schmidt


31928 21-Dec-1997 wosch

When called as `zgrep', the -Z argument is assumed. Make a
link from zgrep to grep.

Pointed out by: Tim Vanderhoek <hoek@hwcn.org> and
Mike Smith <mike@smith.net.au>


31900 20-Dec-1997 wosch

Added builtin decompression using zlib library, option -Z.

Enabled this new feature with the makefile variable GREP_LIBZ. If
you don't like it, compile with `make GREP_LIBZ='.

grep + zlib has several advantages:

- the shell script zgrep(1) will be basically a one line
exec grep -Z "$@"

- no shell script, no bugs. The current zgrep implementations
have many bugs and some grep options are no supported.

- no shell script, no security risks.

- it is a magnitude faster than a shell script

Also fixed:
0 -> STDIN_FILENO
Close a file descriptor only if the open call was successfully. It does
not hurt for the open(2) function, but the gzclose(3) function
died in free() to free up (not) allocated memory.


30657 23-Oct-1997 ache

Add unsigned char cast to ctype macros


30654 23-Oct-1997 ache

Add (unsigned char) casts to ctype macros


23552 09-Mar-1997 mpp

Fix a number of typos, one of which is part of PR# 2917.


19284 31-Oct-1996 ache

Replace collate_range_cmp call with its code (GNU version)


18522 27-Sep-1996 wosch

grep -q pattern file

search 'pattern' in whole file 'file', from top to bottom. This is
not necessary; if grep found 'pattern' it can stop further searching
in file 'file'.

Example:

$ time ./grep-old -q Adam /usr/share/dict/*
1.93 real 1.05 user 0.85 sys
$ time ./grep-new -q Adam /usr/share/dict/*
0.14 real 0.06 user 0.06 sys


18521 27-Sep-1996 wosch

test 37: [b-a] is a syntax error and exit with status 2


17578 13-Aug-1996 ache

Use collate for alpha character ranges


17548 12-Aug-1996 ache

Pick collate info too


13847 02-Feb-1996 wosch

recursive grep, enabled with -DHAVE_FTS=1
enable mmap (-DHAVE_MMAP=1)


13123 30-Dec-1995 peter

This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.


13122 30-Dec-1995 peter

recording cvs-1.6 file death


11887 28-Oct-1995 ache

Add setlocale LC_CTYPE
Fix icase searches for 8bit charsets


8858 30-May-1995 rgrimes

Remove trailing whitespace.


5498 11-Jan-1995 ache

Use -lgnuregex
Tune for 8bit ctype


130 16-Jul-1993 rgrimes

Merge. Fix LINKS+= with $DESTDIR$BINDIR in them, you do NOT need to
specify $DESTDIR on a LINKS+= line.


107 08-Jul-1993 conklin

Gnu grep 2.0 does fgrep too!


98 06-Jul-1993 nate

Removed egrep since the new grep is just a link to it w/out any changes
anymore


97 06-Jul-1993 nate

Left an ugly in the Makefile


94 06-Jul-1993 nate

Update GNU grep to version 2.0


65 29-Jun-1993 nate

Ugh, whoever did the port made a mess, I cleaned up the Makefile and
deleted un-necessary stuff


62 29-Jun-1993 nate

This commit was generated by cvs2svn to compensate for changes in r61,
which included commits to RCS files with non-trunk default branches.