diff options
author | tjr <tjr@FreeBSD.org> | 2002-06-22 03:00:52 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-06-22 03:00:52 +0000 |
commit | 98aa149b31a7845e8d1f7935bdb2b28e695a85d6 (patch) | |
tree | 7174e3cc93b752e21ad3b1f6e138b3c60b9c9361 | |
parent | 8284d4b7d0c035d0f09495ffe670c7ef3d98eebe (diff) | |
download | FreeBSD-src-98aa149b31a7845e8d1f7935bdb2b28e695a85d6.zip FreeBSD-src-98aa149b31a7845e8d1f7935bdb2b28e695a85d6.tar.gz |
Now that the pattern space contains no trailing newline, modify the `l'
command's output so it's the same as what SUSv3 specifies.
-rw-r--r-- | usr.bin/sed/process.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index 6c14631..17f543d 100644 --- a/usr.bin/sed/process.c +++ b/usr.bin/sed/process.c @@ -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))) { |