Commit Graph

28 Commits

Author SHA1 Message Date
joerg 6818646ac8 Use __dead 2011-09-16 15:39:25 +00:00
plunky 9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
christos cef6b9f736 document non-literal format strings 2011-08-17 15:32:20 +00:00
joerg 6a4bfecd54 Avoid C99 features. 2011-04-18 23:22:42 +00:00
joerg 34bdd27889 Add support for --null-data. Change -Z to behave like GNU grep's -Z. 2011-04-18 22:46:48 +00:00
joerg ff9dcf4380 Redo context printing so that adjourning contexts don't print the
separator, following GNU grep's behavior in this regard.
2011-04-18 17:18:03 +00:00
joerg 4bb7e7be1d Use the more portable getline. 2011-04-18 03:48:23 +00:00
joerg 4c78e1ea83 Fix memory leaks. 2011-04-18 03:47:40 +00:00
joerg f7d22212e7 Include nbtool_config.h for tool builds. 2011-04-18 03:27:40 +00:00
joerg f3483179a4 If transforming patterns with \<...\> to implicit word bounaries, don't
change the global wflag, but use a per pattern flag derived from it.
Fixes usage of grep with multiple -w arguments.
2011-02-27 17:33:37 +00:00
joerg cf66e7150e Simplify. 2011-02-17 22:03:25 +00:00
joerg dc189fa216 Fix signed / unsigned issues. Refactor basename usage to use a local
copy and do it only once, not for each pattern. Remove late inline.
2011-02-16 18:35:39 +00:00
joerg 0a1172667a Replace usr.bin/grep with the BSD grep implementation from FreeBSD. 2011-02-16 01:31:33 +00:00
lukem c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
lukem d4bbf23d28 sign-compare fixes 2009-01-25 14:06:00 +00:00
cjep 966c1a873b sync with pkgsrc changes - reorder includes and add some casts 2007-12-06 20:33:48 +00:00
rillig 6e29471885 Changed the type of some size variables from int to size_t. Added const
qualifiers to some parameters. These changes allow WARNS to be raised to
4.
2006-05-15 21:12:21 +00:00
wiz 498c64811f Note that -v is broken in this version. 2006-04-08 23:56:39 +00:00
wiz a67c9be512 warnx appends a newline, so the string does not have to contain one.
Remove it.
2006-01-13 20:30:40 +00:00
christos 76f53566bf PR/29806: Michael Van Elst: Off by one in code.
While I am there:
	- factor out the binary test to an inline function.
	- use size_t where appropriate.
	- check for <= 0 in gzread; it returns -1 on error.
2005-04-22 21:02:42 +00:00
christos 7e7ab613b8 trying to map a 4G file does not work nicely. Limit mmap to 64M. 2005-04-22 21:01:10 +00:00
dsl c28aa2083f Add (unsigned char) cast to ctype functions
Change a couple of local buffers to 'unsigned char'
2004-10-30 17:37:09 +00:00
cjep 033a0de92f bump version due to today\'s changes 2004-05-05 15:06:33 +00:00
cjep f7b1c3362b update 2004-05-05 14:52:34 +00:00
cjep 0d48a39432 Implement --line-buffered. From OpenBSD. 2004-05-05 14:34:55 +00:00
cjep 26e45f0c9a Import of our changes to grep developed in othersrc. A very
brief summary:

* Add NetBSD RCS Ids. Change to use a date based version number.
* Remove unused variables and functions.
* Move towards NetBSD code style.
* Add missing GNU options (except for --include, --exclude and
	--line-buffered)
* Bug fixes
* Bug fixes and changes from OpenBSD's src/usr.bin/grep

A full list of changes can be viewed in the NetBSD CVS repository at
othersrc/usr.bin/grep. A ChangeLog is also available at:
	ftp://ftp.NetBSD.org/pub/NetBSD/misc/cjep/grep-ChangeLog.txt

If you want to help out, please let me (cjep@) know so that we can
organise our efforts efficiently.
2004-01-02 15:00:29 +00:00
cjep 9ffc49ef33 Import of our changes to grep developed in othersrc. A very
brief summary:

* Add NetBSD RCS Ids. Change to use a date based version number.
* Remove unused variables and functions.
* Move towards NetBSD code style.
* Add missing GNU options (except for --include, --exclude and
	--line-buffered)
* Bug fixes
* Bug fixes and changes from OpenBSD's src/usr.bin/grep

A full list of changes can be viewed in the NetBSD CVS repository at
othersrc/usr.bin/grep. A ChangeLog is also available at:
	ftp://ftp.NetBSD.org/pub/NetBSD/misc/cjep/grep-ChangeLog.txt

If you want to help out, please let me (cjep@) know so that we can
organise our efforts efficiently.
2004-01-02 15:00:25 +00:00
cjep 232a750c61 Import of BSD-licensed grep by James Howard and Dag-Erling Coïdan
Smørgrav. This import is of version 0.16.
2004-01-02 14:58:43 +00:00