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:
parent
6afa779308
commit
5953156dca
@ -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))) {
|
||||
|
Loading…
Reference in New Issue
Block a user