Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Sep 2002 17:42:00 +0900
From:      "Akinori MUSHA" <knu@iDaemons.org>
To:        David O'Brien <obrien@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/gnu/usr.bin/grep Makefile grep.1 grep.c
Message-ID:  <86wupj1yg7.wl@archon.local.idaemons.org>
In-Reply-To: <20020918001657.GA6110@dragon.nuxi.com>
References:  <200209160427.g8G4RUom036315@freefall.freebsd.org> <86ofayjsdr.wl@archon.local.idaemons.org> <86y9a05ip4.wl@archon.local.idaemons.org> <20020918001657.GA6110@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At Tue, 17 Sep 2002 17:16:57 -0700,
o`brien wrote:
> 
> On Wed, Sep 18, 2002 at 07:56:23AM +0900, Akinori MUSHA wrote:
> >  2. Unlike gzread(), BZ2_bzread() does not work against a non-bzip2ed
> >     stream. (I guess BZ2_bzread() should be fixed in future because
> >     it claims to be compatible with gzread())
> > 
> > The attached patch should fix them and make `grep -J foo foo.bz2' work
> > just as expected.

Your code also have a flaw when both -Z and -J are specified.  I think
BZflag and Zflag should be made mutually exclusive, or preferably
bzlib should be tweaked to have the ability to fall back onto zlib if
a stream is not bzip2ed. (Then -J could be just obsoleted)

> This isn't working for me with your patch:
> 
> ''grep -J Berk COPYRIGHT'' gives nothing.

Adding:
	lseek (bufdesc, 0, SEEK_SET);
right after the	BZ2_bzReadClose() call should fix that.

> Also amusing is that our zgrep won't read .Z files.

Hrm, who would care.. ;)

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"When I leave I don't know what I'm hoping to find
              When I leave I don't know what I'm leaving behind.."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86wupj1yg7.wl>