xref: /386bsd/usr/src/usr.bin/elvis/doc/versions.ms (revision a2142627)
1.Go 12 "VERSIONS"
2.PP
3\*E currently works under BSD UNIX, AT&T System-V UNIX, SCO XENIX,
4Minix, Coherent, MS-DOS, Atari TOS, OS9/68k, VAX/VMS, and AmigaDos.
5This section of the manual provides special information that applies to each
6particular version of \*E.
7.PP
8For all versions except MS-DOS,
9the file "Makefile.mix" should be copied to "Makefile",
10and then edited to select the correct set of options for your system.
11There is more information about this embedded in the file itself.
12.NH 2
13BSD UNIX
14.PP
15Temporary files are stored in /tmp.
16.PP
17You should modify /etc/rc so that
18the temp files are preserved when the system is rebooted.
19Find a line in /etc/rc which reads
20.br
21.ti +0.5i
22ex4.3preserve /tmp
23.PP
24or something like that, and append the following line after it:
25.br
26.ti +0.5i
27elvprsv /tmp/elv*
28.PP
29If you do not have permission to modify /etc/rc, don't fret.
30The above modification is only needed to allow you to recover your changes
31after a system crash.
32You can still run \*E without that modification,
33and you can still recover your changes when \*E crashes
34or when your dialup modem looses the carrier signal, or something like that.
35Only a system crash or power failure could hurt you.
36.PP
37Both \*E and the real Vi
38read initialization commands from a file called ".exrc",
39but the commands in that file might work on one but not the other.
40For example, "set keywordprg=man" will work for \*E,
41but Vi will complain because it doesn't have a "keywordprg" option.
42If the warning messages annoy you, then you can edit the config.h file
43to change the name of the initialization file ".exrc" to something else,
44such as ".elvisrc".
45.PP
46If you use X windows, you may wish to add "-DCS_LATIN1" to CFLAGS.
47This will cause the digraph table and the flipcase option to have default
48values that are appropriate for the LATIN-1 character set.
49That's the standard character set for X.
50.PP
51The default keyboard macro time-out value is larger for BSD than it is for
52some other systems, because I've had trouble running \*E via rlogin or Xterm.
53I guess it takes a while for those keystokes to squirt through the net.
54.NH 2
55System-V UNIX
56.PP
57Most SysV UNIX systems use terminfo instead of termcap,
58but  the  terminfo  library  doesn't seem to have a standard name.
59As shipped, Elvis' Makefile.mix  is  configured  with "LIBS=-lterm".
60You may need to change it to "LIBS=-ltermcap" or "LIBS=-lterminfo"
61or even "LIBS=-lcurses".
62.PP
63The /etc/rc file should be modified as described for BSD systems, above.
64The only difference is that SysV systems tend to have directories for
65initialization, instead of a single large /etc/rc file.
66Editor recovery is usually done somewhere in the /etc/rc2.d directory.
67.PP
68The potential trouble with ".exrc" described above for BSD UNIX applies
69to System-V UNIX as well.
70.PP
71\*E uses control-C as the interrupt key, not Delete.
72.NH 2
73SCO Xenix
74.PP
75For Xenix-386, you can use the generic System-V settings.
76You may wish to add "-DCS_IBMPC" to CFLAGS, to have the digraph table and
77flipcase option start up in a mode that is appropriate for the console.
78
79There is a separate group of settings for use with Xenix-286.
80It already has "-DCS_IBMPC" in CFLAGS.
81.PP
82Because Xenix is so similar to System-V, everything I said earlier about
83System-V applies to the Xenix version too, except that editor recovery
84probably belongs in a directory called /etc/rc.d/8.
85.NH 2
86Minix
87.PP
88There are separate settings in Makefile.mix for Minix-PC and Minix-68k.
89The differences between these two are that
90the 68k version uses ".o" for the object file extension where
91the PC version uses ".s", and
92the PC version has some extra flags in CFLAGS to reduce the size of \*E.
93The PC version also uses tinytcap (instead of the full termcap) to make it smaller.
94.PP
95Minix-PC users should read the CFLAGS section of this manual very carefully.
96You have some choices to make...
97.PP
98The temporary files are stored in /usr/tmp.
99The /usr/tmp directory must exist before you run \*E,
100and it must be readable/writable by everybody.
101We use /usr/tmp instead of /tmp because
102after a system crash or power failure,
103you can recover the altered version of a file from the temporary file
104in /usr/tmp.
105If it was stored in /tmp, though, then it would be lost because /tmp is
106normally located on the RAM disk.
107.PP
108\*E uses control-C as the interrupt key, not Delete.
109.NH 2
110Coherent
111.PP
112\*E was ported to Coherent by Esa Ahola.
113.PP
114\*E is too large to run under Coherent unless you eliminate some
115features via the CFLAGS setting.
116The recommended settings, in Makefile.mix, produce a working version
117of \*E which emulates Vi faithfully, but lacks most of the extensions.
118You should read the CFLAGS section of this manual carefully.
119.PP
120You can probably reduce the size of \*E by using tinytcap.c instead of -lterm.
121This would allow you to keep most features of \*E,
122at the expense of terminal independence.
123(Tinytcap.c has ANSI escape sequences hard-coded into it.)
124To use tinytcap, just add "tinytcap.o" to the "EXTRA=" line in the Makefile,
125and remove "-lterm" from the "LIBS=" line.
126.PP
127The temporary files are stored in /tmp.
128You should modify your /etc/rc file as described for BSD earlier.
129.NH 2
130MS-DOS
131.PP
132\*E was ported to MS-DOS by Guntram Blohm and Martin Patzel.
133Willett Kempton added support for the DEC Rainbow.
134.PP
135Ideally, \*E should be compiled with Microsoft C 5.10 and the standard
136Microsoft Make utility,
137via the command "make elvis.mak".
138This will compile \*E and all related utilities.
139.PP
140With Microsoft C 6.00, you may have trouble compiling regexp.c.
141If so, try compiling it without optimization.
142.PP
143The "Makefile.mix" file contains a set of suggested settings for compiling
144elvis with Turbo-C or Borland C.
145(If you have Turbo-C, but not the Make utility,
146then you can \fIalmost\fR use the "\*E.prj" file to compile \*E,
147but you must explicitly force Turbo-C to compile it with the "medium" memory model.
148Most of the related programs [ctags, ref, virec, refont, and wildcard] are
149only one file long, so you should have no trouble compiling them.)
150The "alias.c" file is meant to be compiled once into an executable named
151"ex.exe".
152You should then copy "ex.exe" to "vi.exe" and "view.exe".
153.PP
154\*E stores its temporary files in C:\\tmp.
155If this is not satisfactory, then you should edit the CFLAGS line of
156your Makefile to change TMPDIR to something else before compiling.
157You can also control the name of the temp directory via an environment
158variable named TMP or TEMP.
159The directory must exist before you can run \*E.
160.PP
161The TERM environment variable determines how elvis will write to the screen.
162It can be set to any one of the following values:
163.LD
164.ta 1.5i 2.5i
165	pcbios	Use BIOS calls on an IBM-PC clone.
166	rainbow	Use DEC Rainbow interface.
167	ansi	Use ANSI.SYS driver.
168	nansi	User faster NANSI.SYS driver.
169.DE
170.PP
171If the TERM variable isn't set, then elvis will automatically select either
172the "rainbow" interface (when run on a Rainbow) or "pcbios" (on an IBM clone).
173.PP
174You may prefer to use NANSI.SYS for speed;
175or you may NEED to use ANSI.SYS for a non-clone, such as a lap-top.
176If so, you should
177install one of these drivers by adding "driver = nansi.sys" (or whatever)
178to your CONFIG.SYS file,
179and then you should define TERM to be "nansi" (or whatever) by adding
180"set TERM=nansi" to your AUTOEXEC.BAT file.
181You must then reboot for these changes to take effect.
182After that, \*E will notice the "TERM" setting and use the driver.
183.PP
184Since ".exrc" is not a valid DOS filename,
185the name of the initialization file has been changed to "elvis.rc".
186Elvis will look for an "elvis.rc" file first in your home directory,
187and then in the current directory.
188Note that you must set an environment variable named "HOME" to the
189full pathname of your home directory, for Elvis to check there;
190if "HOME" isn't set, then Elvis will only look in the current directory.
191To set "HOME", you would typically add the following line to your
192AUTOEXEC.BAT file:
193.br
194.ti +0.5i
195set HOME c:\\
196.PP
197An extra program, called "wildcard", is needed for MS-DOS.
198It expands wildcard characters in file names.
199If \*E flashes a "Bad command or filename" message when it starts,
200then you've probably lost the WILDCARD.EXE program somehow.
201.PP
202\*E can run under Windows, but only in full-screen mode.
203Also, Windows uses an environment variable called TEMP which interferes with
204elvis' usage of TEMP;
205to work around this, you can simply set an environment variable named
206TMP (with no 'E') to the name of elvis' temporary directory.
207When TEMP and TMP are both set, \*E uses TMP and ignored TEMP.
208.NH 2
209Atari TOS
210.PP
211\*E was ported to Atari TOS by Guntram Blohm and Martin Patzel.
212It is very similar to the MS-DOS version.
213It has been tested with the Mark Williams C compiler and also GNU-C.
214.PP
215The TERM environment variable is ignored;
216the ST port always assumes that TERM=vt52.
217The SHELL (not COMSPEC!) variable should be set to
218the name of a line-oriented shell.
219.PP
220A simple shell in included with \*E.
221Its source is in "shell.c", and the name of the executable is "shell.ttp".
222The file "profile.sh" should contain a set of instructions to be executed
223when the shell first starts up.
224An example of this file is included, but you will almost certainly want to
225edit it right away to match your configuration.
226(If you already have a command-line shell,
227then you'll probably want to continue using it.
228The shell that comes with \*E is very limited.)
229.PP
230Currently, character attributes cannot be displayed on the screen.
231.PP
232\*E runs under MiNT (a free multi-tasking extension to TOS)
233but it can be a CPU hog because of the way that \*E reads from the
234keyboard with timeout.
235Also, \*E doesn't use any of the special features of MiNT.
236I have received a set of patches that optimize \*E for MiNT,
237but they arrived too late to integrate into this release.
238.NH 2
239OS9/68k
240.PP
241\*E was ported to OS9/68k by Peter Reinig.
242.PP
243The Makefile is currently configured to install \*E and the related
244programs in /dd/usr/cmds
245If this this is unacceptable, then you should change the BIN setting
246to some other directory.
247Similarly, it expects the source code to reside in /dd/usr/src/elvis;
248the ODIR setting is used to control this.
249.PP
250Temporary files are stored in the /dd/tmp directory.
251Your /dd/startup file may need to be modified
252to prevent it from deleting \*E' temporary files;
253make /dd/startup run the \fIelvprsv\fR program before it wipes out /dd/tmp.
254.PP
255The program in alias.c is linked repeatedly to produce the
256"vi", "view", and "input" aliases for \*E.
257Sadly, the "ex" alias is impossible to implement under OS9
258because the shell has a built-in command by that name.
259.PP
260For some purposes,
261you must give `make' the "-b" option.
262Specifically, you need this for "make -b clean" and "make -b install".
263.NH 2
264VAX/VMS
265.PP
266John Campbell ported \*E to VAX/VMS.
267.PP
268A heavily laden VAX can take half an hour to compile elvis.
269This is normal.
270Don't panic.
271.PP
272While running, elvis will create temporary files in SYS$SCRATCH.
273Enter SHOW LOGICAL SYS$SCRATCH to see what actual directory you are using.
274Many sites have SYS$SCRATCH equivalenced to SYS$LOGIN.
275The elvis temporary files look like the following on VMS while elvis is running:
276.br
277.ti 0.75i
278ELV_1123A.1;1       ELV_1123A.2;1       SO070202.;1
279.PP
280Also, filtering commands (like !!dir and !}fmt) should work on VMS.
281This assumes, however, that you can create temporary mailboxes and that
282your mailbox quota (a sysgen parameter) is at least 256 bytes for a
283single write to the mailbox.
284This is the default sysgen parameter,
285so there should be few people who experience filter problems.
286.PP
287Additionally, an attempt was made to support the standard terminals on VMS:
288"vt52", "vt100", "vt200", "vt300", "vt101", "vt102".
289Non-standard terminals could be supported by setting your terminal type to
290UNKNOWN (by entering SET TERM/UNKNOWN)
291and defining the logical name ELVIS_TERM.
292Whatever ELVIS_TERM translates to, however, will have to be included in
293tinytcap.c.
294Note that the upper/lowercase distinctions are significant,
295and that DCL will upshift characters that are not quoted strings, so
296enter DEFINE ELVIS_TERM "hp2621a".
297As distributed, it would probably not be a good idea to have more than the
298standard terminals in tinytcap.c (else it wouldn't be tiny, would it?).
299Changes here, of course, would require a recompilation to take effect.
300.PP
301If you have a version of the "termcap" library and database on your system,
302then you may wish to replace tinytcap with the real termcap.
303.NH 2
304AmigaDOS
305.PP
306Mike Rieser and Dale Rahn ported \*E to AmigaDOS.
307.PP
308The port was done using Manx Aztec C version 5.2b.
309\*E uses about as much space as it can and still be small code and data.
310\*E should also compile under DICE, though there may be a little trouble with
311signed versus unsigned chars.
312.PP
313The port has been done so the same binary will run under both versions of AmigaDOS.
314Under AmigaDOS 2.04, \*E supports all the documented features.
315It also uses an external program ref to do tag lookup.
316So, the accompanying programs: ref and ctags are recommended.
317Under AmigaDOS 1.2/1.3 \*E works, buts lacks the more advanced features.
318.PP
319For the port to AmigaDOS 2.04, we tried to use as many Native AmigaDOS
320calls as we could.
321This should increase Elvis's chances at being compiled with other compilers.
322DICE seems to have a different default char type.
323You may need to use the UCHAR() macro in tio.c.
324To test it, try the :map command; if it looks right, things are cool.
325.PP
326For the port to AmigaDOS 1.3, we tried to make sure the program was at
327least usable.
328Many features are missing, most notably running commands in subshells.
329Also, what we could get working, we used Aztec functions to support them,
330so this part is little more compiler dependent.
331.PP
332Aztec is compatible with the SAS libcall #pragma.
333I personally prefer using the includes that come from Commodore over the ones
334supplied with Aztec, but for people with a straight Aztec installation,
335I went with the default names for the Aztec pragmas.
336.PP
337One include you'll need is <sys/types.h>.
338Its a common include when porting software just make yourself one.
339Its a two line file that saves a lot of hassle especially in the elvis source.
340So, make a directory where your includes are located called `sys'
341and in a file below that type:
342.br
343.ti +0.8i
344/* sys/types.h */
345.br
346.ti +0.8i
347#include <exec/types.h>
348.PP
349When setting environment variables (either local or global) for
350variables that specify a directory, make sure the variable ends in `:'
351or `/'.
352This saved from having to change much of the way elvis works.
353The default temporary directory (if TEMP and TMP aren't specified) is "T:".
354The default if HOME directory (if no HOME environment variable is set) is "S:".
355.PP
356To avoid conlict with other uses, \*E uses elvis.rc instead of .exrc or
357where it looks for macros.
358.NH 2
359Other Systems
360.PP
361For Sun workstations, use the BSD configuration.
362Earlier versions of elvis didn't link correctly due to a quirk in Sun's
363version of the "make" utility, but this version of elvis has a work-around
364for that quirk so you should have no trouble at all.
365.PP
366For Linux, use the SysV settings.
367You can probably just remove the "-lterm" from the "LIBS= -lterm" line,
368since linux keeps the termcap functions in the standard C library.
369.PP
370For other UNIXoid systems, I suggest you start with the Minix-68k settings
371and then grow from that.
372Minix is a nice starting point because it is a clone of Version 7 UNIX,
373which was the last common ancestor of BSD UNIX and SysV UNIX.
374Any Operating System which claims any UNIX compatibility what so ever
375will therefore support V7/Minix code.
376You may need to fiddle with #include directives or something, though.
377Minix-68k is a better starting point than Minix-PC because the PC compiler
378has some severe quirks.
379