diff options
author | Peter Wemm <peter@FreeBSD.org> | 1997-03-11 13:43:33 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1997-03-11 13:43:33 +0000 |
commit | df3f5d9dd51fa82a604ec559a75d3791a7b80ed5 (patch) | |
tree | b6c05d5088be1b1275d5422f8b002b9cd42ff1b7 /usr.bin/col | |
parent | 18dac96b7bf3831c3d8393ab93b391c2ca65e6a1 (diff) | |
download | src-df3f5d9dd51fa82a604ec559a75d3791a7b80ed5.tar.gz src-df3f5d9dd51fa82a604ec559a75d3791a7b80ed5.zip |
Merge from Lite2
Notes
Notes:
svn path=/head/; revision=23693
Diffstat (limited to 'usr.bin/col')
-rw-r--r-- | usr.bin/col/col.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c index 37dc3045c48b..e911688606b1 100644 --- a/usr.bin/col/col.c +++ b/usr.bin/col/col.c @@ -41,7 +41,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)col.c 8.3 (Berkeley) 4/2/94"; +static char sccsid[] = "@(#)col.c 8.5 (Berkeley) 5/4/95"; #endif /* not lint */ #include <ctype.h> @@ -49,6 +49,7 @@ static char sccsid[] = "@(#)col.c 8.3 (Berkeley) 4/2/94"; #include <string.h> #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include <locale.h> #define BS '\b' /* backspace */ @@ -299,6 +300,9 @@ main(argc, argv) l->l_max_col = cur_col; cur_col++; } + if (max_line == 0) + exit(0); /* no lines, so just exit */ + /* goto the last line that had a character on it */ for (; l->l_next; l = l->l_next) this_line++; |