From deba7db48c7897a6302d3d706887bbddc3604c00 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 11 Mar 1997 13:43:33 +0000 Subject: Merge from Lite2 --- usr.bin/col/col.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.bin/col/col.c') diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c index 37dc304..e911688 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 @@ -49,6 +49,7 @@ static char sccsid[] = "@(#)col.c 8.3 (Berkeley) 4/2/94"; #include #include #include +#include #include #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++; -- cgit v1.1