OpenBSD CVS

CVS log for src/usr.bin/grep/binary.c


[BACK] Up to [local] / src / usr.bin / grep

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_5_3_BASE


Revision 1.17 / (download) - annotate - [select for diffs], Mon Jun 20 18:14:01 2011 UTC (12 years, 11 months ago) by stsp
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.16: +14 -20 lines
Diff to previous 1.16 (colored)

Switch binary file detection from !(isprint() || isspace()) to checking
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@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.