Notes on modifications made to GNU Emacs for the VAX/VMS version ---------------------------------------------------------------- February, 1986 Mukesh Prasad 1. TERMCAP.DAT file needs special entries for 'nl' capability, since on VMS, '\n' is output in an undesirable manner. For VT100 series terminals, a special character sequence is available for moving to first column of next row. This character sequence is used instead of '\n'. Similar entries may have to be added for other terminals. 2. 'unexec' cannot be implemented as in the Unix version. VMS version maps its data area and initial alloc area in from a file, created by dump-emacs. This file is defined by the logical name "EMACS_MAPFILE". To create this file, invoke emacs with the command line arguments "-l -d" and have the loaded file call 'dump-emacs'. For the purposes of dumping the data and mapping it back in, the start and the end of the data area are obtained through defining a special module name which will have its static data located at the start of the data area, and by defining a special variable name which will be located at the end of the data area. BE VERY CAREFUL IN ADDING ANY LINKER OPTIONS. See files VMSMAP.C, $$$$FIRSTFILE.C and MALLOC.C. Also see the map file EMACS.MAP generated by the linker. 3. Behaviour of 'getenv' within Emacs is defined as follows: it will take its argument, append it to the string "EMACSVAR_", and attempt to logically translate the resultant string, through VMS logical name translation. If not successful, it will call the normal VAX/C getenv, but only if the argument is one of "USER", "HOME", "TERM" or "PATH". See SYSDEP.C. 4. File I/O, of course, is different. Specifically, anyone making modifications to the source code or writing lisp code needs to be aware that on VMS, a directory name is different from a directory's file name. E.g. "[MUKESH.XYZZY]" is a directory name, but if one wants to access is as a file, one needs to use "[MUKESH]XYZZY.DIR" as the filename. Or worse yet, to access the directory "[MUKESH]" as a file, one needs to access the file "[0,0]MUKESH.DIR". The lisp subr "directory-file-name" will do this conversion. Don't expect to read directory files either, they are only good for checking access and doing 'stat's. Also note that on VMS filenames are case insensitive, and that file name expansion as implemented for VMS does not return a version number. See FILEIO.C. 5. Keyboard I/O is done through opening a channel to the terminal, resetting its mode appropriately, and leaving QIOs outstanding on it, with an AST completion routine taking care of issuing the next QIO. This completion routine can also set a VMS event flag, allowing a wait for input, as well wait for input with timeout, or multi event wait, etc. See SYSDEP.C and KEYBOARD.C. 8. VMS emulation of process invocation will be rather hairy and not particularly useful, since (a) process creation is expensive on VMS and (b) the number of commands built-in in DCL (shell) is much larger and includes many useful commands, than in Bourne or C shells. Therefore, special handling for a DCL command interface has been added. See VMSFNS.C. For an example of using the facilities provided by this module, see VMSPROC.EL. 9. Some special VMS only functions are: setprv Sets a process's privilege mask. (Used in writing files. See FILES.EL.) set-xon Resets terminal modes to have XON/XOFF characters be processed (or not) by VMS. 10. The following logical names should be defined for EMACS: EMACSVAR_TERMCAP The location of the TERMCAP.DAT file. EMACSVAR_TERM The terminal type. This need not be provided if the terminal type is known to VAX/VMS. EMACS_LISPDIR The location of lisp code. EMACSLOADPATH is also available through logical name EMACSVAR_EMACSLOADPATH. EMACS_MAPFILE The mapping file for data. EMACS_DIR Location of auxiliary files. 11. The startup file name is changed to "EMACSINI", which should be defined as a logical name. 12. File names have all '-'s replaced by '_'s. Auto save file names are generated by prepending a "$" to the file name. 13. Known bugs: doctor.el cannot be loaded in the compiled version.