bug-ed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ed] Two more buglets


From: alm
Subject: Re: [Bug-ed] Two more buglets
Date: Sun, 10 Apr 2011 01:31:21 -0700
User-agent: SquirrelMail/1.4.20

*BSD ed (* = Free|Net|Open|Dragonflyt) and GNU ed 0.2 are essentially the
same.    GNU ed 0.2 has an annoying print command and has some buffer
overruns.  That is the only difference, as I recall.  They were written
before wide character support in regex(3), so support for regular
expressions containing NULs was not implemented, but otherwise work if
linked against a recent regex(3).

I'm not sure what to say about the current version of GNU ed other than
avoid it.

If you are interested in original sources, you might look at The Heirloom
Project on sourceforge.net: <http://heirloom.sourceforge.net/>.  It
appears that ed is derived from UNIX/32V (DEC port of 7th Edition) with
UTF-8 support added.

If you are interested in SUSv3-compliant source which was intended  as GNU
ed 0.3, I intend to post these shortly on github.
-AM

> On 8 April 2011 17:23, John Cowan <address@hidden> wrote:
>>> Searching for NUL characters using /^@/ matches any line, whether or
>>> not it contains NULs.
>>> and you can't all eliminate NUL characters with 1,$s/^@//g  (that's a
>>> NUL there, control-V address@hidden  There doesn't seem to be a syntax for
>>> control characters other than \n and its friend)
>>
>> Ed is meant to edit text files, not arbitrary binary files, and NUL
>> should not appear in text files, as it has no textual meaning.
>
> I agree. Drop binary file support from GNU ed?
> Would that upset anyone?
>
> However BSD ed, which I presume is derived from the original sources, if
> you
> $ ed /bun/ls
> w ls
> q
> $
> you get an identical file, wthout aby newline-adding nonsense :)
>
>    M
>
> _______________________________________________
> bug-ed mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-ed
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]