History log of /freebsd/usr.bin/grep/util.c (Results 101 – 113 of 113)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 69a6d198 12-Jun-2011 Gabor Kovesdan <gabor@FreeBSD.org>

- Use REG_NOSUB to bypass submatch counting when not necessary. This may
yield in somewhat better performance in a few cases.

Approved by: delphij (mentor)


# cbe6b9e5 12-Jun-2011 Gabor Kovesdan <gabor@FreeBSD.org>

- Fix -w behavior
- Make -F and -w work together
- Fix --color to colorize all of the matches

PR: bin/156826
Submitted by: Yuri Pankov <yuri.pankov@gmail.com>
Approved by: delphij (mentor)


# b66a823b 07-Apr-2011 Gabor Kovesdan <gabor@FreeBSD.org>

- Adjust a comment to actual behaviour
- Makefile nit
- Add more CVS/SVN keywords to make it easier to track changes from NetBSD
in case they add further improvements

Approved by: delphij (mentor)

- Adjust a comment to actual behaviour
- Makefile nit
- Add more CVS/SVN keywords to make it easier to track changes from NetBSD
in case they add further improvements

Approved by: delphij (mentor)
Obtained from: The NetBSD Project

show more ...


# d841ecb3 07-Apr-2011 Gabor Kovesdan <gabor@FreeBSD.org>

- Simplify the fixed string pattern preprocessing code
- Improve readability

Approved by: delphij (mentor)
Obtained from: The NetBSD Project


Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0
# a0ef9ad6 19-Aug-2010 Dag-Erling Smørgrav <des@FreeBSD.org>

UTFize my name.


# 3ed1008b 18-Aug-2010 Gabor Kovesdan <gabor@FreeBSD.org>

- Refactor file reading code to use pure syscalls and an internal buffer
instead of stdio. This gives BSD grep a very big performance boost,
its speed is now almost comparable to GNU grep.

Subm

- Refactor file reading code to use pure syscalls and an internal buffer
instead of stdio. This gives BSD grep a very big performance boost,
its speed is now almost comparable to GNU grep.

Submitted by: Dimitry Andric <dimitry@andric.com>
Approved by: delphij (mentor)

show more ...


# 59218eb7 16-Aug-2010 Gabor Kovesdan <gabor@FreeBSD.org>

- Revert strlcpy() changes to memcpy() because it's more efficient and
former may be safer but in this case it doesn't add extra
safety [1]
- Fix -w option [2]
- Fix handling of GREP_OPTIONS [3]

- Revert strlcpy() changes to memcpy() because it's more efficient and
former may be safer but in this case it doesn't add extra
safety [1]
- Fix -w option [2]
- Fix handling of GREP_OPTIONS [3]
- Fix --line-buffered
- Make stdin input imply --line-buffered so that tail -f can be piped
to grep [4]
- Imply -h if single file is grepped, this is the GNU behaviour
- Reduce locking overhead to gain some more performance [5]
- Inline some functions to help the compiler better optimize the code
- Use shortcut for empty files [6]

PR: bin/149425 [6]
Prodded by: jilles [1]
Reported by: Alex Kozlov <spam@rm-rf.kiev.ua> [2] [3],
swell.k@gmail.com [2],
poyopoyo@puripuri.plala.or.jp [4]
Submitted by: scf [5],
Shuichi KITAGUCHI <ki@hh.iij4u.or.jp> [6]
Approved by: delphij (mentor)

show more ...


# 97a012f2 29-Jul-2010 Gabor Kovesdan <gabor@FreeBSD.org>

- Some minor changes to the messages to increase usefulness of error msgs

Reviewed by: hrs (Japanese catalogs),
pluknet <pluknet at gmail dot com> (Russian catalog)
Approved by: delphij (mentor)


# 55e44f51 29-Jul-2010 Gabor Kovesdan <gabor@FreeBSD.org>

- Use the traditional behaviour for filename and directory name inclusion
and exclusion patterns [1]
- Some improvements on the exiting code, like replacing memcpy with
strlcpy/strcpy

Approved b

- Use the traditional behaviour for filename and directory name inclusion
and exclusion patterns [1]
- Some improvements on the exiting code, like replacing memcpy with
strlcpy/strcpy

Approved by: delphij (mentor)
Pointed out by: bf [1], des [1]

show more ...


# 36bcf7c1 25-Jul-2010 Gabor Kovesdan <gabor@FreeBSD.org>

- Fix -l and -L by really surpressing output and just showing filenames

Submitted by: swell.k@gmail.com
Approved by: delphij (mentor)


# 27116286 25-Jul-2010 Gabor Kovesdan <gabor@FreeBSD.org>

- Fix --color behaviour to only output color sequences if stdout is a tty
or if forced mode is specified [1]
- While here, add some alternative names for the options and make then
case-insensitiv

- Fix --color behaviour to only output color sequences if stdout is a tty
or if forced mode is specified [1]
- While here, add some alternative names for the options and make then
case-insensitive
- Fix -q and -l behaviour [2]
- Some small changes to make the code easier to review

Submitted by: swell.k@gmail.com [1],
dougb [2]
Approved by: delphij (mentor)

show more ...


# 0c41ffb3 23-Jul-2010 Xin LI <delphij@FreeBSD.org>

Fix crashes when using grep -R:

- Explicitly pre-zero memory for fts_open parameters.
- Don't test against directory patterns when we are testing direct
leaf of current directory.

While I'm th

Fix crashes when using grep -R:

- Explicitly pre-zero memory for fts_open parameters.
- Don't test against directory patterns when we are testing direct
leaf of current directory.

While I'm there plug a few of memory leaks.

show more ...


# 4dc88ebe 22-Jul-2010 Gabor Kovesdan <gabor@FreeBSD.org>

Add BSD grep to the base system and make it our default grep.

Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,

Add BSD grep to the base system and make it our default grep.

Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.

TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.

Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing

show more ...


12345