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 > =================================================================== > 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) == -1) > return 0; > > - if ((m = gzread(f, buf, BUFFER_SIZE)) <= 0) > + if ((m = gzread(f, buf, BUFFER_SIZE)) == 0) > return 0; > > for (i = 0; i < m; i++) > - if (!okchar(buf[i])) > + if (!isprint(buf[i]) && !isspace(buf[i]) && > + buf[i] != line_endchar) > return 1; > > gzrewind(f); --
Attachment:
pgp8NTyAo1Rxz.pgp
Description: PGP signature