.\" Copyright (c) 1980 ,1990 The Regents of the University of California.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" @(#)vgrind.1 6.4 (Berkeley) 4/23/91
.Nd grind nice listings of programs
formats the program sources which are arguments
Comments are placed in italics, keywords in bold face,
and the name of the current function is listed down the margin of each
page as it is encountered.
runs in two basic modes, filter mode (see the
option) or regular mode. In filter mode
acts as a filter in a manner similar to
The standard input is passed directly to the standard output except
for lines bracketed by the
These lines are formatted as described above. The output from this
for output. There need be no particular ordering with
accepts input files, processes them, and passes them to
passes any lines beginning with a decimal point without conversion.
forces input to be taken from standard input (default if
forces output to the (wide) Versatec printer rather than the (narrow)
specifies an alternate language definitions
.Pa /usr/share/misc/vgrindefs )
specifies a particular header to put on every output page (default is
specifies the language to use. Currently known are
forces no keyword bolding
specifies a point size to use on output (exactly the same as the argument
similar to the same option in
causing formatted text to go to the standard output
outputs the index file in a ``pretty'' format.
The index file itself is produced whenever
is run with a file called
in the current directory.
definitions can then be run off by giving
.Bl -tag -width /usr/share/misc/vgrindefsxx -compact
file where source for index is created
.It Pa /usr/share/tmac/tmac.vgrind
.It Pa /usr/libexec/vfontedpr
.It Pa /usr/share/misc/vgrindefs
Vfontedpr assumes that a certain programming style is followed:
\- function names can be preceded on a line only by spaces, tabs, or an
asterisk. The parenthesized arguments must also be on the same line.
\- function names need to appear on the same line as the keywords
\- function names need to appear on the same line as the keywords
If these conventions are not followed, the indexing and marginal function
name comment mechanisms will fail.
More generally, arbitrary formatting styles for programs mostly look bad.
The use of spaces to align source code fails miserably; if you plan to
your program you should use tabs. This is somewhat inevitable since the
in recognizing functions should be used here.
Filter mode does not work in documents using the
(So what use is it anyway?)