From owner-freebsd-hackers Tue Feb 28 13:47:06 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id NAA08084 for hackers-outgoing; Tue, 28 Feb 1995 13:47:06 -0800 Received: from gvr.win.tue.nl (root@gvr.win.tue.nl [131.155.210.19]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id NAA08078 for ; Tue, 28 Feb 1995 13:47:01 -0800 Received: by gvr.win.tue.nl (8.6.10/1.53) id WAA06798; Tue, 28 Feb 1995 22:46:50 +0100 From: guido@gvr.win.tue.nl (Guido van Rooij) Message-Id: <199502282146.WAA06798@gvr.win.tue.nl> Subject: sh patch To: FreeBSD-hackers@freefall.cdrom.com (FreeBSD-hackers) Date: Tue, 28 Feb 1995 22:46:49 +0100 (MET) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 580 Sender: hackers-owner@FreeBSD.org Precedence: bulk I mailed this patch to current. If noone objects, I'll commit it to the source tree. (I've been running this sh for some time now without problems). It solves the problme that not all trailing newlines in a backquote expansion are deleted. this breaks my Pnews bersion. -Guido --- /usr/src/bin/sh/expand.c.orig Sat Sep 24 04:57:34 1994 +++ /usr/src/bin/sh/expand.c Sun Feb 26 21:06:38 1995 @@ -402,8 +402,10 @@ STPUTC(lastc, dest); } } - if (lastc == '\n') { + p--; + while (lastc == '\n') { STUNPUTC(dest); + lastc = *--p; } if (in.fd >= 0) close(in.fd);