Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vgrind(1) — SunOS 0.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vtroff(1)

VGRIND(1)  —  User’s Manual — Commands

NAME

vgrind − grind nice listings of programs

SYNOPSIS

vgrind [ −t ] [ −n ] [ −x ] [ −W ] [ −c ] [ −m ] [ −p ] [ −i ] [ −sn ] [ −h header ] name ...

DESCRIPTION

Vgrind formats the C, MODEL, or PASCAL programs which are arguments in a nice style using troff (1).  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. 

OPTIONS

−WSend the output to a 4 page wide raster plotter; normally, the output is printed on a narrow plotter. 

−cThe input file contains C language code.  This option is the default and need not be specified. 

−mThe input file contains MODEL language code. 

−pThe input file contains Pascal language code. 

−iThe input file contains ISP language code. 

−snSpecify font size.  The argument n is the point size (same as the argument of a troff .ps command). 

−hheader
Place header at the top of each page.  If the program is not source, but should be framed like the output of vgrind, the −n option should be specified. 

−tSend typesetter codes on the standard output.  This is analogous to the −t option of troff(1)

−xCreate an index.  It is only necessary to create an empty file index in the current directory.  As you run vgrind, the index is automatically kept up to date.  The index of function definitions can then be run off by giving vgrind the −x option and the file index as argument. 

FILES

indexfile where source for index is created
/usr/lib/tmac/tmac.vgrindmacro package
/usr/lib/vfontedprpreprocessor

SEE ALSO

vtroff(1)

BUGS

Vfontedpr assumes that a certain programming style is followed:

For C - functions begin with the name of the function in column one, and lines defining functions end with a ).  The function name is followed immediately by a “(” with no intervening space. 

For Pascal - function names need to appear on the same line as the keywords function and procedure.  The keyword end at the beginning of a line is interpreted as the end of the current function. 

For MODEL - function names need to appear on the same line as the keywords is beginproc. 

If these conventions are not followed, the mechanisms which index and place function names as comments in the margin 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 vgrind your program you should use tabs.  This is somewhat inevitable since the font used by vgrind is variable width. 

Should be able to be used as a preprocessor. 

The mechanism of ctags in recognizing functions should be used here. 

Sun System Release 0.3  —  17 April 1983

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026