delorie.com/archives/browse.cgi | search |
From: | pavenis AT lanet DOT lv |
To: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>, |
"Juan Manuel Guerrero" <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De> | |
Date: | Fri, 7 Sep 2001 20:42:14 +0300 |
MIME-Version: | 1.0 |
Subject: | Re: Problem with sed3028b.zip |
Cc: | djgpp-workers AT delorie DOT com |
Message-ID: | <3B993126.31880.6454B5@localhost> |
In-reply-to: | <6480-Fri07Sep2001174153+0300-eliz@is.elta.co.il> |
References: | <6745033395E AT HRZ1 DOT hrz DOT tu-darmstadt DOT de> (ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De) |
X-mailer: | Pegasus Mail for Win32 (v4.0, beta 40) |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On 7 Sep 2001 at 17:41, Eli Zaretskii wrote: > > From: "Juan Manuel Guerrero" <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De> > > Date: Fri, 7 Sep 2001 14:43:28 +0200 > > > > Only FYI: I have used the following very naive test file: > > > > bar\ > > foo\ > > bar > > > > and run the sed command: > > > > "s/bar/rab/;s/foo/oof/" > > > > I have inspected the produced file with a hex-editor. The file > > is completely ok. Especially, all backslashes are followed *only* > > by CR LF. This is independent of the EOL used in the source file. > > The code I wrote to remove CRs only if followed by an LF might have > some obscure bug, that only raises its ugly head in some rare > situation, like when the CR character is the last one in the buffer > (and Sed needs to look ahead to see if there's an LF after it). The > logic there is pretty tricky. I will take another look, but don't > hold your breath: I usually don't find obscure bugs by just looking at > the code. So I agree a small test case that reproduces this would be > useful: there's nothing like GDB to find such bugs. It looks very like that. I rebuilt gcc yesterday after some small modifications (regenerated DJGPP source archive and was not able to reproduce that). The afected line was really only passed through sed without modifications that time. Andris
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |