mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
Use errx(). .Nm fixes
This commit is contained in:
parent
884bd44c59
commit
a292105ac8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58602
@ -59,7 +59,7 @@ and
|
||||
reads from the standard input and writes to the standard output.
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width "-l num "
|
||||
.Bl -tag -width indent
|
||||
.It Fl b
|
||||
Do not output any backspaces, printing only the last character
|
||||
written to each column position.
|
||||
@ -77,7 +77,7 @@ By default, 128 lines are buffered.
|
||||
.El
|
||||
.Pp
|
||||
The control sequences for carriage motion that
|
||||
.Nm col
|
||||
.Nm
|
||||
understands and their decimal values are listed in the following
|
||||
table:
|
||||
.Pp
|
||||
@ -114,7 +114,7 @@ keeps track of the character set as characters are read and makes
|
||||
sure the character set is correct when they are output.
|
||||
.Pp
|
||||
If the input attempts to back up to the last flushed line,
|
||||
.Nm col
|
||||
.Nm
|
||||
will display a warning message.
|
||||
.Sh SEE ALSO
|
||||
.Xr expand 1 ,
|
||||
@ -122,7 +122,7 @@ will display a warning message.
|
||||
.Xr tbl 1
|
||||
.Sh HISTORY
|
||||
A
|
||||
.Nm col
|
||||
.Nm
|
||||
command
|
||||
appeared in
|
||||
.At v6 .
|
||||
|
@ -41,7 +41,11 @@ static const char copyright[] =
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
static const char sccsid[] = "@(#)col.c 8.5 (Berkeley) 5/4/95";
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)col.c 8.5 (Berkeley) 5/4/95";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <ctype.h>
|
||||
@ -146,11 +150,8 @@ main(argc, argv)
|
||||
compress_spaces = 1;
|
||||
break;
|
||||
case 'l': /* buffered line count */
|
||||
if ((max_bufd_lines = atoi(optarg)) <= 0) {
|
||||
(void)fprintf(stderr,
|
||||
"col: bad -l argument %s.\n", optarg);
|
||||
exit(1);
|
||||
}
|
||||
if ((max_bufd_lines = atoi(optarg)) <= 0)
|
||||
errx(1, "bad -l argument %s", optarg);
|
||||
break;
|
||||
case 'x': /* do not compress spaces into tabs */
|
||||
compress_spaces = 0;
|
||||
@ -537,8 +538,7 @@ void
|
||||
wrerr()
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "col: write error.\n");
|
||||
exit(1);
|
||||
errx(1, "write error");
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user