pci: don't do sanity check for missing pci bus, the check can misfire.
[minix.git] / commands / elvis / Man.sh
blob5dc7f875bdfd366d67dec8dcfa3525c941d51bd6
1 echo x - ctags.man
2 sed '/^X/s///' > ctags.man << '/'
3 X.TH CTAGS 1
4 X.SH NAME
5 Xctags - Generates "tags" and (optionally) "refs" files
6 X.SH SYNOPSIS
7 X\fBctags\fP [\fB-stvra\fP] \fIfilesnames\fP...
8 X.SH DESCRIPTION
9 X\fIctags\fP generates the "tags" and "refs" files
10 Xfrom a group of C source files.
11 XThe "tags" file is used by Elvis' ":tag" command,
12 Xcontrol-] command,
13 Xand -t option.
14 XThe "refs" file is sometimes used by the \fIref(1)\fP program.
15 X.PP
16 XEach C source file is scanned for #define statements and
17 Xglobal function definitions.
18 XThe name of the macro or function becomes the name of a tag.
19 XFor each tag, a line is added to the "tags" file which contains:
20 X.RS
21 X.nf
22 X - the name of the tag
23 X - a tab character
24 X - the name of the file containing the tag
25 X - a tab character
26 X - a way to find the particular line within the file.
27 X.RE
28 X.fi
29 X.PP
30 XThe filenames list will typically be the names of all C source
31 Xfiles in the current directory, like this:
32 X.RS
33 X.nf
34 X$ ctags -stv *.[ch]
35 X.RE
36 X.fi
37 X.SH OPTIONS
38 X.IP \fB-t\fR
39 XInclude typedefs.
40 XA tag will be generated for each user-defined type.
41 XAlso tags will be generated for struct and enum names.
42 XTypes are considered to be global if they are defined in a header file,
43 Xand static if they are defined in a C source file.
44 X.IP \fB-v\fR
45 XInclude variable declarations.
46 XA tag will be generated for each variable, except for those that are declared
47 Xinside the body of a function.
48 X.IP \fB-s\fR
49 XInclude static tags.
50 X\fICtags\fR will normally put global tags in the "tags" file, and silently ignore
51 Xthe static tags.
52 XThis flag causes both global and static tags to be added.
53 XThe name of a static tag is generated by prefixing the name of the declared
54 Xitem with the name of the file where it is defined, with a colon in between.
55 XFor example, "static foo(){}" in "bar.c" results in a tag named "bar.c:foo".
56 X.IP \fB-r\fP
57 XThis causes \fIctags\fP to generate both "tags" and "refs".
58 XWithout \fB-r\fP, it would only generate "tags".
59 X.IP \fB-a\fR
60 XAppend to "tags", and maybe "refs".
61 XNormally, \fIctags\fR overwrites these files each time it is invoked.
62 XThis flag is useful when you have to many files in the current directory
63 Xfor you to list them on a single command-line;
64 Xit allows you to split the arguments among several invocations.
65 X.SH FILES
66 X.IP tags
67 XA cross-reference that lists each tag name, the name of the source file that
68 Xcontains it, and a way to locate a particular line in the source file.
69 X.IP refs
70 XThe "refs" file contains the definitions for each tag in the "tags" file,
71 Xand very little else.
72 XThis file can be useful, for example, when licensing restrictions prevent
73 Xyou from making the source code to the standard C library readable by everybody,
74 Xbut you still everybody to know what arguments the library functions need.
75 X.SH BUGS
76 X.PP
77 X\fIctags\fR is sensitive to indenting and line breaks.
78 XConsequently, it might not discover all of the tags in a file that
79 Xis formatted in an unusual way.
80 X.SH "SEE ALSO"
81 Xelvis(1), refs(1)
82 X.SH AUTHOR
83 X.nf
84 XSteve Kirkendall
85 Xkirkenda@cs.pdx.edu
86 X.fi
88 echo x - elvis.man
89 sed '/^X/s///' > elvis.man << '/'
90 X.TH ELVIS 1
91 X.SH NAME
92 Xelvis, ex, vi, view, input - The editor
93 X.SH SYNOPSIS
94 X\fBelvis\fP [\fIflags\fP] [\fB+\fP\fIcmd\fP] [\fIfiles\fP...]
95 X.SH DESCRIPTION
96 X\fIElvis\fP is a text editor which emulates \fIvi\fP/\fIex\fP.
97 X.PP
98 XOn systems which pass the program name as an argument, such as Unix and Minix,
99 Xyou may also install \fIelvis\fP under the names "ex", "vi", "view", and "input".
100 XThese extra names would normally be links to elvis;
101 Xsee the "ln" shell command.
102 X.PP
103 XWhen \fIelvis\fP is invoked as "vi",
104 Xit behaves exactly as though it was invoked as "elvis".
105 XHowever, if you invoke \fIelvis\fP as "view",
106 Xthen the readonly option is set as though you had given it the "-R" flag.
107 XIf you invoke \fIelvis\fP as "ex",
108 Xthen \fIelvis\fP will start up in the colon command mode
109 Xinstead of the visual command mode,
110 Xas though you had given it the "-e" flag.
111 XIf you invoke \fIelvis\fP as "input" or "edit",
112 Xthen \fIelvis\fP will start up in input mode,
113 Xas though the "-i" flag was given.
114 X.SH OPTIONS
115 X.IP \fB-r\fP
116 XTo the real vi, this flag means that a previous edit should be recovered.
117 X\fIElvis\fP, though, has a separate program, called \fIelvrec(1)\fP, for recovering
118 Xfiles.
119 XWhen you invoke \fIelvis\fP with -r, \fIelvis\fP will tell you to run \fIelvrec\fP.
120 X.IP \fB-R\fP
121 XThis sets the "readonly" option,
122 Xso you won't accidentally overwrite a file.
123 X.IP "\fB-t\fP \fItag\fP"
124 XThis causes \fIelvis\fP to start editing at the given tag.
125 X.IP "\fB-m\fP [\fIfile\fP]"
126 X\fIElvis\fP will search through \fIfile\fP for something that looks like
127 Xan error message from a compiler.
128 XIt will then begin editing the source file that caused the error,
129 Xwith the cursor sitting on the line where the error was detected.
130 XIf you don't explicitly name a \fIfile\fP, then "errlist" is assumed.
131 X.IP \fB-e\fP
132 X\fIElvis\fP will start up in colon command mode.
133 X.IP \fB-v\fP
134 X\fIElvis\fP will start up in visual command mode.
135 X.IP \fB-i\fP
136 X\fIElvis\fP will start up in input mode.
137 X.IP "\fB-w\fR \fIwinsize\fR"
138 XSets the "window" option's value to \fIwinsize\fR.
139 X.IP "\fB+\fP\fIcommand\fP or \fB-c\fP \fIcommand\fP"
140 XIf you use the +\fIcommand\fP parameter,
141 Xthen after the first file is loaded
142 X\fIcommand\fP is executed as an EX command.
143 XA typical example would be "elvis +237 foo",
144 Xwhich would cause \fIelvis\fP to start editing foo and
145 Xthen move directly to line 237.
146 XThe "-c \fIcommand\fP" variant was added for UNIX SysV compatibility.
147 X.SH FILES
148 X.IP /tmp/elv*
149 XDuring editing,
150 X\fIelvis\fP stores text in a temporary file.
151 XFor UNIX, this file will usually be stored in the /tmp directory,
152 Xand the first three characters will be "elv".
153 XFor other systems, the temporary files may be stored someplace else;
154 Xsee the version-specific section of the documentation.
155 X.IP tags
156 XThis is the database used by the \fI:tags\fP command and the \fB-t\fP option.
157 XIt is usually created by the \fIctags(1)\fP program.
158 X.IP ".exrc or elvis.rc"
159 XOn UNIX-like systems, a file called ".exrc" in your home directory
160 Xis executed as a series of \fIex\fR commands.
161 XA file by the same name may be executed in the current directory, too.
162 XOn non-UNIX systems, ".exrc" is usually an invalid file name;
163 Xthere, the initialization file is called "elvis.rc" instead.
164 X.SH "SEE ALSO"
165 Xctags(1), ref(1), virec(1)
166 X.PP
167 X\fIElvis - A Clone of Vi/Ex\fP, the complete \fIelvis\fP documentation.
168 X.SH BUGS
169 XThere is no LISP support.
170 XCertain other features are missing, too.
171 X.PP
172 XAuto-indent mode is not quite compatible with the real vi.
173 XAmong other things, 0^D and ^^D don't do what you might expect.
174 X.PP
175 XLong lines are displayed differently.
176 XThe real vi wraps long lines onto multiple rows of the screen,
177 Xbut \fIelvis\fP scrolls sideways.
178 X.SH AUTHOR
179 X.nf
180 XSteve Kirkendall
181 Xkirkenda@cs.pdx.edu
182 X.fi
183 X.PP
184 XMany other people have worked to port \fIelvis\fP to various operating systems.
185 XTo see who deserves credit, run the \fI:version\fP command from within \fIelvis\fP,
186 Xor look in the system-specific section of the complete documentation.
188 echo x - elvprsv.man
189 sed '/^X/s///' > elvprsv.man << '/'
190 X.TH ELVPRSV 1
191 X.SH NAME
192 Xelvprsv - Preserve the the modified version of a file after a crash.
193 X.SH SYNOPSIS
194 X.nf
195 X\fB\fBelvprsv\fP ["-\fIwhy elvis died\fP"] /tmp/\fIfilename\fP...
196 X\fB\fBelvprsv\fP -R /tmp/\fIfilename\fP...
197 X.fi
198 X.SH DESCRIPTION
199 X.PP
200 X\fIelvprsv\fP preserves your edited text after \fIelvis\fP dies.
201 XThe text can be recovered later, via the \fIelvprsv\fP program.
202 X.PP
203 XFor UNIX-like systems,
204 Xyou should never need to run this program from the command line.
205 XIt is run automatically when \fIelvis\fP is about to die,
206 Xand it should be run (via /etc/rc) when the computer is booted.
207 XTHAT'S ALL!
208 X.PP
209 XFor non-UNIX systems such as MS-DOS, you can either use \fIelvprsv\fP
210 Xthe same way as under UNIX systems (by running it from your AUTOEXEC.BAT file),
211 Xor you can run it separately with the "-R" flag to recover the files
212 Xin one step.
213 X.PP
214 XIf you're editing a file when \fIelvis\fP dies
215 X(due to a bug, system crash, power failure, etc.)
216 Xthen \fIelvprsv\fP will preserve the most recent version of your text.
217 XThe preserved text is stored in a special directory; it does NOT overwrite
218 Xyour text file automatically.
219 X.PP
220 X\fIelvprsv\fP will send mail to any user whose work it preserves,
221 Xif your operating system normally supports mail.
222 X.SH FILES
223 X.IP /tmp/elv*
224 XThe temporary file that \fIelvis\fP was using when it died.
225 X.IP /usr/preserve/p*
226 XThe text that is preserved by \fIelvprsv\fP.
227 X.IP /usr/preserve/Index
228 XA text file which lists the names of all preserved files, and the names
229 Xof the /usr/preserve/p* files which contain their preserved text.
230 X.SH BUGS
231 X.PP
232 XDue to the permissions on the /usr/preserve directory, on UNIX systems
233 X\fIelvprsv\fP must be run as superuser.
234 XThis is accomplished by making the \fIelvprsv\fP executable be owned by "root"
235 Xand turning on its "set user id" bit.
236 X.PP
237 XIf you're editing a nameless buffer when \fIelvis\fP dies, then \fIelvprsv\fP will pretend
238 Xthat the file was named "foo".
239 X.SH AUTHOR
240 X.nf
241 XSteve Kirkendall
242 Xkirkenda@cs.pdx.edu
243 X.fi
245 echo x - elvrec.man
246 sed '/^X/s///' > elvrec.man << '/'
247 X.TH ELVREC 1
248 X.SH NAME
249 Xelvrec - Recover the modified version of a file after a crash
250 X.SH SYNOPSIS
251 X.nf
252 X\fBelvrec\fP [\fIpreservedfile\fP [\fInewfile\fR]]
253 X.fi
254 X.SH DESCRIPTION
255 X.PP
256 XIf you're editing a file when \fIelvis\fP dies, the system crashes, or power fails,
257 Xthe most recent version of your text will be preserved.
258 XThe preserved text is stored in a special directory; it does NOT overwrite
259 Xyour text file automatically.
260 X.PP
261 XThe \fIelvrec\fP program locates the preserved version of a given file,
262 Xand writes it over the top of your text file -- or to a new file, if you prefer.
263 XThe recovered file will have nearly all of your changes.
264 X.PP
265 XTo see a list of all recoverable files, run \fIelvrec\fP with no arguments.
266 X.SH FILES
267 X.IP /usr/preserve/p*
268 XThe text that was preserved when \fIelvis\fP died.
269 X.IP /usr/preserve/Index
270 XA text file which lists the names of all preserved files, and the names
271 Xof the /usr/preserve/p* files which contain their preserved text.
272 X.SH BUGS
273 X.PP
274 X\fIelvrec\fP is very picky about filenames.
275 XYou must tell it to recover the file using exactly the same pathname as
276 Xwhen you were editing it.
277 XThe simplest way to do this is to go into the same directory that you were
278 Xediting, and invoke \fIelvrec\fP with the same filename as \fIelvis\fP.
279 XIf that doesn't work, then try running \fIelvrec\fP with no arguments,
280 Xto see exactly which pathname it is using for the desired file.
281 X.PP
282 XDue to the permissions on the /usr/preserve directory, on UNIX systems
283 X\fIelvrec\fP must be run as superuser.
284 XThis is accomplished by making the \fIelvrec\fP executable be owned by "root"
285 Xand setting its "set user id" bit.
286 X.PP
287 XIf you're editing a nameless buffer when \fIelvis\fP dies, then \fIelvrec\fP
288 Xwill pretend that the file was named "foo".
289 X.SH AUTHOR
290 X.nf
291 XSteve Kirkendall
292 Xkirkenda@cs.pdx.edu
293 X.fi
295 echo x - fmt.man
296 sed '/^X/s///' > fmt.man << '/'
297 X.TH FMT 1
298 X.SH NAME
299 Xfmt - adjust line-length for paragraphs of text
300 X.SH SYNOPSIS
301 X\fBfmt\fP [\-\fIwidth\fP] [\fIfiles\fP]...
302 X.SH DESCRIPTION
303 X\fIfmt\fR is a simple text formatter.
304 XIt inserts or deletes newlines, as necessary, to make all lines in a
305 Xparagraph be approximately the same width.
306 XIt preserves indentation and word spacing.
307 X.PP
308 XThe default line width is 72 characters.
309 XYou can override this with the \-\fIwidth\fR flag.
310 XIf you don't name any files on the command line,
311 Xthen \fIfmt\fR will read from stdin.
312 X.PP
313 XIt is typically used from within \fIvi\fR to adjust the line breaks
314 Xin a single paragraph.
315 XTo do this, move the cursor to the top of the paragraph,
316 Xtype "!}fmt", and
317 Xhit <Return>.
318 X.SH AUTHOR
319 X.nf
320 XSteve Kirkendall
321 Xkirkenda@cs.pdx.edu
322 X.fi
324 echo x - ref.man
325 sed '/^X/s///' > ref.man << '/'
326 X.TH REF 1
327 X.SH NAME
328 Xref - Display a C function header
329 X.SH SYNOPSIS
330 X\fBref\fR [-t] [-c \fIclass\fR]... [-f \fIfile\fR]... \fItag\fR
331 X.SH DESCRIPTION
332 X\fIref\fP quickly locates and displays the header of a function.
333 XTo do this, \fIref\fR
334 Xlooks in the "tags" file for the line that describes the function, and then
335 Xscans the source file for the function.
336 XWhen it locates the function, it displays an introductory comment
337 X(if there is one), the function's declaration, and the declarations of all
338 Xarguments.
339 X.SH "SEARCH METHOD"
340 X.PP
341 X\fIref\fR uses a fairly sophisticated tag look-up algorithm.
342 XIf you supply a filename via \fB-f\fR \fIfile\fR, then elvis first scans
343 Xthe tags file for a static tag from that file.
344 XThis search is limited to the tags file in the current directory.
345 X.PP
346 XIf you supply a classname via \fB-c\fR \fIclass\fR, then elvis searches
347 Xfor a tag from that class.
348 XThis search is not limited to the current directory;
349 XYou can supply a list of directories in the environment variable \fITAGPATH\fR,
350 Xand \fIref\fR will search through the "tags" file in each directory until it finds
351 Xa tag in the desired class.
352 X.PP
353 XIf that fails, \fIref\fR will then try to look up an ordinary global tag.
354 XThis search checks all of the directories listed in \fITAGPATH\fR, too.
355 X.PP
356 XIf you've given the \fB-t\fR flag, then \fIref\fR will simply output the tag line that
357 Xit found, and then exit.
358 XWithout \fB-t\fR, though, \fIref\fR will search for the tag line.
359 XIt will try to open the source file, which should be in the same directory
360 Xas the tags file where the tag was discovered.
361 XIf the source file doesn't exist, or is unreadable, then \fIref\fR will try to open
362 Xa file called "\fIrefs\fR" in that directory.
363 XEither way, \fIref\fR will try to locate the tag, and display whatever it finds.
364 X.SH "INTERACTION WITH ELVIS"
365 X.PP
366 X\fIref\fP is used by \fIelvis\fR' shift-K command.
367 XIf the cursor is located on a word such as "splat", in the file "foo.c",
368 Xthen \fIelvis\fR will invoke \fIref\fR with the command "ref -f foo.c splat".
369 X.PP
370 XIf \fIelvis\fR has been compiled with the -DEXTERNAL_TAGS flag, then \fIelvis\fR will
371 Xuse \fIref\fR \fB\fRto scan the tags files.
372 XThis is slower than the built-in tag searching, but it allows \fIelvis\fR to access
373 Xthe more sophisticated tag lookup provided by \fIref\fR.
374 XOther than that, external tags should act exactly like internal tags.
375 X.SH OPTIONS
376 X.IP \fB-t\fR
377 XOutput tag info, instead of the function header.
378 X.IP "\fB-f\fR \fIfile\fR"
379 XThe tag might be a static function in \fIfile\fR.
380 XYou can use several -f flags to have \fIref\fR consider static tags from more than one file.
381 X.IP "\fB-c\fR \fIclass\fR"
382 XThe tag might be a member of class \fIclass\fR.
383 XYou can use several -c flags to have \fIref\fR consider tags from more than one class.
384 X.SH FILES
385 X.IP \fBtags\fR
386 XList of function names and their locations, generated by \fIctags\fR.
387 X.IP \fBrefs\fR
388 XFunction headers extracted from source files (optional).
389 X.SH ENVIRONMENT
390 X.IP \fBTAGPATH\fR
391 XList of directories to be searched.
392 XThe elements in the list are separated by either
393 Xsemicolons (for MS-DOS, Atari TOS, and AmigaDos), or
394 Xby colons (every other operating system).
395 XFor each operating system, \fIref\fR has a built-in default which is probably
396 Xadequate.
397 X.SH NOTES
398 X.PP
399 XYou might want to generate a "tags" file the directory that contains the
400 Xsource code for standard C library on your system.
401 XIf licensing restrictions prevent you from making the library source readable
402 Xby everybody, then you can have \fIctags\fR generate a "refs" file,
403 Xand make "refs" readable by everybody.
404 X.PP
405 XIf your system doesn't come with the library source code, then perhaps you
406 Xcan produce something workable from the \fIlint\fR libraries.
407 X.SH "SEE ALSO"
408 Xelvis(1), ctags(1)
409 X.SH AUTHOR
410 X.nf
411 XSteve Kirkendall
412 Xkirkenda@cs.pdx.edu
413 X.fi