mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-26 16:18:31 +00:00
Don't write escape newlines with `l' command (SUSv3)
This commit is contained in:
parent
30d6b8e113
commit
e307a7a172
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98085
@ -490,11 +490,11 @@ lputs(s)
|
||||
if (isprint((unsigned char)*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);
|
||||
|
Loading…
Reference in New Issue
Block a user