From owner-freebsd-hackers Tue Jul 27 5:41:21 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from news.itfs.nsk.su (news.itfs.nsk.su [212.20.32.45]) by hub.freebsd.org (Postfix) with ESMTP id 970D914D23 for ; Tue, 27 Jul 1999 05:41:14 -0700 (PDT) (envelope-from nnd@news.itfs.nsk.su) Received: (from nnd@localhost) by news.itfs.nsk.su (8.9.2/8.9.2) id TAA36462; Tue, 27 Jul 1999 19:39:05 +0700 (NSS) (envelope-from nnd) Date: Tue, 27 Jul 1999 19:39:05 +0700 (NSS) From: "Nickolay N. Dudorov" Message-Id: <199907271239.TAA36462@news.itfs.nsk.su> To: hackers@freebsd.org Subject: Re: replacing grep(1) In-Reply-To: User-Agent: tin/pre-1.4-980818 ("Laura") (UNIX) (FreeBSD/3.1-STABLE (i386)) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In Dag-Erling Smorgrav wrote: > Jamie Howard (howardjp@wam.umd.edu), with a little help from yours > truly, has written a BSD-licensed version of grep(1) which has all the > functionality of our current (GPLed) implementation, plus a little > more, in one seventh the source code and one fourth the binary code. > What's more, the code is actually possible for mere mortals to read > and understand. > The source code is available for download from freefall: > > I move that we replace GNU grep in our source tree with this > implementation, once it's been reviewed by all concerned parties. Unfortunately abovementioned grep-0.7.tar.gz is broken. After making it on the CURRENT system I can only see: grep: filename: Undefined error: 0 for every filename. This caused by very "unusual" return values for 'grep_open' (and other '..._open') function which is declared as 'int' (and return int result) and compared with NULL ;-( I prefer not to include the patch for this because I am uncompatible with such trics as: return ((f = fopen(path, mode)) != NULL) - 1; N.Dudorov To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message