Now that the pattern space contains no trailing newline, modify the `l'

command's output so it's the same as what SUSv3 specifies.
This commit is contained in:
Tim J. Robbins 2002-06-22 03:00:52 +00:00
parent 6afa779308
commit 5953156dca

View File

@ -491,7 +491,11 @@ lputs(s)
if (isprint((unsigned char)*s) && *s != '\\') {
(void)putchar(*s);
count++;
} else if (*s != '\n') {
} else if (*s == '\n') {
(void)putchar('$');
(void)putchar('\n');
count = 0;
} else {
escapes = "\\\a\b\f\r\t\v";
(void)putchar('\\');
if ((p = strchr(escapes, *s))) {