[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 6


vgrind Command

Purpose

Formats listings of programs that are easy to read.

Syntax

vgrind [ -f ] [ -n ] [ -t ] [ -x ] [ -PPrintdev ] [ -TName ] [ - ] [ -dFile ] [ -h Header ] [ -lLanguage ] [ -sSize ] [ File ... ]

Description

The vgrind command formats (grinds) the program sources specified by the File parameters in an easily readable style using the troff command. Comments are placed in italics, keywords in boldface, and the name of the current function is listed down the margin of each page as it is encountered.

The vgrind command runs in either filter mode or regular mode.

In filter mode, the vgrind command acts as a filter in a manner similar to the tbl command. Standard input is passed directly to standard output except for lines bracketed by the following troff-like macros:

.vS Starts processing.
.vE Ends processing.

The preceding lines are formatted according to the vgrind command conventions. The output from this filter can be passed to the troff command for output. There is no particular ordering with the eqn or tbl command.

In regular mode, the vgrind command accepts input files, processes them, and passes them in order to the troff command, the appropriate postprocessor, and then the printer.

In both modes, the vgrind command passes without converting lines, beginning with a decimal point.

The vgrind command supports only ASCII keywords defined in either the standard /usr/share/lib/vgrindefs language definitions file or any alternately specified file by the -d flag.

Flags


-f Forces filter mode.
-n Forces no keyword bolding.
-t Causes formatted text to go to standard output.
-x Outputs the index file in an easily readable format. The index file itself is produced whenever the vgrind command is run with the index file in the current directory. The index of function definitions can then be run off by running the vgrind command with the -x flag and the File parameter.
-PPrintDev Sends the output to Printdev Printer using the qprt command. If this flag is not specified, the PRINTER environment variable is used. If the PRINTER environment variable is not set, the system default is used.
-TName Creates output for a troff device as specified by the Name parameter. The output is sent through the appropriate postprocessor. The default is the ibm3816 postprocessor.
- Forces input to be taken from standard input (default if the -f flag is specified).
-dFile Specifies an alternate language definitions file (default is the /usr/share/lib/vgrindefs file).
-h Header Specifies a particular header to put on every output page (default is the file name).

Note: A blank space is required after the -h flag before the Header variable.
-lLanguage Specifies the language to use. Currently known languages are:

c
C (the default). Function names can be preceded on a line only by spaces, tabs, or an asterisk. The parenthetical options must also be on the same line.

csh
CSH.

p
PASCAL. Function names must be displayed on the same line as the function or procedure keywords.

m
MODEL. Function names must be displayed on the same line as the isbeginproc keyword phrase.

sh
SHELL.

r
RATFOR.

mod2
MODULA2.

yacc
YACC.

isp
ISP.

I
ICON.

-s Size
Specifies a point size to use on output (exactly the same as a .ps request).

Files


index Contains the file the where source for the index is created.
/usr/bin/vgrind Contains the vgrind command.
/usr/share/lib/tmac/tmac.vgrind Contains the macro package.
/usr/share/lib/vfontedpr Contains the preprocessor.
/usr/share/lib/vgrindefs Contains the language descriptions.

Related Information

The qprt command, tbl command, troff command.

The vgrindefs File Format.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]