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 | .\" | |
4a9bc47c | 5 | .\" @(#)vgrind.1 5.1 (Berkeley) %G% |
9005ce62 | 6 | .\" |
4a9bc47c | 7 | .TH VGRIND 1 "3 August 1983" |
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 ), | |
130 | and ICON | |
131 | .RB ( \-lI ). | |
9005ce62 KM |
132 | .SH FILES |
133 | .ta 2i | |
134 | index file where source for index is created | |
135 | .br | |
136 | /usr/lib/tmac/tmac.vgrind macro package | |
137 | .br | |
138 | /usr/lib/vfontedpr preprocessor | |
4a9bc47c KM |
139 | .br |
140 | /usr/lib/vgrindefs language descriptions | |
9005ce62 | 141 | .SH AUTHOR |
4a9bc47c | 142 | Dave Presotto & William Joy |
9005ce62 | 143 | .SH SEE ALSO |
4a9bc47c KM |
144 | vlp(1), |
145 | vtroff(1), | |
146 | vgrindefs(5) | |
9005ce62 KM |
147 | .SH BUGS |
148 | Vfontedpr assumes that a certain programming style is followed: | |
149 | .PP | |
150 | For | |
151 | .B C | |
4a9bc47c KM |
152 | \- function names can be preceded on a line only by spaces, tabs, or an |
153 | asterisk. The parenthesized arguments must also be on the same line. | |
9005ce62 KM |
154 | .PP |
155 | For | |
156 | .B PASCAL | |
4a9bc47c | 157 | \- function names need to appear on the same line as the keywords |
9005ce62 | 158 | .I function |
4a9bc47c | 159 | or |
9005ce62 | 160 | .I procedure. |
9005ce62 KM |
161 | .PP |
162 | For | |
163 | .B MODEL | |
4a9bc47c | 164 | \- function names need to appear on the same line as the keywords |
9005ce62 KM |
165 | .I is |
166 | .I beginproc. | |
167 | .PP | |
168 | If these conventions are not followed, the indexing and marginal function | |
169 | name comment mechanisms will fail. | |
170 | .sp | |
171 | More generally, arbitrary formatting styles for programs mostly look bad. | |
172 | The use of spaces to align source code fails miserably; if you plan to | |
173 | .I vgrind | |
174 | your program you should use tabs. This is somewhat inevitable since the | |
175 | font used by | |
176 | .I vgrind | |
177 | is variable width. | |
178 | .PP | |
9005ce62 | 179 | The mechanism of ctags in recognizing functions should be used here. |