Port of OpenBSD's sdiff

Xin LI delphij at delphij.net
Mon Jun 25 00:54:00 UTC 2007

Gavin Atkinson wrote:
> On Sun, 24 Jun 2007, Sean C. Farley wrote:
>> On Fri, 22 Jun 2007, Gabor Kovesdan wrote:
>>> 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,
>> <snip>
>> I have been looking at freegrep (original source of OpenBSD's grep) off
>> and on for years.
> ... and I've been looking at patch(1).  FreeBSD's is currently under GNU
> license, because one of the files (backupfile.c) is.  NetBSD have a
> slightly earlier version of this, covered by the BSD license.  I've yet
> to sit down and compare functionality in depth, but initial testing has
> shown there's little difference in functionality.

It might be more interesting to take a look at our regular expression
library as well.  IMHO it should be either optimized or replaced by
another implementation which is standard conform.

Our current implementation is slower than many other implementation,
especially the BSD licensed PCRE.  This has in turn made a lot of our
utilities slow.  For instance sed -e 's/^foo [0-9]{3} bar.+$/\1/g' seems
to use O(N^2) time where N is the text being processed.


More information about the freebsd-current mailing list