xref: /freebsd/usr.bin/vgrind/vgrind.1 (revision bdcbfde3)
19b50d902SRodney W. Grimes.\" Copyright (c) 1980, 1990, 1993
29b50d902SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
39b50d902SRodney W. Grimes.\"
49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions
69b50d902SRodney W. Grimes.\" are met:
79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
89b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
109b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
119b50d902SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
139b50d902SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
149b50d902SRodney W. Grimes.\"    without specific prior written permission.
159b50d902SRodney W. Grimes.\"
169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
199b50d902SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
269b50d902SRodney W. Grimes.\" SUCH DAMAGE.
279b50d902SRodney W. Grimes.\"
2859b2dc9fSJoseph Koshy.Dd August 29, 2006
299b50d902SRodney W. Grimes.Dt VGRIND 1
3062500372SRuslan Ermilov.Os
319b50d902SRodney W. Grimes.Sh NAME
329b50d902SRodney W. Grimes.Nm vgrind
339b50d902SRodney W. Grimes.Nd grind nice listings of programs
349b50d902SRodney W. Grimes.Sh SYNOPSIS
353e7ae69fSPhilippe Charnier.Nm
369b50d902SRodney W. Grimes.Op Fl
379b50d902SRodney W. Grimes.Op Fl W
389b50d902SRodney W. Grimes.Op Fl d Ar file
399b50d902SRodney W. Grimes.Op Fl f
409b50d902SRodney W. Grimes.Op Fl h Ar header
4104eaedf2SJoerg Wunsch.Op Fl l Ns Ar language
429b50d902SRodney W. Grimes.Op Fl n
4304eaedf2SJoerg Wunsch.Op Fl p Ar postproc
4459b2dc9fSJoseph Koshy.Op Fl s Ar pointsize
459b50d902SRodney W. Grimes.Op Fl t
469b50d902SRodney W. Grimes.Op Fl x
479b50d902SRodney W. Grimes.Ar name Ar ...
489b50d902SRodney W. Grimes.Sh DESCRIPTION
49e8937ba0SPhilippe CharnierThe
50e8937ba0SPhilippe Charnier.Nm
5159b2dc9fSJoseph Koshyutility formats the program sources specified as arguments
5259b2dc9fSJoseph Koshyon the command line in a nice style using
5320f68c5fSJens Schweikhardt.Xr troff 1 Pq Pa ports/textproc/groff .
549b50d902SRodney W. GrimesComments are placed in italics, keywords in bold face,
559b50d902SRodney W. Grimesand the name of the current function is listed down the margin of each
569b50d902SRodney W. Grimespage as it is encountered.
579b50d902SRodney W. Grimes.Pp
58e8937ba0SPhilippe CharnierThe
59e8937ba0SPhilippe Charnier.Nm
60e8937ba0SPhilippe Charnierutility runs in two basic modes, filter mode (see the
619b50d902SRodney W. Grimes.Fl f
626a3e8b0aSRuslan Ermilovoption) or regular mode.
636a3e8b0aSRuslan ErmilovIn filter mode
643e7ae69fSPhilippe Charnier.Nm
659b50d902SRodney W. Grimesacts as a filter in a manner similar to
669b50d902SRodney W. Grimes.Xr tbl 1 .
679b50d902SRodney W. GrimesThe standard input is passed directly to the standard output except
689b50d902SRodney W. Grimesfor lines bracketed by the
699b50d902SRodney W. Grimes.Em troff-like
709b50d902SRodney W. Grimesmacros:
719b50d902SRodney W. Grimes.Bl -tag -width Ds
729b50d902SRodney W. Grimes.It \&.vS
739b50d902SRodney W. Grimesstarts processing
749b50d902SRodney W. Grimes.It \&.vE
759b50d902SRodney W. Grimesends processing
769b50d902SRodney W. Grimes.El
779b50d902SRodney W. Grimes.Pp
786a3e8b0aSRuslan ErmilovThese lines are formatted as described above.
796a3e8b0aSRuslan ErmilovThe output from this
809b50d902SRodney W. Grimesfilter can be passed to
8120f68c5fSJens Schweikhardt.Xr troff 1 Pq Pa ports/textproc/groff
826a3e8b0aSRuslan Ermilovfor output.
836a3e8b0aSRuslan ErmilovThere need be no particular ordering with
8420f68c5fSJens Schweikhardt.Xr eqn 1 Pq Pa ports/textproc/groff
859b50d902SRodney W. Grimesor
8620f68c5fSJens Schweikhardt.Xr tbl 1 Pq Pa ports/textproc/groff .
879b50d902SRodney W. Grimes.Pp
889b50d902SRodney W. GrimesIn regular mode
893e7ae69fSPhilippe Charnier.Nm
9071503758SJoerg Wunschaccepts input files, processes them, and passes them to the postprocessor
9171503758SJoerg Wunschfor output,
9271503758SJoerg Wunsch.Xr psroff 1
9371503758SJoerg Wunschby default.
949b50d902SRodney W. Grimes.Pp
959b50d902SRodney W. GrimesIn both modes
963e7ae69fSPhilippe Charnier.Nm
979b50d902SRodney W. Grimespasses any lines beginning with a decimal point without conversion.
989b50d902SRodney W. Grimes.Pp
999b50d902SRodney W. GrimesThe options are:
1009b50d902SRodney W. Grimes.Bl -tag -width Ar
1019b50d902SRodney W. Grimes.It Fl
1029b50d902SRodney W. Grimesforces input to be taken from standard input (default if
1039b50d902SRodney W. Grimes.Fl f
1049b50d902SRodney W. Grimesis specified)
1059b50d902SRodney W. Grimes.It Fl W
1069b50d902SRodney W. Grimesforces output to the (wide) Versatec printer rather than the (narrow)
1079b50d902SRodney W. GrimesVarian
1089b50d902SRodney W. Grimes.It Fl d Ar file
1099b50d902SRodney W. Grimesspecifies an alternate language definitions
1109b50d902SRodney W. Grimesfile (default is
1119b50d902SRodney W. Grimes.Pa /usr/share/misc/vgrindefs )
1129b50d902SRodney W. Grimes.It Fl f
1139b50d902SRodney W. Grimesforces filter mode
1149b50d902SRodney W. Grimes.It Fl h Ar header
1159b50d902SRodney W. Grimesspecifies a particular header to put on every output page (default is
1169b50d902SRodney W. Grimesthe file name)
1179b50d902SRodney W. Grimes.It Fl l
1186a3e8b0aSRuslan Ermilovspecifies the language to use.
1196a3e8b0aSRuslan ErmilovCurrently known are
1209b50d902SRodney W. Grimes.Tn PASCAL
1219b50d902SRodney W. Grimes.Pq Fl l Ns Ar p ,
1229b50d902SRodney W. Grimes.Tn MODEL
1239b50d902SRodney W. Grimes.Pq Fl l Ns Ar m ,
1249b50d902SRodney W. GrimesC
1259b50d902SRodney W. Grimes.Pf ( Fl l Ns Ar c
1269b50d902SRodney W. Grimesor the default),
12771503758SJoerg Wunsch.Tn C++
12871503758SJoerg Wunsch.Pq Fl l Ns Ar c++ ,
1299b50d902SRodney W. Grimes.Tn CSH
1309b50d902SRodney W. Grimes.Pq Fl l Ns Ar csh ,
1319b50d902SRodney W. Grimes.Tn SHELL
1329b50d902SRodney W. Grimes.Pq Fl l Ns Ar sh ,
1339b50d902SRodney W. Grimes.Tn RATFOR
1349b50d902SRodney W. Grimes.Pq Fl l Ns Ar r ,
1359b50d902SRodney W. Grimes.Tn MODULA2
1369b50d902SRodney W. Grimes.Pq Fl l Ns Ar mod2 ,
1379b50d902SRodney W. Grimes.Tn YACC
1389b50d902SRodney W. Grimes.Pq Fl l Ns Ar yacc ,
1399b50d902SRodney W. Grimes.Tn LISP
1409b50d902SRodney W. Grimes.Pq Fl l Ns Ar isp ,
1419b50d902SRodney W. Grimes.Tn ICON
142d58bdc29SJoerg Wunsch.Pq Fl l Ns Ar I ,
143d58bdc29SJoerg Wunschand
144d58bdc29SJoerg Wunsch.Tn PERL
145d58bdc29SJoerg Wunsch.Pq Fl l Ns Ar perl .
1469b50d902SRodney W. Grimes.It Fl n
1479b50d902SRodney W. Grimesforces no keyword bolding
14871503758SJoerg Wunsch.It Fl p Ar postproc
14971503758SJoerg Wunschuse
15071503758SJoerg Wunsch.Ar postproc
15171503758SJoerg Wunschto post-process the output,
15271503758SJoerg Wunsch.Xr psroff 1
15371503758SJoerg Wunschby default.
15459b2dc9fSJoseph Koshy.It Fl s Ar pointsize
1559b50d902SRodney W. Grimesspecifies a point size to use on output (exactly the same as the argument
1569b50d902SRodney W. Grimesof a .ps)
1579b50d902SRodney W. Grimes.It Fl t
1589b50d902SRodney W. Grimessimilar to the same option in
15920f68c5fSJens Schweikhardt.Xr troff 1 Pq Pa ports/textproc/groff
1609b50d902SRodney W. Grimescausing formatted text to go to the standard output
1619b50d902SRodney W. Grimes.It Fl x
1629b50d902SRodney W. Grimesoutputs the index file in a ``pretty'' format.
1639b50d902SRodney W. GrimesThe index file itself is produced whenever
1643e7ae69fSPhilippe Charnier.Nm
1659b50d902SRodney W. Grimesis run with a file called
1669b50d902SRodney W. Grimes.Pa index
1679b50d902SRodney W. Grimesin the current directory.
1689b50d902SRodney W. GrimesThe index of function
1699b50d902SRodney W. Grimesdefinitions can then be run off by giving
1703e7ae69fSPhilippe Charnier.Nm
1719b50d902SRodney W. Grimesthe
1729b50d902SRodney W. Grimes.Fl x
1739b50d902SRodney W. Grimesoption and the file
1749b50d902SRodney W. Grimes.Pa index
1759b50d902SRodney W. Grimesas argument.
1769b50d902SRodney W. Grimes.El
1779b50d902SRodney W. Grimes.Sh FILES
1789b50d902SRodney W. Grimes.Bl -tag -width /usr/share/misc/vgrindefsxx -compact
1799b50d902SRodney W. Grimes.It Pa index
1809b50d902SRodney W. Grimesfile where source for index is created
1819b50d902SRodney W. Grimes.It Pa /usr/share/tmac/tmac.vgrind
1829b50d902SRodney W. Grimesmacro package
1839b50d902SRodney W. Grimes.It Pa /usr/libexec/vfontedpr
1849b50d902SRodney W. Grimespreprocessor
1859b50d902SRodney W. Grimes.It Pa /usr/share/misc/vgrindefs
1869b50d902SRodney W. Grimeslanguage descriptions
1879b50d902SRodney W. Grimes.El
1889b50d902SRodney W. Grimes.Sh SEE ALSO
1899b50d902SRodney W. Grimes.Xr getcap 3 ,
1909b50d902SRodney W. Grimes.Xr vgrindefs 5
1916c7216dfSRuslan Ermilov.Sh HISTORY
1926c7216dfSRuslan ErmilovThe
1936c7216dfSRuslan Ermilov.Nm
1946c7216dfSRuslan Ermilovcommand appeared in
1956c7216dfSRuslan Ermilov.Bx 3.0 .
1969b50d902SRodney W. Grimes.Sh BUGS
1976a1be1f5SPhilippe CharnierThe vfontedpr preprocessor assumes that a certain programming style is
1986a1be1f5SPhilippe Charnierfollowed:
1999b50d902SRodney W. Grimes.Pp
2009b50d902SRodney W. GrimesFor
2019b50d902SRodney W. Grimes.Tn C
2029b50d902SRodney W. Grimes\- function names can be preceded on a line only by spaces, tabs, or an
2036a3e8b0aSRuslan Ermilovasterisk.
2046a3e8b0aSRuslan ErmilovThe parenthesized arguments must also be on the same line.
2059b50d902SRodney W. Grimes.Pp
2069b50d902SRodney W. GrimesFor
2079b50d902SRodney W. Grimes.Tn PASCAL
2089b50d902SRodney W. Grimes\- function names need to appear on the same line as the keywords
2099b50d902SRodney W. Grimes.Em function
2109b50d902SRodney W. Grimesor
2119b50d902SRodney W. Grimes.Em procedure .
2129b50d902SRodney W. Grimes.Pp
2139b50d902SRodney W. GrimesFor
2149b50d902SRodney W. Grimes.Tn MODEL
2159b50d902SRodney W. Grimes\- function names need to appear on the same line as the keywords
2169b50d902SRodney W. Grimes.Em is beginproc .
2179b50d902SRodney W. Grimes.Pp
2189b50d902SRodney W. GrimesIf these conventions are not followed, the indexing and marginal function
2199b50d902SRodney W. Grimesname comment mechanisms will fail.
2209b50d902SRodney W. Grimes.Pp
2219b50d902SRodney W. GrimesMore generally, arbitrary formatting styles for programs mostly look bad.
2229b50d902SRodney W. GrimesThe use of spaces to align source code fails miserably; if you plan to
2233e7ae69fSPhilippe Charnier.Nm
2246a3e8b0aSRuslan Ermilovyour program you should use tabs.
2256a3e8b0aSRuslan ErmilovThis is somewhat inevitable since the
2269b50d902SRodney W. Grimesfont used by
2273e7ae69fSPhilippe Charnier.Nm
2289b50d902SRodney W. Grimesis variable width.
2299b50d902SRodney W. Grimes.Pp
2309b50d902SRodney W. GrimesThe mechanism of
2319b50d902SRodney W. Grimes.Xr ctags 1
2329b50d902SRodney W. Grimesin recognizing functions should be used here.
2339b50d902SRodney W. Grimes.Pp
2349b50d902SRodney W. GrimesFilter mode does not work in documents using the
2359b50d902SRodney W. Grimes.Fl me
2369b50d902SRodney W. Grimesor
2379b50d902SRodney W. Grimes.Fl ms
2389b50d902SRodney W. Grimesmacros.
2399b50d902SRodney W. Grimes(So what use is it anyway?)
240