diff options
author | 2008-10-07 21:51:37 +0000 | |
---|---|---|
committer | 2008-10-07 21:51:37 +0000 | |
commit | f20e4c276db4323b0f66040591b9bc8f6be35132 (patch) | |
tree | 8628724e35a66852f73a736edc00ac1c7af57772 /usr.bin/sed/process.c | |
parent | Make sure page 0 is selected when we initialize the PHY. Fixes problems (diff) | |
download | wireguard-openbsd-f20e4c276db4323b0f66040591b9bc8f6be35132.tar.xz wireguard-openbsd-f20e4c276db4323b0f66040591b9bc8f6be35132.zip |
The 'l' command should not encode newlines. Also document that
backspace is escaped as \b. OK phessler@ and jmc@
Diffstat (limited to 'usr.bin/sed/process.c')
-rw-r--r-- | usr.bin/sed/process.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index 9d83e6d0c56..8c898647e45 100644 --- a/usr.bin/sed/process.c +++ b/usr.bin/sed/process.c @@ -1,4 +1,4 @@ -/* $OpenBSD: process.c,v 1.13 2006/10/09 00:23:57 tedu Exp $ */ +/* $OpenBSD: process.c,v 1.14 2008/10/07 21:51:37 millert Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -35,7 +35,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)process.c 8.1 (Berkeley) 6/6/93"; */ -static const char rcsid[] = "$OpenBSD: process.c,v 1.13 2006/10/09 00:23:57 tedu Exp $"; +static const char rcsid[] = "$OpenBSD: process.c,v 1.14 2008/10/07 21:51:37 millert Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -481,11 +481,11 @@ lputs(char *s) if (isascii(*s) && isprint(*s) && *s != '\\') { (void)putchar(*s); count++; - } else { - escapes = "\\\a\b\f\n\r\t\v"; + } else if (*s != '\n') { + escapes = "\\\a\b\f\r\t\v"; (void)putchar('\\'); if ((p = strchr(escapes, *s))) { - (void)putchar("\\abfnrtv"[p - escapes]); + (void)putchar("\\abfrtv"[p - escapes]); count += 2; } else { (void)printf("%03o", *(u_char *)s); |