Subject: Re: CVS commit: [netbsd-2] src/usr.bin/grep
To: None <source-changes@NetBSD.org,>
From: Jeff Rizzo <riz@NetBSD.org>
List: source-changes
Date: 07/15/2005 16:56:19
--b5gNqxB1S1yM7hjW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Jul 11, 2005 at 12:24:36AM +0200, Jukka Salmi wrote:
[ commit message elided ]
> This is not what was requested in ticket #2044 and breaks the build.
> The attached patch should fix this.
Sorry, I've been mostly AFK for a few days.
I don't see the build breakage you indicate (at least not on i386 - are
you building on a different platform?), and it does look like the change
requested in ticket 2044. (revision 1.3 of src/usr.bin/grep/binary.c).
In fact, the patch you sent below reverts part of the change in that
revision which was applied by mlelstv's patch. Am I missing something?
+j
> Index: usr.bin/grep/binary.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/src/usr.bin/grep/binary.c,v
> retrieving revision 1.1.1.2.4.1
> diff -u -r1.1.1.2.4.1 binary.c
> --- usr.bin/grep/binary.c 10 Jul 2005 20:40:16 -0000 1.1.1.2.4.1
> +++ usr.bin/grep/binary.c 10 Jul 2005 22:15:50 -0000
> @@ -70,11 +70,12 @@
> if (gzseek(f, 0L, SEEK_SET) =3D=3D -1)
> return 0;
> =20
> - if ((m =3D gzread(f, buf, BUFFER_SIZE)) <=3D 0)
> + if ((m =3D gzread(f, buf, BUFFER_SIZE)) =3D=3D 0)
> return 0;
> =20
> for (i =3D 0; i < m; i++)
> - if (!okchar(buf[i]))
> + if (!isprint(buf[i]) && !isspace(buf[i]) &&
> + buf[i] !=3D line_endchar)
> return 1;
> =20
> gzrewind(f);
--=20
--b5gNqxB1S1yM7hjW
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (NetBSD)
iQCVAwUBQthNI7OuUtxCgar5AQJx0gP+LbOp8IkL8hLILrBJfPkMqL+i4lkqDsUj
ARvcLEgrpZ1otOm1vQTtZGdWS/BwviQzeSU0Se0L0BnkP7PPWBlGne3BiZon69bP
83JXZ8pfhEvliv38gZTuPmNs7LD2gBmqjrbIweb+aIQa53M9JDyZ/fNmVN5fLOlw
cVsbSREzd2A=
=HS+v
-----END PGP SIGNATURE-----
--b5gNqxB1S1yM7hjW--