History log of /freebsd-11-stable/gnu/usr.bin/grep/grep.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

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


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 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.


# 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


# 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).


# 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


# 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>


# 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)


# 131564 04-Jul-2004 tjr

Improve case-insensitive matching in multibyte locales.

Obtained from: Isamu Hasegawa (IBM) via Fedora


# 131557 04-Jul-2004 tjr

Merge local changes.


# 126435 01-Mar-2004 ache

Merge conflicts, upgrade


# 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.


# 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.


# 56233 18-Jan-2000 ru

Fix conflicts.


# 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.


# 55379 04-Jan-2000 obrien

Merge FreeBSD chagnes into GNU grep 2.4.


# 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


# 53478 20-Nov-1999 obrien

Alias -R to -r for backward compatibility.

Submitted by: ru
Requested by: wosch


# 53477 20-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


# 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