diff options
author | 1999-06-06 15:42:24 +0000 | |
---|---|---|
committer | 1999-06-06 15:42:24 +0000 | |
commit | 3107710bb3c38f83e7f26e1eed0ffed25d089037 (patch) | |
tree | e27a82c920da23cd65c7821286b5a98d7357f7e0 /usr.bin/sed/process.c | |
parent | use __sparc__ (diff) | |
download | wireguard-openbsd-3107710bb3c38f83e7f26e1eed0ffed25d089037.tar.xz wireguard-openbsd-3107710bb3c38f83e7f26e1eed0ffed25d089037.zip |
make G newline if hold is empty
Diffstat (limited to 'usr.bin/sed/process.c')
-rw-r--r-- | usr.bin/sed/process.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index 7741fe288cb..8988b48acf6 100644 --- a/usr.bin/sed/process.c +++ b/usr.bin/sed/process.c @@ -1,4 +1,4 @@ -/* $OpenBSD: process.c,v 1.4 1998/04/30 06:21:16 deraadt Exp $ */ +/* $OpenBSD: process.c,v 1.5 1999/06/06 15:42:24 deraadt Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -39,7 +39,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)process.c 8.1 (Berkeley) 6/6/93"; */ -static char *rcsid = "$OpenBSD: process.c,v 1.4 1998/04/30 06:21:16 deraadt Exp $"; +static char *rcsid = "$OpenBSD: process.c,v 1.5 1999/06/06 15:42:24 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -146,6 +146,8 @@ redirect: cspace(&PS, hs, hsl, REPLACE); break; case 'G': + if (hs == NULL) + cspace(&HS, "\n", 1, REPLACE); cspace(&PS, hs, hsl, 0); break; case 'h': |