Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Feb 2025 18:33:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 284434] ed(1) special replacement with "%" doesn't quite match with man-page
Message-ID:  <bug-284434-227-EXW3fmyQl2@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-284434-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284434

Martin Neitzel <neitzel@marshlabs.gaertner.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |neitzel@marshlabs.gaertner.
                   |                            |de

--- Comment #3 from Martin Neitzel <neitzel@marshlabs.gaertner.de> ---
Created attachment 257169
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=257169&action=edit
Corrected, tested, working patch for ed "%" recognition.

This is a tested, working patch based on Tim's prior suggestions.
It uses the proper line end and keeps the lines <80 cols.

I couldn't really decide regarding the "c=" optimization -- it makes the code
more difficult to read and I'd expect a compiler's CSE to optimize this anyway.

A side-note on the side-note: the behaviour that a "s/old/new/" including the
trailing delimiter is silent but an omitted trailing delimiter ("s/old/new")
effects the resulting line to be printed (as with "/p") is intended,
documented, and even POSIXly mandated.

FWIW:  as of now, the current OpenBSD, NetBSD and DragonflyBSD brethren suffer
from the same bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-284434-227-EXW3fmyQl2>