From nobody Fri Jan 17 19:17:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YZTyN4BPyz5lLqy; Fri, 17 Jan 2025 19:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YZTyN3h9kz3rFR; Fri, 17 Jan 2025 19:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737141452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ynJXIQJ0QzNKAIglvFCmu6DdX6ftsHqdMH0EjbBK7A=; b=GtN4WFpakAHLVdqJcI9pQqtQRdlMe+AWuh+53ZKYXczmsDSDmON4g4cDPqKoVuGn4ZDWPH AZRnrwE+XRwHitc6MKd2A/U2BnSY/Rv2Ssz4j2eewowu8Vmnt12FVMHEf7A2EWvUGMhjj6 hQWBxvFwwbhQ6/VJhEgbY/mklNVW2v1xS4+a2m3EwWR3HpSilKbr3k62oCLkjyf1xHYauW nr2SgNWigIKwoOo8NZv8rIQH/5K8pqGtaqz2/mMpmxnnJo50hU1OpYy2uMkTXZ9h6Dnrb2 OFuBOgtPiyuH6SOOgc6A/wVnh3IQwG8OuIf9FlKqqEDFAuNeHsXADiCWgiCfTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737141452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ynJXIQJ0QzNKAIglvFCmu6DdX6ftsHqdMH0EjbBK7A=; b=RxkxBvNE0h7r9Ioacja5KjlFBeyxTlbI+Ls1g2KpFtK9aWrIeWE2LyaHEPbycOPG/pL+w/ yJNiZd8hJI+JdgSrVQKO5hcTZXHh64Jkyuuz43j1m4I9qhaZi3iqD0+AHa5gAsTFRaczit JhL6ruX1hOZnprNZYfNlQt3ldM6Ttr26IZezvGOQbLeh6sNLUgE5dHLL47KB+EuyH4XImt lFcAOkJZtobIdj/vmF6/SPY0durASkoy6uW14EWIlpfkVUpbAm7IDOtCs9iQhkBNVZ9XAd W738q73HUSg3RPkrUm/sZ4fYe9O3PnypNSr6OGdYaH+kFp7E62smyjVvwgDKcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737141452; a=rsa-sha256; cv=none; b=s7OYOjwNpSv/gdmmVXLsxdf8AF/VWnuBEUpgRU0iKdpDK7GaQJFK7WDai2+MvzB6q0MLjT ANHkp6eBTBAnndmdq4s9LqiAZWdIy048uPFUOhBjwoqzb2xJYmFcLEd6b+F5hVAnNYhg7l D+ELBeCY0ln94LGz9rSXERJYENz8R4ZKO9BO/fsfhb93kueU03MF8MbdXbuzEwWiZXvUN6 mxk/PThdPRzlrnrD+rHKczUQsln1YrmyAla3jZKyw5WOR7LN7LAi7A9lnnPSOP4LmpTyCs JjLamUrTzzkmV7kY53eEC8fxI3z5CXm0ZaNnUXeLfT9U8QyvBvOQsgYJCA/Elg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YZTyN2sZ9zWYc; Fri, 17 Jan 2025 19:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50HJHW0U011361; Fri, 17 Jan 2025 19:17:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50HJHWa0011358; Fri, 17 Jan 2025 19:17:32 GMT (envelope-from git) Date: Fri, 17 Jan 2025 19:17:32 GMT Message-Id: <202501171917.50HJHWa0011358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3e2277276975 - stable/14 - sed: The change ("c") command should start a new cycle. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3e22772769757b31d2b9383b5f510d4e43afaa8b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3e22772769757b31d2b9383b5f510d4e43afaa8b commit 3e22772769757b31d2b9383b5f510d4e43afaa8b Author: Valeriy Ushakov AuthorDate: 2024-12-17 22:27:01 +0000 Commit: Mark Johnston CommitDate: 2025-01-17 18:48:07 +0000 sed: The change ("c") command should start a new cycle. The "c" command should start the next cycle as clarified in POSIX 2024. This is also consistent with historical and gnu sed behavior. This patch is from OpenBSD by way of NetBSD with a tweak to the man page date by me. Confirmed the test case in the bug now works. PR: 271817 Obtained from: NetBSD (1.39 uwe), OpenBSD (1.39 millert) Sponsored by: Netflix (cherry picked from commit a2d78713171cf138b5ae50d61f82df1af7574c95) --- usr.bin/sed/process.c | 2 +- usr.bin/sed/sed.1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index 945db462a601..e3f2bcab4881 100644 --- a/usr.bin/sed/process.c +++ b/usr.bin/sed/process.c @@ -137,7 +137,7 @@ redirect: psl = 0; if (cp->a2 == NULL || lastaddr || lastline()) (void)fprintf(outfile, "%s", cp->t); - break; + goto new; case 'd': pd = 1; goto new; diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1 index 29ede6d70230..90b23e2834de 100644 --- a/usr.bin/sed/sed.1 +++ b/usr.bin/sed/sed.1 @@ -30,7 +30,7 @@ .\" .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" -.Dd April 8, 2021 +.Dd December 17, 2024 .Dt SED 1 .Os .Sh NAME @@ -374,7 +374,7 @@ If the label is not specified, branch to the end of the script. .Pp .It [2addr]c\e .It text -Delete the pattern space. +Delete the pattern space and start the next cycle. With 0 or 1 address or at the end of a 2-address range, .Em text is written to the standard output.