diff options
author | Matthias Kilian <kili@cvs.openbsd.org> | 2007-02-13 21:48:21 +0000 |
---|---|---|
committer | Matthias Kilian <kili@cvs.openbsd.org> | 2007-02-13 21:48:21 +0000 |
commit | dc47ed54edcad7832fe0403f0d3a3ddefd4397ff (patch) | |
tree | e54d630d24e4456a7facdca9f9704f4754aaac25 /sys | |
parent | 77abb3cc848e95932412e3ce6f2766d0f5494fe9 (diff) |
- Be explicit on command line checking, instead of relying on patterns,
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@
Diffstat (limited to 'sys')
0 files changed, 0 insertions, 0 deletions