| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
|
|
|
|
|
|
|
|
|
| |
was available in v4.
To quote Ken Thompson, grep appeared "sometime
before the 4th edition."
ok schwarze@
|
|
|
|
|
| |
2. The G flag is useless and never checked. Remove it.
ok millert
|
| |
|
| |
|
|
|
|
| |
in my tree for ages.
|
|
|
|
|
|
|
|
| |
Pointed out by LLVM.
mmfile.c:51:7: warning: explicitly assigning a variable of type 'char *' to itself [-Wself-assign]
ok millert@
|
|
|
|
|
|
| |
Also, in 'ftp', always put the error message last, after the hostname/ipaddr.
ok jsing@ krw@ millert@
|
|
|
|
| |
ok krw
|
| |
|
|
|
|
|
| |
detecting non-regex patterns. makes the fast grep code more applicable.
with some improvements by Jeremie Courreges-Anglas
|
| |
|
|
|
|
|
| |
Reported by Jeramey Crawford, fix adapted from FreeBSD.
OK guenther@
|
|
|
|
| |
initially proposed a different fix. OK otto@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Bail if the given size_t line length doesn't fit into the new regoff_t.
"I don't think you will ever be able to get a string longer than
SSIZE_MAX into memory, but that looks good." tedu@
"Agreed" otto@
regoff_t suggested by otto@
|
|
|
|
| |
OK otto@
|
|
|
|
| |
fixes libpqxx build
|
|
|
|
| |
reminded this was useful by ajcoutot
|
|
|
|
|
|
|
| |
for embedded NULs. Matches GNU and FreeBSD grep, and avoids problems with
e.g. latin1-encoded files being treated as binary in the UTF-8 locale once
grep calls setlocale() (which it does not, yet).
OK millert@ tedu@
|
| |
|
| |
|
|
|
|
| |
fgrep -w, but oh well. ok deraadt millert
|
|
|
|
| |
ok millert
|
|
|
|
| |
ok millert@ krw@
|
|
|
|
|
|
|
| |
calling add_pattern, which in turn assumes that the getopt phase
has already finished.
OK otto@
|
| |
|
|
|
|
|
| |
relating to symlinks that you can get with find. And a bonus fts flag fix.
With a small tweak by guenther. ok deraadt guenther jmc millert nicm
|
|
|
|
| |
updates to follow;
|
| |
|
|
|
|
| |
using regcomp() instead of fastcomp(). ok millert@
|
| |
|
| |
|
|
|
|
| |
- note which options are extensions to POSIX
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which may be NULL (e.g. -e '').
- let add_pattern() decide how to deal with empty patterns, don't do
magic in read_patterns().
This unbreaks stuff like grep -e '', and makes grep -f <file> more
POSIX compliant. Semantics for grep -f /dev/null (or any other empty
file) may be questionable, but this case isn't specified by POSIX,
and matching nothing at all seems to be sane.
Thanks to otto@, who mentioned potential problems related to the
-x option with the first patch i sent.
ok jaredy@ (some time ago), otto@, millert@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
before processing each file to avoid printing lines
intended from the previous file.
Reported and fix by Charles Longeau <chl@tuxfamily.org>
via tech@.
ok otto millert
|
|
|
|
| |
OK moritz@.
|
|
|
|
|
|
|
|
|
|
| |
$ grep -x ""
matches empty lines as reported on misc@ by
Martin Marusak <marusak@fhpv.unipo.sk>.
Initial diff by otto@ with tweaks by me.
ok otto
|
|
|
|
| |
spotted by hshoexer@
|
|
|
|
|
| |
have multiple bits set, which lead to surprising results. Spotted by
Paul Stoeber, more to come. ok millert@ pedro@ jaredy@ djm@
|
|
|
|
|
| |
Report by Ralf dot Wildenhues at gmx dot de;
testing by jmc@ ok beck@ millert@
|
| |
|
| |
|
|
|
|
| |
Benjamin Pineau in PR 5008; ok weingart@
|
| |
|
|
|
|
|
| |
- check for <= 0 in gzread; it returns -1 on error.
From christos@netbsd; ok millert@
|
|
|
|
|
|
|
| |
delayed so options that affect pattern-building (such as -w) can be
applied evenly to all such patterns.
ok and help otto, ok millert
|
|
|
|
|
|
|
| |
using the -w option with parentheses, to avoid operators in the
expressions binding to the markers. Compare [[:<:]]foo|bar[[:>:]]
and [[:<:]](foo|bar)[[:>:]]. Problem spotted by aaron@; ok millert@
aaron@ jaredy@
|
|
|
|
|
|
| |
gzseek(f, 0L, SEEK_CUR) does not work as expected. Instead test the
underlying stream and remember that. This repairs echo foo | gzip | zgrep foo.
Problem spotted by Han Boetes in PR 4089; ok millert@
|