Use err(3). Nm vgrind -> Nm in man page.

This commit is contained in:
Philippe Charnier 1997-08-25 06:36:04 +00:00
parent f778764443
commit 3e7ae69f2a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28691
2 changed files with 18 additions and 15 deletions

View File

@ -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 <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <ctype.h>
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#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];

View File

@ -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