summaryrefslogtreecommitdiffstats
path: root/usr.bin/grep/file.c
Commit message (Collapse)AuthorAgeFilesLines
* Following r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT".obrien2013-01-081-1/+8
| | | | | | Correct r226271 which should have used WITHOUT_BZIP2_SUPPORT per r166255. Obtained from: Juniper Networks
* - Use getprogname() instead of __prognamegabor2011-10-111-5/+15
| | | | | | | | - Allow disabling bzip2 support with WITHOUT_BZIP2 - Fix handling patterns that start with a dot - Remove superfluous semicolon Approved by: delphij (mentor)
* Update BSD grep to the latest development version. It has some codegabor2011-10-051-32/+93
| | | | | | | | | | | | | backported that was written for the TRE integration project in Google Summer of Code 2011. This is a temporary solution until the whole regex library is not replaced so that BSD grep development can continue and the backported code gets some review and testing. This change only improves scalability slightly, there is no big performance boost yet but several minor bugs have been found and fixed. Approved by: delphij (mentor) Sposored by: Google Summer of Code 2011 MFC after: 1 week
* - Adjust a comment to actual behaviourgabor2011-04-071-0/+2
| | | | | | | | | - 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
* UTFize my name.des2010-08-191-1/+1
|
* - Refactor file reading code to use pure syscalls and an internal buffergabor2010-08-181-168/+152
| | | | | | | | 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)
* - Revert strlcpy() changes to memcpy() because it's more efficient andgabor2010-08-151-6/+19
| | | | | | | | | | | | | | | | | | | | | | | 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)
* Add BSD grep to the base system and make it our default grep.gabor2010-07-221-0/+255
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
OpenPOWER on IntegriCloud