Date: Fri, 17 May 2002 10:40:04 -0700 (PDT) From: "J. Mallett" <jmallett@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: standards/38195: sed(1)'s process.c does not correctly append lines of input. Message-ID: <200205171740.g4HHe4GJ013198@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205171740.g4HHe4GJ013198>