summaryrefslogtreecommitdiff
path: root/usr.bin/grep/binary.c
AgeCommit message (Collapse)Author
2005-04-25- use size_t where appropriate.Otto Moerbeek
- check for <= 0 in gzread; it returns -1 on error. From christos@netbsd; ok millert@
2005-02-07Due to a braindead zlib, the test for seekability of a gzstream usingOtto Moerbeek
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@
2004-09-15cast offset value correctly for gzseekTheo de Raadt
2004-05-06Don't fseek() on stdin if it is a terminal. It does not fail, butOtto Moerbeek
what's more more important, it does not work either. ok millert@ tedu@
2004-05-06Treat ^H as non-binary. OK hshoexer@, brad@ and deraadt@Todd C. Miller
2003-12-29fix zgrep failure when the uncompressed file begins with a newlineCan Erkin Acar
also, search from the beginning if a stream or compressed file is identified as 'binary'. ok millert@, reported by tedu@, tested by jose@
2003-09-18make this test look for spaces as well, to match other casesBob Beck
ok fgs@ ok deraadt@
2003-09-07extend ascii test for more accuracy. ok deraadt@ pb@Ted Unangst
2003-06-25o remove useless cast to int from gzread() callTodd C. Miller
o maxPatternLen should be size_t since that's what it is compared against o remove useless casts of NULL to various pointer types
2003-06-25backwards args to gzseekTed Unangst
2003-06-23better detetection/handling of binary files.Ted Unangst
make -a do the right thing, doc and implement -U, -I. add --help and --mmap for compatibility. some other minor fixes. some from NetBSD. ok deraadt@
2003-06-22proper $OpenBSD$Theo de Raadt
2003-06-22-DNOZ flag to be used by install media for removing z*grep support, ifTheo de Raadt
needed. (and knf)
2003-06-22correct fseek() parametersTheo de Raadt
2003-06-22freegrep 0.16Theo de Raadt