source: trunk/minix/commands/elvis/Man.sh@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

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