Use errx(). .Nm fixes
This commit is contained in:
parent
bbacd6e9e3
commit
b09393ce42
@ -59,7 +59,7 @@ and
|
|||||||
reads from the standard input and writes to the standard output.
|
reads from the standard input and writes to the standard output.
|
||||||
.Pp
|
.Pp
|
||||||
The options are as follows:
|
The options are as follows:
|
||||||
.Bl -tag -width "-l num "
|
.Bl -tag -width indent
|
||||||
.It Fl b
|
.It Fl b
|
||||||
Do not output any backspaces, printing only the last character
|
Do not output any backspaces, printing only the last character
|
||||||
written to each column position.
|
written to each column position.
|
||||||
@ -77,7 +77,7 @@ By default, 128 lines are buffered.
|
|||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
The control sequences for carriage motion that
|
The control sequences for carriage motion that
|
||||||
.Nm col
|
.Nm
|
||||||
understands and their decimal values are listed in the following
|
understands and their decimal values are listed in the following
|
||||||
table:
|
table:
|
||||||
.Pp
|
.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.
|
sure the character set is correct when they are output.
|
||||||
.Pp
|
.Pp
|
||||||
If the input attempts to back up to the last flushed line,
|
If the input attempts to back up to the last flushed line,
|
||||||
.Nm col
|
.Nm
|
||||||
will display a warning message.
|
will display a warning message.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr expand 1 ,
|
.Xr expand 1 ,
|
||||||
@ -122,7 +122,7 @@ will display a warning message.
|
|||||||
.Xr tbl 1
|
.Xr tbl 1
|
||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
A
|
A
|
||||||
.Nm col
|
.Nm
|
||||||
command
|
command
|
||||||
appeared in
|
appeared in
|
||||||
.At v6 .
|
.At v6 .
|
||||||
|
@ -41,7 +41,11 @@ static const char copyright[] =
|
|||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#ifndef 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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -146,11 +150,8 @@ main(argc, argv)
|
|||||||
compress_spaces = 1;
|
compress_spaces = 1;
|
||||||
break;
|
break;
|
||||||
case 'l': /* buffered line count */
|
case 'l': /* buffered line count */
|
||||||
if ((max_bufd_lines = atoi(optarg)) <= 0) {
|
if ((max_bufd_lines = atoi(optarg)) <= 0)
|
||||||
(void)fprintf(stderr,
|
errx(1, "bad -l argument %s", optarg);
|
||||||
"col: bad -l argument %s.\n", optarg);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'x': /* do not compress spaces into tabs */
|
case 'x': /* do not compress spaces into tabs */
|
||||||
compress_spaces = 0;
|
compress_spaces = 0;
|
||||||
@ -537,8 +538,7 @@ void
|
|||||||
wrerr()
|
wrerr()
|
||||||
{
|
{
|
||||||
|
|
||||||
(void)fprintf(stderr, "col: write error.\n");
|
errx(1, "write error");
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user