From owner-cvs-gnu Sat Dec 20 10:49:44 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA04012 for cvs-gnu-outgoing; Sat, 20 Dec 1997 10:49:44 -0800 (PST) (envelope-from owner-cvs-gnu) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA03989; Sat, 20 Dec 1997 10:49:22 -0800 (PST) (envelope-from wosch@FreeBSD.org) From: Wolfram Schneider Received: (from wosch@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id KAA29257; Sat, 20 Dec 1997 10:46:11 -0800 (PST) Date: Sat, 20 Dec 1997 10:46:11 -0800 (PST) Message-Id: <199712201846.KAA29257@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: cvs commit: src/gnu/usr.bin/grep Makefile grep.1 grep.c Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wosch 1997/12/20 10:46:10 PST Modified files: gnu/usr.bin/grep Makefile grep.1 grep.c Log: Added builtin decompression using zlib library, option -Z. Enabled this new feature with the makefile variable GREP_LIBZ. If you don't like it, compile with `make GREP_LIBZ='. grep + zlib has several advantages: - the shell script zgrep(1) will be basically a one line exec grep -Z "$@" - no shell script, no bugs. The current zgrep implementations have many bugs and some grep options are no supported. - no shell script, no security risks. - it is a magnitude faster than a shell script Also fixed: 0 -> STDIN_FILENO Close a file descriptor only if the open call was successfully. It does not hurt for the open(2) function, but the gzclose(3) function died in free() to free up (not) allocated memory. Revision Changes Path 1.10 +15 -1 src/gnu/usr.bin/grep/Makefile 1.5 +11 -5 src/gnu/usr.bin/grep/grep.1 1.9 +106 -62 src/gnu/usr.bin/grep/grep.c