From 3e7ae69f2ab00d5eba540c1929d0b87222b4870e Mon Sep 17 00:00:00 2001 From: Philippe Charnier Date: Mon, 25 Aug 1997 06:36:04 +0000 Subject: Use err(3). Nm vgrind -> Nm in man page. --- usr.bin/vgrind/vfontedpr.c | 17 ++++++++++------- usr.bin/vgrind/vgrind.1 | 16 ++++++++-------- 2 files changed, 18 insertions(+), 15 deletions(-) (limited to 'usr.bin/vgrind') diff --git a/usr.bin/vgrind/vfontedpr.c b/usr.bin/vgrind/vfontedpr.c index b471044327ce..fd812b0791e4 100644 --- a/usr.bin/vgrind/vfontedpr.c +++ b/usr.bin/vgrind/vfontedpr.c @@ -32,22 +32,27 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint +#if 0 static char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include #include -#include #include +#include +#include #include #include -#include +#include #include "pathnames.h" #include "extern.h" @@ -211,10 +216,8 @@ main(argc, argv) } /* open the file for input */ - if (freopen(argv[0], "r", stdin) == NULL) { - perror(argv[0]); - exit(1); - } + if (freopen(argv[0], "r", stdin) == NULL) + err(1, "%s", argv[0]); if (idx) printf("'ta 4i 4.25i 5.5iR\n'in .5i\n"); fname = argv[0]; diff --git a/usr.bin/vgrind/vgrind.1 b/usr.bin/vgrind/vgrind.1 index a866103b7ea9..045d5cccfee0 100644 --- a/usr.bin/vgrind/vgrind.1 +++ b/usr.bin/vgrind/vgrind.1 @@ -38,7 +38,7 @@ .Nm vgrind .Nd grind nice listings of programs .Sh SYNOPSIS -.Nm vgrind +.Nm .Op Fl .Op Fl W .Op Fl d Ar file @@ -64,7 +64,7 @@ page as it is encountered. runs in two basic modes, filter mode (see the .Fl f option) or regular mode. In filter mode -.Nm vgrind +.Nm acts as a filter in a manner similar to .Xr tbl 1 . The standard input is passed directly to the standard output except @@ -87,14 +87,14 @@ or .Xr tbl 1 . .Pp In regular mode -.Nm vgrind +.Nm accepts input files, processes them, and passes them to the postprocessor for output, .Xr psroff 1 by default. .Pp In both modes -.Nm vgrind +.Nm passes any lines beginning with a decimal point without conversion. .Pp The options are: @@ -161,13 +161,13 @@ causing formatted text to go to the standard output .It Fl x outputs the index file in a ``pretty'' format. The index file itself is produced whenever -.Nm vgrind +.Nm is run with a file called .Pa index in the current directory. The index of function definitions can then be run off by giving -.Nm vgrind +.Nm the .Fl x option and the file @@ -213,10 +213,10 @@ name comment mechanisms will fail. .Pp More generally, arbitrary formatting styles for programs mostly look bad. The use of spaces to align source code fails miserably; if you plan to -.Nm vgrind +.Nm your program you should use tabs. This is somewhat inevitable since the font used by -.Nm vgrind +.Nm is variable width. .Pp The mechanism of -- cgit v1.2.3