Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/sed Fix bug pointed out by Jerry Peek <jpeek@jpeek.c...
details: https://anonhg.NetBSD.org/src/rev/0b8dc3421dc8
branches: trunk
changeset: 473363:0b8dc3421dc8
user: kim <kim%NetBSD.org@localhost>
date: Mon May 31 04:46:33 1999 +0000
description:
Fix bug pointed out by Jerry Peek <jpeek%jpeek.com@localhost> in PR bin/7674.
If hold space null when doing an 'G', make sure it contains a newline.
Fix copied from revision 1.17 where cgd applied a fix for 'x'.
diffstat:
usr.bin/sed/process.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 62f2642c4ee5 -r 0b8dc3421dc8 usr.bin/sed/process.c
--- a/usr.bin/sed/process.c Mon May 31 02:46:17 1999 +0000
+++ b/usr.bin/sed/process.c Mon May 31 04:46:33 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: process.c,v 1.24 1998/12/19 22:12:32 christos Exp $ */
+/* $NetBSD: process.c,v 1.25 1999/05/31 04:46:33 kim Exp $ */
/*-
* Copyright (c) 1992 Diomidis Spinellis.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)process.c 8.6 (Berkeley) 4/20/94";
#else
-__RCSID("$NetBSD: process.c,v 1.24 1998/12/19 22:12:32 christos Exp $");
+__RCSID("$NetBSD: process.c,v 1.25 1999/05/31 04:46:33 kim Exp $");
#endif
#endif /* not lint */
@@ -151,6 +151,8 @@
cspace(&PS, hs, hsl, REPLACE);
break;
case 'G':
+ if (hs == NULL)
+ cspace(&HS, "\n", 1, REPLACE);
cspace(&PS, hs, hsl, 0);
break;
case 'h':
Home |
Main Index |
Thread Index |
Old Index