🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Tapani Tarvainen Fri, 20 Oct 1989 14:51
sed fixes
#519
Author: Tapani Tarvainen
Date: Fri, 20 Oct 1989 14:51
26 lines
1962 bytes
(1) '^' and '$' in regexps weren't handled correctly when pattern
space contains embedded newlines: They should match only the beginning
and end of the pattern space, not positions after/before embedded
newlines.  Fixing this required a (fairly small) change in regex.c and
regex.h (yet another option flag in obscure_syntax ... ).

(2) 'N' and 'n' didn't work correctly with multiple files (if it's some
comfort they don't in SunOS 4.0 sed either).  Fixing this required
rearranging input file handling considerably, but now I think it works
as it should (i.e., "sed 'script' files" is exactly equivalent with
"cat files | sed 'script').  Incidentally, I've begun to have second
thoughts about my earlier fix to 'N' (in addition to the fact that it
made multiple file handling even worse than it used to be):  
What should 'N' do at EOF?  Nothing (and carry on with the script),
or quit (skip rest of the script, like 'n' does)?


I'm not posting any diffs any more, because I suspect diffs from my
own previous version wouldn't be useful to anybody (has somebody 
faithfully applied them all?) and diffs from 1.06 have grown so
big they'd just waste bandwidth.  Instead I've put the whole package
available via anonymous ftp from tukki.jyu.fi (128.214.7.5), in 
directory ~ftp/pub/sed.  If you can't get it from there (don't have
ftp access or whatever) drop me mail.
-- 
Tapani Tarvainen    (tarvaine@tukki.jyu.fi, tarvainen@finjyu.bitnet)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads