1 .\" $NetBSD: vgrind.1,v 1.13 2003/08/07 11:17:01 agc Exp $
3 .\" Copyright (c) 1980, 1990, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)vgrind.1 8.1 (Berkeley) 6/6/93
37 .Nd grind nice listings of programs
59 formats the program sources which are arguments
62 Comments are placed in italics, keywords in bold face,
63 and the name of the current function is listed down the margin of each
64 page as it is encountered.
67 runs in two basic modes, filter mode (see the
69 option) or regular mode.
72 acts as a filter in a manner similar to
74 The standard input is passed directly to the standard output except
75 for lines bracketed by the
85 These lines are formatted as described above.
86 The output from this filter can be passed to
89 There need be no particular ordering with
96 accepts input files, processes them, and passes them to
102 passes any lines beginning with a decimal point without conversion.
107 forces input to be taken from standard input (default if
111 forces output to the (wide) Versatec printer rather than the (narrow)
114 specifies an alternative language definitions
116 .Pa /usr/share/misc/vgrindefs )
120 specifies a particular header to put on every output page (default is
123 specifies the language to use.
139 .Pq Fl l Ns Ar mod2 ,
141 .Pq Fl l Ns Ar yacc ,
148 forces no keyword bolding
150 specifies a point size to use on output (exactly the same as the argument
153 similar to the same option in
155 causing formatted text to go to the standard output
157 outputs the index file in a ``pretty'' format.
158 The index file itself is produced whenever
160 is run with a file called
162 in the current directory.
163 The index of function
164 definitions can then be run off by giving
173 .Bl -tag -width /usr/share/misc/vgrindefsxx -compact
175 file where source for index is created
176 .It Pa /usr/share/tmac/vgrind.tmac
178 .It Pa /usr/libexec/vfontedpr
180 .It Pa /usr/share/misc/vgrindefs
181 language descriptions
194 Vfontedpr assumes that a certain programming style is followed:
198 \- function names can be preceded on a line only by spaces, tabs, or an
200 The parenthesized arguments must also be on the same line.
204 \- function names need to appear on the same line as the keywords
211 \- function names need to appear on the same line as the keywords
214 If these conventions are not followed, the indexing and marginal function
215 name comment mechanisms will fail.
217 More generally, arbitrary formatting styles for programs mostly look bad.
218 The use of spaces to align source code fails miserably; if you plan to
220 your program you should use tabs.
221 This is somewhat inevitable since the font used by
227 in recognizing functions should be used here.
229 Filter mode does not work in documents using the
234 (So what use is it anyway?)