From owner-freebsd-standards Fri May 17 10:50:14 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 64AD237B40F for ; Fri, 17 May 2002 10:50:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4HHo1K53238; Fri, 17 May 2002 10:50:01 -0700 (PDT) (envelope-from gnats) Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117]) by hub.freebsd.org (Postfix) with ESMTP id 2429937B410 for ; Fri, 17 May 2002 10:40:05 -0700 (PDT) Received: from www.freebsd.org (localhost [127.0.0.1]) by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g4HHe5hG013199 for ; Fri, 17 May 2002 10:40:05 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.2/8.12.2/Submit) id g4HHe4GJ013198; Fri, 17 May 2002 10:40:04 -0700 (PDT) Message-Id: <200205171740.g4HHe4GJ013198@www.freebsd.org> Date: Fri, 17 May 2002 10:40:04 -0700 (PDT) From: "J. Mallett" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: standards/38195: sed(1)'s process.c does not correctly append lines of input. Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >Number: 38195 >Category: standards >Synopsis: sed(1)'s process.c does not correctly append lines of input. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 17 10:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: J. Mallett >Release: HEAD >Organization: FreeBSD >Environment: ... >Description: FreeBSD's sed(1) is incompatible with its handling of the G and H commands because it does not explicitly append newlines when appending a line of input, it relies on them just "popping up" because we use fgetln to get lines of input. This relates to appending the hold or pattern space. >How-To-Repeat: (echo 1; echo 2; echo 3; echo 4) | sed '1,2H;2,3G' with our sed(1), and GNU's, and SysV's. >Fix: Create a function to append a line to a given space, instead of using cspace, and have it do the correct thing. Possibly, NUL-terminate at the newline when using fgetln(3) at mf_gets. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message