From owner-freebsd-current@FreeBSD.ORG Sun Jun 24 16:21:39 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 74F5416A41F for ; Sun, 24 Jun 2007 16:21:39 +0000 (UTC) (envelope-from sean-freebsd@farley.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 3B58D13C469 for ; Sun, 24 Jun 2007 16:21:39 +0000 (UTC) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l5OGMbvE083957; Sun, 24 Jun 2007 11:22:37 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Date: Sun, 24 Jun 2007 11:21:12 -0500 (CDT) From: "Sean C. Farley" To: Gabor Kovesdan In-Reply-To: <467C45C7.6020401@FreeBSD.org> Message-ID: <20070624105011.R44958@thor.farley.org> References: <20070622210119.GA4186@clamps.exit2shell.com> <467C45C7.6020401@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on mail.farley.org Cc: freebsd-current@freebsd.org, Steven Kreuzer Subject: Re: Port of OpenBSD's sdiff X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2007 16:21:39 -0000 On Fri, 22 Jun 2007, Gabor Kovesdan wrote: > Hello Steven, > > these are very good news! You might also want to take a look at > textproc/bsddiff, textproc/bsdgrep and textproc/bsdsort. These are the > BSD-licensed text processing tools from OpenBSD, I have been looking at freegrep (original source of OpenBSD's grep) off and on for years. Here[1] is where I proposed it for FreeBSD awhile ago. This is the patch[2] (part of OpenBSD's grep) I wrote for speeding up non-regex related searches. I am interested in fixing it up to be worthy for inclusion. Here are a few important issues with it: 1. Not multi-byte tested that I know. 2. Uses mmap() instead of read() for scanning a file. This makes it a bit slower than GNU's grep. OTOH, it makes the code much simpler. 3. fgrep examines each expression in turn. It should use something like a tree to consolidate the expressions if possible. Sean 1. http://lists.freebsd.org/pipermail/freebsd-hackers/2003-June/001612.html 2. http://www.farley.org/?page=software#freegrep -- sean-freebsd@farley.org