christos
2a5b01fca8
Fix asan heap buffer overflow. from enh at google.
2019-04-05 13:34:41 +00:00
christos
4685e01b74
add WITHOUT_GZIP for the tools build.
2018-08-12 09:03:21 +00:00
christos
8e22f7e23d
fix libraries
2018-08-12 08:00:32 +00:00
christos
4f89880b45
remove stray paren
2018-08-12 07:59:14 +00:00
christos
dfe5f25515
add WITHOUT_BZ2 for tools build.
2018-08-12 07:53:19 +00:00
christos
ab4aefc826
use setvbuf if available; it is more portable.
2018-08-11 19:44:19 +00:00
christos
647d6f88ee
don't build NLS if we don't need to
2018-08-11 19:43:54 +00:00
christos
ce1225c115
remove dup includes (already in grep.h)
2018-08-11 16:03:37 +00:00
mrg
4695f70791
fixes for GCC 6.4:
...
- fix an indentation issue in radioioctl().
- fix an indentation issue in mpt_run_xfer().
- grep's printline() has some {} placement issues.
2018-02-05 22:14:26 +00:00
christos
b415df1f94
fix type, from enh at google dot com
2014-07-14 21:56:03 +00:00
christos
11ecaffd58
remove dup usage print (enh at google dot com):
...
arm just sent us (Android) this:
https://android-review.googlesource.com/#/c/100970/1
2014-07-11 16:30:45 +00:00
msaitoh
302f86804d
Fix memory leak in file_matching().
2013-01-21 03:24:43 +00:00
joerg
a9992047e4
Consistently short cut the pattern loop on mismatches.
...
Don't assign 1 conditionally, if unconditional works as well.
2012-05-06 22:32:05 +00:00
joerg
0fe4b4b06b
Remove matchall handling for now, it doesn't work correctly and as such,
...
it is a premature optimisation.
2012-05-06 22:27:00 +00:00
joerg
40b375f194
Make the matchall case a full short cut.
2012-05-06 21:56:08 +00:00
wiz
1ac719d147
Remove unnecessary Bk/Ek pairs from SYNOPSIS.
...
No effective change except where I used the opportunity to sort options
and/or option descriptions.
2012-04-08 22:00:37 +00:00
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