From owner-freebsd-standards@FreeBSD.ORG Wed Jun 4 19:47:40 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7123737B401; Wed, 4 Jun 2003 19:47:40 -0700 (PDT) Received: from smtp02.syd.iprimus.net.au (smtp02.syd.iprimus.net.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8F3B43FAF; Wed, 4 Jun 2003 19:47:39 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (210.50.40.234) by smtp02.syd.iprimus.net.au (7.0.015) id 3EDD5209000338D4; Thu, 5 Jun 2003 12:47:34 +1000 Received: by dilbert.robbins.dropbear.id.au (Postfix, from userid 1000) id 37E7CC90F; Thu, 5 Jun 2003 12:44:22 +1000 (EST) Date: Thu, 5 Jun 2003 12:44:22 +1000 From: Tim Robbins To: Tony Finch Message-ID: <20030605124421.A82856@dilbert.robbins.dropbear.id.au> References: <20030603144225.GH18938@chiark.greenend.org.uk> <20030603151925.GI18938@chiark.greenend.org.uk> <20030603211357.B70533@espresso.bsdmike.org> <20030604151553.GO18938@chiark.greenend.org.uk> <20030604104636.A88028@FreeBSD.org> <20030604155534.GQ18938@chiark.greenend.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030604155534.GQ18938@chiark.greenend.org.uk>; from dot@dotat.at on Wed, Jun 04, 2003 at 04:55:34PM +0100 cc: Juli Mallett cc: freebsd-standards@FreeBSD.org cc: Mike Barcroft Subject: Re: [PATCH] for review Re: Sed substitution bugs X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2003 02:47:40 -0000 On Wed, Jun 04, 2003 at 04:55:34PM +0100, Tony Finch wrote: > Solaris: > $ echo -n foo | sed y/o/O/ > sed: Missing newline at end of file standard input. > fOO > $ > > GNU: > $ echo -n foo | sed y/o/O/ > fOO$ > > GNU is clearly the right implementation, and it's what the regression > test says sed should do. I think sed should be fixed. (I can't do it > right now because I'm going climbing.) Your input is malformed. Making sed not store the newlines made it easier to fix a whole bunch of bugs, but made it harder to deal with this kind of malformed input in the traditional (for BSD) way. See sed/process.c rev. 1.21 and the PR's it mentions. Warning about missing newlines like Solaris sed does is probably a good idea; I'll see if I can do that. But I don't consider following the traditional BSD behaviour of not adding missing newlines to be a high priority. Tim