home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


vgrind

vgrind [options ] files

Solaris only (from the BSD command). Produce nicely formatted source code listings for use with troff . vgrind formats program source code so that it looks good when typeset with troff . Comments are in italic, keywords in bold, and each function's name is printed in the margin of the page where it is defined. Definitions for each language are kept in /usr/lib/vgrindefs . vgrind can format a number of languages; see -l below.

vgrind has two modes of operation:

Filter mode

Similar to eqn , pic , and tbl . Lines are passed through unchanged, except for those bracketed by .vS and .vE . In this mode, vgrind can be used in a pipeline with other preprocessors.

Regular mode

vgrind processes all files named on the command line and then invokes troff to print them. Use - as a filename to mean the standard input. Otherwise, vgrind will not read standard input.

Options

Spacing between option characters and option arguments is specific. Use the options exactly as shown here:

-2

Produce two-column output. Implies -s8 and the -L (landscape) option for $TROFF . (This option was specific to troff at UCB.)

-d definitions

Use definitions as the file with language definitions, instead of the default file.

-f

Run in filter mode.

-h header

Place header in the top center of every output page.

-l lang

Supported languages are:

Bourne shell -lsh
C -lc
C++ -lc++
C shell -lcsh
emacs MLisp -lml
FORTRAN -lf
Icon -lI
ISP -li
LDL -lLDL
Model -lm
Modula-2 -lm2
Pascal -lp
RATFOR -lr
Russel -lrussell
YACC -lyacc

The default is -lc (for C).

-n

Do not use bold for keywords.

-s size

Use point size size (same as troff 's .ps request).

-w

Use a tab stop of four columns, instead of the default eight.

-x

Print the index. If a file named index exists in the current directory, vgrind writes the index into it. This file can then be formatted and printed separately using vgrind -x index .

Typesetter Options

The following options are passed to the program named by $TROFF , or to troff if that environment variable is not set:

-o list

Output only the pages in list ; same as -o in troff .

-P printer

Send the output to printer .

-t

Same as -t for troff ; send formatted text to standard output.

-T device

Format output for device .

-W

Use the wide Versatec printer instead of the narrow Varian. (These refer to printers that existed at one time at the University of California at Berkeley. This option likely has no real effect under Solaris.)


Previous: Reference: vedit UNIX in a Nutshell: System V Edition Next: Reference: vi
Reference: vedit Book Index Reference: vi

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System