1VGRIND(1)                   General Commands Manual                  VGRIND(1)
2
3
4

NAME

6       vgrind - grind nice listings of programs
7

SYNOPSIS

9       vgrind [ -f ] [ - ] [ -t ] [ -n ] [ -x ] [ -W ] [ -sn ] [ -h header ] [
10       -d file ] [ -llanguage ] name ...
11

DESCRIPTION

13       Vgrind formats the program sources which are arguments in a nice  style
14       using  troff(1)  Comments are placed in italics, keywords in bold face,
15       and the name of the current function is listed down the margin of  each
16       page as it is encountered.
17
18       Vgrind runs in two basic modes, filter mode or regular mode.  In filter
19       mode vgrind acts as a filter in a manner similar to tbl(1).  The  stan‐
20       dard  input  is passed directly to the standard output except for lines
21       bracketed by the troff-like macros:
22
23       .vS    - starts processing
24
25       .vE    - ends processing
26
27       These lines are formatted as described above.   The  output  from  this
28       filter  can be passed to troff for output.  There need be no particular
29       ordering with eqn(1) or tbl(1).
30
31       In regular mode vgrind accepts input files, processes them, and  passes
32       them to troff(1) for output.
33
34       In  both  modes  vgrind passes any lines beginning with a decimal point
35       without conversion.
36
37       The options are:
38
39       -f     forces filter mode
40
41       -      forces input to be taken from standard input (default if  -f  is
42              specified )
43
44       -t     similar to the same option in troff causing formatted text to go
45              to the standard output
46
47       -n     forces no keyword bolding
48
49       -x     outputs the index file in a ``pretty'' format.  The  index  file
50              itself  is  produced  whenever  vgrind is run with a file called
51              index in the current directory.  The index of  function  defini‐
52              tions can then be run off by giving vgrind the -x option and the
53              file index as argument.
54
55       -W     forces output to the (wide) Versatec  printer  rather  than  the
56              (narrow) Varian
57
58       -s     specifies a point size to use on output (exactly the same as the
59              argument of a .ps)
60
61       -h     specifies a particular  header  to  put  on  every  output  page
62              (default is the file name)
63
64       -d     specifies  an  alternate  language  definitions file (default is
65              /usr/share/misc/vgrindefs)
66
67       -l     specifies the language  to  use.   Currently  known  are  PASCAL
68              (-lp),  MODEL  (-lm),C  (-lc or the default), CSH (-lcsh), SHELL
69              (-lsh), RATFOR  (-lr),  MODULA2  (-lmod2),  YACC  (-lyacc),  ISP
70              (-lisp), and ICON (-lI).
71

FILES

73       index               file where source for index is created
74       /usr/share/tmac/tmac.vgrindmacro package
75       /usr/libexec/vfontedprpreprocessor
76       /usr/share/misc/vgrindefslanguage descriptions
77

AUTHOR

79       Dave Presotto & William Joy
80

SEE ALSO

82       vlp(1), vtroff(1), vgrindefs(5)
83

BUGS

85       Vfontedpr assumes that a certain programming style is followed:
86
87       For  C - function names can be preceded on a line only by spaces, tabs,
88       or an asterisk.  The parenthesized arguments must also be on  the  same
89       line.
90
91       For PASCAL - function names need to appear on the same line as the key‐
92       words function or procedure.
93
94       For MODEL - function names need to appear on the same line as the  key‐
95       words is beginproc.
96
97       If  these conventions are not followed, the indexing and marginal func‐
98       tion name comment mechanisms will fail.
99
100       More generally, arbitrary formatting styles for  programs  mostly  look
101       bad.   The  use  of spaces to align source code fails miserably; if you
102       plan to vgrind your program you should  use  tabs.   This  is  somewhat
103       inevitable since the font used by vgrind is variable width.
104
105       The mechanism of ctags in recognizing functions should be used here.
106
107       Filter  mode  does  not  work in documents using the -me or -ms macros.
108       (So what use is it anyway?)
109
110
111
1124th Berkeley Distribution      October 22, 1996                      VGRIND(1)
Impressum