From 297505f8fa9ec32b558f82504c27404854c3e313 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 11 Mar 1997 13:08:12 +0000 Subject: Import some parts of CSRG 4.4BSD-Lite2 usr.bin sources to fix tree build. --- usr.bin/uniq/uniq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin/uniq/uniq.c') diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index e84f82e..b2b85e1 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -41,7 +41,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)uniq.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)uniq.c 8.3 (Berkeley) 5/4/95"; #endif /* not lint */ #include @@ -49,6 +49,7 @@ static char sccsid[] = "@(#)uniq.c 8.1 (Berkeley) 6/6/93"; #include #include #include +#include #define MAXLINELEN (8 * 1024) @@ -171,7 +172,8 @@ show(ofp, str) FILE *ofp; char *str; { - if (cflag) + + if (cflag && *str) (void)fprintf(ofp, "%4d %s", repeats + 1, str); if (dflag && repeats || uflag && !repeats) (void)fprintf(ofp, "%s", str); -- cgit v1.1