diff options
author | 2016-07-01 22:40:44 +0000 | |
---|---|---|
committer | 2016-07-01 22:40:44 +0000 | |
commit | 55e223d9636347827cb9454b49f1833faec09861 (patch) | |
tree | 72dc733697f51b963b2270e91892eaa4ec1fcded | |
parent | Update and simplify the documentation of the -s option, (diff) | |
download | wireguard-openbsd-55e223d9636347827cb9454b49f1833faec09861.tar.xz wireguard-openbsd-55e223d9636347827cb9454b49f1833faec09861.zip |
For -be, indent the $ on blank lines.
Patch from Giles Lean (NetBSD PR bin/4841), tweaked by kleink at
NetBSD (rev. 1.17 1998-01-27), version for OpenBSD sent in by Sevan
Janiyan <venture37 at geeklan dot co dot uk>.
OK deraadt@
-rw-r--r-- | bin/cat/cat.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/bin/cat/cat.c b/bin/cat/cat.c index a663dec5ef4..c7de6125ec8 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cat.c,v 1.24 2015/11/04 21:28:01 tedu Exp $ */ +/* $OpenBSD: cat.c,v 1.25 2016/07/01 22:40:44 schwarze Exp $ */ /* $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $ */ /* @@ -153,10 +153,16 @@ cook_buf(FILE *fp) } else gobble = 0; } - if (nflag && (!bflag || ch != '\n')) { - (void)fprintf(stdout, "%6d\t", ++line); - if (ferror(stdout)) - break; + if (nflag) { + if (!bflag || ch != '\n') { + (void)fprintf(stdout, "%6d\t", ++line); + if (ferror(stdout)) + break; + } else if (eflag) { + (void)fprintf(stdout, "%6s\t", ""); + if (ferror(stdout)) + break; + } } } if (ch == '\n') { |