diff options
author | charnier <charnier@FreeBSD.org> | 2000-03-26 14:23:23 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 2000-03-26 14:23:23 +0000 |
commit | d7faf524e18f7439e93c084bc62dcec309c9b2db (patch) | |
tree | 34e7c096ef2b493849e25c9d375da0708aaaad95 | |
parent | f717c07c8ab962df0e0a56b28e7f917c1b89dd1a (diff) | |
download | FreeBSD-src-d7faf524e18f7439e93c084bc62dcec309c9b2db.zip FreeBSD-src-d7faf524e18f7439e93c084bc62dcec309c9b2db.tar.gz |
Use errx(). .Nm fixes
-rw-r--r-- | usr.bin/col/col.1 | 8 | ||||
-rw-r--r-- | usr.bin/col/col.c | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/col/col.1 b/usr.bin/col/col.1 index afd9c27..45da8f2 100644 --- a/usr.bin/col/col.1 +++ b/usr.bin/col/col.1 @@ -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 . diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c index 8d26faa..0d78d70 100644 --- a/usr.bin/col/col.c +++ b/usr.bin/col/col.c @@ -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 |