Commit | Line | Data |
---|---|---|
9005ce62 KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
6d2470eb | 5 | .\" @(#)vgrind.1 6.2 (Berkeley) %G% |
9005ce62 | 6 | .\" |
284fb403 | 7 | .TH VGRIND 1 "" |
9005ce62 KM |
8 | .UC 4 |
9 | .SH NAME | |
10 | vgrind \- grind nice listings of programs | |
11 | .SH SYNOPSIS | |
12 | .B vgrind | |
13 | [ | |
4a9bc47c KM |
14 | .B \-f |
15 | ] [ | |
16 | .B \- | |
17 | ] [ | |
9005ce62 KM |
18 | .B \-t |
19 | ] [ | |
20 | .B \-n | |
21 | ] [ | |
22 | .B \-x | |
23 | ] [ | |
24 | .B \-W | |
25 | ] [ | |
9005ce62 KM |
26 | .B \-sn |
27 | ] [ | |
28 | .B \-h | |
29 | header | |
4a9bc47c KM |
30 | ] [ |
31 | .B \-d | |
32 | file | |
33 | ] [ | |
34 | .BI \-l language | |
9005ce62 KM |
35 | ] |
36 | name ... | |
37 | .SH DESCRIPTION | |
38 | .I Vgrind | |
4a9bc47c | 39 | formats the program sources which are arguments |
9005ce62 | 40 | in a nice style using |
4a9bc47c KM |
41 | .IR troff (1) |
42 | Comments are placed in italics, keywords in bold face, | |
9005ce62 KM |
43 | and the name of the current function is listed down the margin of each |
44 | page as it is encountered. | |
45 | .PP | |
4a9bc47c KM |
46 | .I Vgrind |
47 | runs in two basic modes, filter mode or regular mode. In filter mode | |
48 | .I vgrind | |
49 | acts as a filter in a manner similar to | |
50 | .IR tbl (1). | |
51 | The standard input is passed directly to the standard output except | |
52 | for lines bracketed by the | |
53 | .I troff-like | |
54 | macros: | |
55 | .IP .vS | |
56 | - starts processing | |
57 | .IP .vE | |
58 | - ends processing | |
59 | .LP | |
60 | These lines are formatted as described above. The output from this | |
61 | filter can be passed to | |
62 | .I troff | |
63 | for output. There need be no particular ordering with | |
64 | .IR eqn (1) | |
65 | or | |
66 | .IR tbl (1). | |
9005ce62 | 67 | .PP |
4a9bc47c KM |
68 | In regular mode |
69 | .I vgrind | |
70 | accepts input files, processes them, and passes them to | |
9005ce62 | 71 | .IR troff (1) |
4a9bc47c | 72 | for output. |
9005ce62 | 73 | .PP |
4a9bc47c KM |
74 | In both modes |
75 | .I vgrind | |
76 | passes any lines beginning with a decimal point without conversion. | |
77 | .PP | |
78 | The options are: | |
79 | .IP \fB\-f\fP | |
80 | forces filter mode | |
81 | .IP \fB\-\fP | |
82 | forces input to be taken from standard input (default if | |
83 | .B \fB\-f\fP | |
84 | is specified ) | |
85 | .IP \fB\-t\fP | |
86 | similar to the same option in | |
87 | .I troff | |
88 | causing formatted text to go to the standard output | |
89 | .IP \fB\-n\fP | |
90 | forces no keyword bolding | |
91 | .IP \fB\-x\fP | |
92 | outputs the index file in a ``pretty'' format. | |
93 | The index file itself is produced whenever | |
9005ce62 | 94 | .I vgrind |
4a9bc47c KM |
95 | is run with a file called |
96 | .I index | |
97 | in the current directory. | |
98 | The index of function | |
99 | definitions can then be run off by giving | |
100 | .I vgrind | |
9005ce62 KM |
101 | the |
102 | .B \-x | |
103 | option and the file | |
104 | .I index | |
105 | as argument. | |
4a9bc47c KM |
106 | .IP \fB\-W\fP |
107 | forces output to the (wide) Versatec printer rather than the (narrow) | |
108 | Varian | |
109 | .IP \fB\-s\fP | |
110 | specifies a point size to use on output (exactly the same as the argument | |
111 | of a .ps) | |
112 | .IP \fB\-h\fP | |
113 | specifies a particular header to put on every output page (default is | |
114 | the file name) | |
115 | .IP \fB\-d\fP | |
116 | specifies an alternate language definitions | |
117 | file (default is /usr/lib/vgrindefs) | |
118 | .IP \fB\-l\fP | |
119 | specifies the language to use. Currently known are PASCAL | |
120 | .RB ( \-lp ), | |
121 | MODEL | |
122 | .RB ( \-lm ), C | |
123 | .RB ( \-lc | |
124 | or the default), CSH | |
125 | .RB ( \-lcsh ), | |
126 | SHELL | |
127 | .RB ( \-lsh ), | |
128 | RATFOR | |
129 | .RB ( \-lr ), | |
284fb403 KM |
130 | MODULA2 |
131 | .RB ( \-lmod2 ), | |
132 | YACC | |
133 | .RB ( \-lyacc ), | |
134 | ISP | |
135 | .RB ( \-lisp ), | |
4a9bc47c KM |
136 | and ICON |
137 | .RB ( \-lI ). | |
9005ce62 KM |
138 | .SH FILES |
139 | .ta 2i | |
140 | index file where source for index is created | |
141 | .br | |
142 | /usr/lib/tmac/tmac.vgrind macro package | |
143 | .br | |
144 | /usr/lib/vfontedpr preprocessor | |
4a9bc47c KM |
145 | .br |
146 | /usr/lib/vgrindefs language descriptions | |
9005ce62 | 147 | .SH AUTHOR |
4a9bc47c | 148 | Dave Presotto & William Joy |
9005ce62 | 149 | .SH SEE ALSO |
4a9bc47c KM |
150 | vlp(1), |
151 | vtroff(1), | |
152 | vgrindefs(5) | |
9005ce62 KM |
153 | .SH BUGS |
154 | Vfontedpr assumes that a certain programming style is followed: | |
155 | .PP | |
156 | For | |
157 | .B C | |
4a9bc47c KM |
158 | \- function names can be preceded on a line only by spaces, tabs, or an |
159 | asterisk. The parenthesized arguments must also be on the same line. | |
9005ce62 KM |
160 | .PP |
161 | For | |
162 | .B PASCAL | |
4a9bc47c | 163 | \- function names need to appear on the same line as the keywords |
9005ce62 | 164 | .I function |
4a9bc47c | 165 | or |
9005ce62 | 166 | .I procedure. |
9005ce62 KM |
167 | .PP |
168 | For | |
169 | .B MODEL | |
4a9bc47c | 170 | \- function names need to appear on the same line as the keywords |
9005ce62 KM |
171 | .I is |
172 | .I beginproc. | |
173 | .PP | |
174 | If these conventions are not followed, the indexing and marginal function | |
175 | name comment mechanisms will fail. | |
176 | .sp | |
177 | More generally, arbitrary formatting styles for programs mostly look bad. | |
178 | The use of spaces to align source code fails miserably; if you plan to | |
179 | .I vgrind | |
180 | your program you should use tabs. This is somewhat inevitable since the | |
181 | font used by | |
182 | .I vgrind | |
183 | is variable width. | |
184 | .PP | |
9005ce62 | 185 | The mechanism of ctags in recognizing functions should be used here. |
6d2470eb KM |
186 | .PP |
187 | Filter mode does not work in documents using the \-me or \-ms macros. | |
188 | (So what use is it anyway?) |