From owner-freebsd-bugs Wed May 22 00:39:28 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA25638 for bugs-outgoing; Wed, 22 May 1996 00:39:28 -0700 (PDT) Received: from ghpc6.ihf.rwth-aachen.de (ghpc6.ihf.RWTH-Aachen.DE [134.130.90.6]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA25627 for ; Wed, 22 May 1996 00:39:07 -0700 (PDT) Received: (from thomas@localhost) by ghpc6.ihf.rwth-aachen.de (8.6.12/8.6.9) id JAA13206 for bugs@freebsd.org; Wed, 22 May 1996 09:38:57 +0200 From: Thomas Gellekum Message-Id: <199605220738.JAA13206@ghpc6.ihf.rwth-aachen.de> Subject: ed(1) output on stderr or stdout? To: bugs@freebsd.org Date: Wed, 22 May 1996 09:38:56 +0200 (MET DST) Organization: Institut f. Hochfrequenztechnik, RWTH Aachen X-Mailer: ELM [version 2.4ME+ PL11 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Moin moin, some of the tests in the pdksh port failed. Michael Rendell, the current maintainer of pdksh, told me the following: > history-ed-1..3 > FreeBSD's ed writes the byte counts to standard error instead > of standard output. Most eds write it to stdout (which is what > posix says it should do). Again, I can't do much to fix this... The following patch fixes this: --- bin/ed/io.c.orig Tue May 21 19:23:38 1996 +++ bin/ed/io.c Tue May 21 19:52:49 1996 @@ -58,7 +58,7 @@ sprintf(errmsg, "cannot close input file"); return ERR; } - fprintf(stderr, !scripted ? "%lu\n" : "", size); + fprintf(stdout, !scripted ? "%lu\n" : "", size); return current_addr - n; } @@ -173,7 +173,7 @@ sprintf(errmsg, "cannot close output file"); return ERR; } - fprintf(stderr, !scripted ? "%lu\n" : "", size); + fprintf(stdout, !scripted ? "%lu\n" : "", size); return n ? m - n + 1 : 0; } I'd like to commit this if there are no objections. tg