diff options
author | peter <peter@FreeBSD.org> | 1997-03-11 13:08:12 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-03-11 13:08:12 +0000 |
commit | dc74a95b3c87ac7e618302b89dfff6205c05cfc0 (patch) | |
tree | fbec41ef52ae0a75c11b7d0680ed9332a01d7335 /usr.bin/uniq/uniq.c | |
parent | 2083e11126e9022e069b7be58976843f8e734a2d (diff) | |
parent | 297505f8fa9ec32b558f82504c27404854c3e313 (diff) | |
download | FreeBSD-src-dc74a95b3c87ac7e618302b89dfff6205c05cfc0.zip FreeBSD-src-dc74a95b3c87ac7e618302b89dfff6205c05cfc0.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r23690,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'usr.bin/uniq/uniq.c')
-rw-r--r-- | usr.bin/uniq/uniq.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 <errno.h> @@ -49,6 +49,7 @@ static char sccsid[] = "@(#)uniq.c 8.1 (Berkeley) 6/6/93"; #include <ctype.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #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); |