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