vgrind [options] filesSolaris 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:
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.
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.
Spacing between option characters and option arguments is specific. Use the options exactly as shown here:
-2Produce two-column output. Implies -s8 and the -L (landscape) option for $TROFF. (This option was specific to troff at UCB.)
-d definitionsUse definitions as the file with language definitions, instead of the default file.
-fRun in filter mode.
-h headerPlace header in the top center of every output page.
-llangSupported 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).
-nDo not use bold for keywords.
-ssizeUse point size size (same as troff's .ps request).
-wUse a tab stop of four columns, instead of the default eight.
-xPrint 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.
The following options are passed to the program named by $TROFF, or to troff if that environment variable is not set:
-olistOutput only the pages in list; same as -o in troff.
-PprinterSend the output to printer.
-tSame as -t for troff; send formatted text to standard output.
-TdeviceFormat output for device.
-WUse 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.)