Remove advertising header from man pages.
[dragonfly.git] / usr.bin / vgrind / vgrind.1
blobe7760d489408a543e67e4557f5c4337bffc241d5
1 .\" Copyright (c) 1980, 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 4. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)vgrind.1    8.1 (Berkeley) 6/6/93
29 .\" $FreeBSD: src/usr.bin/vgrind/vgrind.1,v 1.7.2.3 2002/06/21 15:30:04 charnier Exp $
30 .\" $DragonFly: src/usr.bin/vgrind/vgrind.1,v 1.4 2006/04/17 18:01:38 swildner Exp $
31 .\"
32 .Dd June 6, 1993
33 .Dt VGRIND 1
34 .Os
35 .Sh NAME
36 .Nm vgrind
37 .Nd grind nice listings of programs
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl
41 .Op Fl W
42 .Op Fl d Ar file
43 .Op Fl f
44 .Op Fl h Ar header
45 .Op Fl l Ns Ar language
46 .Op Fl n
47 .Op Fl p Ar postproc
48 .Op Fl sn
49 .Op Fl t
50 .Op Fl x
51 .Ar name Ar ...
52 .Sh DESCRIPTION
53 The
54 .Nm
55 utility formats the program sources which are arguments
56 in a nice style using
57 .Xr troff 1
58 Comments are placed in italics, keywords in bold face,
59 and the name of the current function is listed down the margin of each
60 page as it is encountered.
61 .Pp
62 The
63 .Nm
64 utility runs in two basic modes, filter mode (see the
65 .Fl f
66 option) or regular mode.  In filter mode
67 .Nm
68 acts as a filter in a manner similar to
69 .Xr tbl 1 .
70 The standard input is passed directly to the standard output except
71 for lines bracketed by the
72 .Em troff-like
73 macros:
74 .Bl -tag -width Ds
75 .It \&.vS
76 starts processing
77 .It \&.vE
78 ends processing
79 .El
80 .Pp
81 These lines are formatted as described above.  The output from this
82 filter can be passed to
83 .Xr troff 1
84 for output.  There need be no particular ordering with
85 .Xr eqn 1
87 .Xr tbl 1 .
88 .Pp
89 In regular mode
90 .Nm
91 accepts input files, processes them, and passes them to the postprocessor
92 for output,
93 .Xr psroff 1
94 by default.
95 .Pp
96 In both modes
97 .Nm
98 passes any lines beginning with a decimal point without conversion.
99 .Pp
100 The options are:
101 .Bl -tag -width Ar
102 .It Fl
103 forces input to be taken from standard input (default if
104 .Fl f
105 is specified)
106 .It Fl W
107 forces output to the (wide) Versatec printer rather than the (narrow)
108 Varian
109 .It Fl d Ar file
110 specifies an alternate language definitions
111 file (default is
112 .Pa /usr/share/misc/vgrindefs )
113 .It Fl f
114 forces filter mode
115 .It Fl h Ar header
116 specifies a particular header to put on every output page (default is
117 the file name)
118 .It Fl l
119 specifies the language to use.  Currently known are
120 .Tn PASCAL
121 .Pq Fl l Ns Ar p ,
122 .Tn MODEL
123 .Pq Fl l Ns Ar m ,
125 .Pf ( Fl l Ns Ar c
126 or the default),
127 .Tn C++
128 .Pq Fl l Ns Ar c++ ,
129 .Tn CSH
130 .Pq Fl l Ns Ar csh ,
131 .Tn SHELL
132 .Pq Fl l Ns Ar sh ,
133 .Tn RATFOR
134 .Pq Fl l Ns Ar r ,
135 .Tn MODULA2
136 .Pq Fl l Ns Ar mod2 ,
137 .Tn YACC
138 .Pq Fl l Ns Ar yacc ,
139 .Tn LISP
140 .Pq Fl l Ns Ar isp ,
141 .Tn ICON
142 .Pq Fl l Ns Ar I ,
144 .Tn PERL
145 .Pq Fl l Ns Ar perl .
146 .It Fl n
147 forces no keyword bolding
148 .It Fl p Ar postproc
150 .Ar postproc
151 to post-process the output,
152 .Xr psroff 1
153 by default.
154 .It Fl s
155 specifies a point size to use on output (exactly the same as the argument
156 of a .ps)
157 .It Fl t
158 similar to the same option in
159 .Xr troff 1
160 causing formatted text to go to the standard output
161 .It Fl x
162 outputs the index file in a ``pretty'' format.
163 The index file itself is produced whenever
165 is run with a file called
166 .Pa index
167 in the current directory.
168 The index of function
169 definitions can then be run off by giving
172 .Fl x
173 option and the file
174 .Pa index
175 as argument.
177 .Sh FILES
178 .Bl -tag -width /usr/share/misc/vgrindefsxx -compact
179 .It Pa index
180 file where source for index is created
181 .It Pa /usr/share/tmac/tmac.vgrind
182 macro package
183 .It Pa /usr/libexec/vfontedpr
184 preprocessor
185 .It Pa /usr/share/misc/vgrindefs
186 language descriptions
188 .Sh SEE ALSO
189 .Xr getcap 3 ,
190 .Xr vgrindefs 5
191 .Sh HISTORY
194 command appeared in
195 .Bx 3.0 .
196 .Sh BUGS
197 Vfontedpr assumes that a certain programming style is followed:
200 .Tn C
201 \- function names can be preceded on a line only by spaces, tabs, or an
202 asterisk.  The parenthesized arguments must also be on the same line.
205 .Tn PASCAL
206 \- function names need to appear on the same line as the keywords
207 .Em function
209 .Em procedure .
212 .Tn MODEL
213 \- function names need to appear on the same line as the keywords
214 .Em is beginproc .
216 If these conventions are not followed, the indexing and marginal function
217 name comment mechanisms will fail.
219 More generally, arbitrary formatting styles for programs mostly look bad.
220 The use of spaces to align source code fails miserably; if you plan to
222 your program you should use tabs.  This is somewhat inevitable since the
223 font used by
225 is variable width.
227 The mechanism of
228 .Xr ctags 1
229 in recognizing functions should be used here.
231 Filter mode does not work in documents using the
232 .Fl me
234 .Fl ms
235 macros.
236 (So what use is it anyway?)