📄 vgrind.1
字号:
.\" Copyright (c) 1980, 1990, 1993.\" The Regents of the University of California. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 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.\" SUCH DAMAGE..\".\" @(#)vgrind.1 8.1 (Berkeley) 6/6/93.\".Dd June 6, 1993.Dt VGRIND 1.Os BSD 4.Sh NAME.Nm vgrind.Nd grind nice listings of programs.Sh SYNOPSIS.Nm vgrind.Op Fl .Op Fl W.Op Fl d Ar file.Op Fl f.Op Fl h Ar header.Op Fl l Ar language.Op Fl n.Op Fl sn.Op Fl t.Op Fl x.Ar name Ar ....Sh DESCRIPTION.Nm Vgrindformats the program sources which are arguments in a nice style using.Xr troff 1Comments are placed in italics, keywords in bold face,and the name of the current function is listed down the margin of eachpage as it is encountered..Pp.Nm Vgrindruns in two basic modes, filter mode (see the.Fl foption) or regular mode. In filter mode .Nm vgrindacts as a filter in a manner similar to.Xr tbl 1 .The standard input is passed directly to the standard output exceptfor lines bracketed by the .Em troff-likemacros:.Bl -tag -width Ds.It \&.vSstarts processing.It \&.vEends processing.El.PpThese lines are formatted as described above. The output from thisfilter can be passed to .Xr trofffor output. There need be no particular ordering with .Xr eqn 1or.Xr tbl 1 ..PpIn regular mode .Nm vgrindaccepts input files, processes them, and passes them to .Xr troff 1for output. .PpIn both modes .Nm vgrindpasses any lines beginning with a decimal point without conversion..PpThe options are:.Bl -tag -width Ar.It Fl forces input to be taken from standard input (default if.Fl fis specified ).It Fl Wforces output to the (wide) Versatec printer rather than the (narrow)Varian.It Fl d Ar filespecifies an alternate language definitionsfile (default is.Pa /usr/share/misc/vgrindefs ).It Fl fforces filter mode.It Fl h Ar headerspecifies a particular header to put on every output page (default isthe file name).It Fl lspecifies the language to use. Currently known are.Tn PASCAL.Pq Fl l Ns Ar p ,.Tn MODEL.Pq Fl l Ns Ar m ,C.Pf ( Fl l Ns Ar cor the default),.Tn CSH.Pq Fl l Ns Ar csh ,.Tn SHELL.Pq Fl l Ns Ar sh ,.Tn RATFOR.Pq Fl l Ns Ar r ,.Tn MODULA2.Pq Fl l Ns Ar mod2 ,.Tn YACC.Pq Fl l Ns Ar yacc ,.Tn LISP.Pq Fl l Ns Ar isp ,and.Tn ICON.Pq Fl l Ns Ar I ..It Fl nforces no keyword bolding.It Fl sspecifies a point size to use on output (exactly the same as the argumentof a .ps).It Fl tsimilar to the same option in.Xr troffcausing formatted text to go to the standard output.It Fl xoutputs the index file in a ``pretty'' format. The index file itself is produced whenever .Nm vgrindis run with a file called .Pa indexin the current directory.The index of functiondefinitions can then be run off by giving .Nm vgrindthe.Fl xoption and the file.Pa indexas argument..El.Sh FILES.Bl -tag -width /usr/share/misc/vgrindefsxx -compact.It Pa indexfile where source for index is created.It Pa /usr/share/tmac/tmac.vgrindmacro package.It Pa /usr/libexec/vfontedprpreprocessor.It Pa /usr/share/misc/vgrindefslanguage descriptions.El.Sh SEE ALSO.Xr getcap 3 ,.Xr vgrindefs 5.Sh BUGSVfontedpr assumes that a certain programming style is followed:.PpFor .Tn C\- function names can be preceded on a line only by spaces, tabs, or anasterisk. The parenthesized arguments must also be on the same line..PpFor.Tn PASCAL\- function names need to appear on the same line as the keywords.Em functionor.Em procedure ..PpFor.Tn MODEL\- function names need to appear on the same line as the keywords.Em is beginproc ..PpIf these conventions are not followed, the indexing and marginal functionname comment mechanisms will fail..PpMore generally, arbitrary formatting styles for programs mostly look bad.The use of spaces to align source code fails miserably; if you plan to.Nm vgrindyour program you should use tabs. This is somewhat inevitable since thefont used by.Nm vgrindis variable width..PpThe mechanism of.Xr ctags 1in recognizing functions should be used here..PpFilter mode does not work in documents using the.Fl meor.Fl msmacros.(So what use is it anyway?).Sh HISTORYThe.Nmcommand appeared in.Bx 3.0 .
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -