! File: ATG_EVE.TPU Define the ATG EVE keypad startup file environment ! Creation: 24 March 1986 ! Author: Nick de Smith ! Applied Telematics Services, 7 Vale Avenue, Tunbridge Wells, Kent TN1 1DJ, England. ! +44 892 511000, PSI%234213300154::NICK ! ! Copyright (c) 1986,1987,1988,1989 by Applied Telematics Group Limited and Nick de Smith. ! This software is supplied for information only. No guarantee is supplied for this software, and no liability ! will be accepted for any action resulting from the use of this software or the information contained herein. ! Under no circumstances may this software be used for commercial gain, including its sale, lease or loan. ! This software may be copied only with the inclusion of this copyright notice. ! The author is prepared to enter into correspondance with interested parties, but will not necessarily ! maintain this software. Having said all that, enjoy it! ! ! Edit Edit date By Why ! 2.04 19-Sep-89 NMdS Fix minor bug/problem where editing an illegal file name (eg. "&#$$&%!$") would cause ! an annoying message ("Parameter 1's data type...). ! 2.03 02-May-89 NMdS Check it works with DECwindows (it does! and without modification too!) ! Well, it works under 5.1, but DECwindows EVE has a problem with starting up in 132 columns. ! Try starting up in 80 columns under DECwindows. ! 2.02 20-Dec-88 NMdS Added in wildcard support for GOLD I. Added in general mark processing for GOLD./F18 ! as per EVE (in fact, use the EVE routines to do it). ! When a buffer other than MAIN is made writeable, mark it as modified so that the user ! will always be asked about writing it. ! 2.01 23-Nov-88 NMdS VMS V5.0 (largely re-written from my previous versions) ! ! Description ! =========== ! ! ATG_EVE is an EVE "product" that implements a version of the "EDT standard" initialiser. When built into ! a product and, invoked as described below, the user is presented with an editor that is VERY similar to EDT. ! All the key definitions that the user would expect are there, including those from the "standard initialiser". ! However, all of EVE is also there, so if you want any EVE functions, they are also available. ! We find that this is a very good way of weaning users from EDT onto EVE and real TPU. ! ! The extra functions (on top of the EDT keypad) are: ! ! GOLD . Insert special marker. ! Inserts a marker of the form "~~/\~~" into the text that GOLD / can locate. You can define the ! symbol "atg$x_text_marker" in your initialisation file to some other string, if you wish. ! GOLD / Locate and remove special marker. ! GOLD $ Spawn a sub-process. ! Suspends the editing session and transfers control of the terminal to the sub-process. ! When you log out, the editing session resumes. ! GOLD ^ Execute a single DCL command and include the output in the current buffer. ! Very useful for including DIRECTORY output etc. ! GOLD B Switch to specified buffer. If the buffer does not exist, it is created. If you type ! to the prompt, you will be given a menu of available buffers to switch to (see GOLD S below). ! GOLD I Include a file into the named buffer. The default for the buffer name is the FILENAME.TYPE ! of the included file. If a "." is specified at the end of a buffer name, then the file is included ! at the current editing position in that buffer, otherwise the file is included at the start of ! the buffer. You may specify wildcards in the include specification. ! GOLD L Switch to last used buffer. Very useful for "toggling" between buffers. ! GOLD M Switch to the "MAIN" buffer. ! GOLD O Output the specified buffer to a file. The default is to use the current buffer. The defaults ! for the filename are SYS$DISK:[]BUFFERNAME ! GOLD P Protect the specified buffer. Using GOLD P toggles the "un-modifiable" bit on the specified buffer. ! GOLD Q Quit from the editor. If you have modified any writeable buffers, then you will be asked if you ! really mean to quit. ! GOLD R Make buffer read-only. The default is to use the current buffer. This prevents the specified ! buffer from being written to a file when the editor exits. Use with caution. ! GOLD S Show buffer list. The list of available buffers is displayed as a menu. You can use the UP-ARROW ! (or PREV_SCREEN) and DOWN-ARROW (or NEXT_SCREEN) keys to select a buffer, and SELECT, ENTER or RETURN ! to switch to that buffer. The default menu position is to select the current buffer. The selected buffer ! name is highlighted as you move the menu position. ! The first three characters in the menu line are: ! Character Meaning ! R Buffer is read-only (will not be written when the editor exits). ! W Buffer will be written when the editor exits. ! M Buffer contents has been modified since it was created. ! = Buffer is the "current" buffer. ! If the filename field contains a name in brackets, eg. (USER_ROOT:[NICK]LOGIN.COM), then the name ! is that of the last file included into the buffer (eg. with GOLD I), otherwise the filename field contains ! the name of the file, if any, that will be generated when the editor exits. ! GOLD V Show the version of this file. ! GOLD W Make buffer writeable. The default is to use the current buffer. You will be asked for the name of ! the file that you wish the specified buffer to be written to when the editor exits. The default filename ! is SYS$DISK:[]BUFFERNAME. eg. if your buffer is called FRED.FLINT, then the file generated will be ! SYS$DISK:[]FRED.FLINT ! ! GOLD CTRL/G Replace the SELECT region with the contents of the specified buffer. ! CTRL/G Paste the specified buffer into the current buffer (include it at the current position). ! GOLD CTRL/P Cut the SELECT region to the specified buffer. ! CTRL/P Copy the SELECT region to the specified buffer. ! GOLD CTRL/W Toggle screen width between 80 and 132 columns. The editor comes up in 132 column mode by default. ! Include the line "tpu atg$set_screen_width(80)" in your EVE initialisation file (normally called ! SYS$LOGIN:EVE$INIT.EVE). Alternatively include "atg$set_screen_width(80)" in your TPU command file ! (normally called TPU$COMMAND.TPU). See below for a discussion on how to find out more about EVE and ! TPU initialisation files. If you are on VAXstation using UIS$EMULATORS for your TPU window, you can ! specify any width to "atg$set_screen_width()" (within reason!). ! F7 As CTRL/G (insert buffer) ! GOLD F7 As GOLD CTRL/G (replace select with buffer) ! F8 As CTRL/P (copy select to buffer) ! GOLD F8 As GOLD CTRL/P (cut select to buffer) ! F17 Make the next window the current window (if there is more than 1 window on the screen). This is the ! same as the EVE NEXT WINDOW command. ! GOLD F17 Toggle between 1 or 2 windows on the screen. This does an EVE SPLIT_WINDOW 2 command if there is only ! one window on the screen, else it does an EVE ONE WINDOW command. ! F18 Insert EVE style named marker. This differs from GOLD . in that you are asked for the name of ! the mark. The mark can lie in any buffer, and any number of marks can co-exist. If you enter a ! name that is already in use, the previous mark for that name is deleted. Note that marks entered ! via F18 are lost when the editor is left. Similar to an EVE MARK name command. ! GOLD F18 Locate and move to an EVE style named marker. This command also locates marks entered by key F18. ! The buffer that the mark is located in is mapped to the current window. Similar to an EVE GO TO name ! command. ! F19 Insert the current date in the form "DD-Mmm-YY". If the day is in the range 1 to 9, a leading "0" is ! included. ! GOLD F19 Insert the current time in the form "HH:MM". ! F20 Locate position in buffer. Displays a line of the form "Line n of m (p%)" ! ! Note that using GOLD HELP or GOLD PF2 will give an on-line list of keys including those specified above, and that HELP ! (or PF2) will generate a keypad diagram including the above additions. ! ! Building and Invoking ATG_EVE ! ============================= ! ! This file contains an EVE "product" that is built using EVE$BUILD under VMS V5 as follows (see ATG_EVE.COM): ! ! $ Edit /Tpu /NoDisplay /Section=EVE$SECTION /Command=SYS$EXAMPLES:EVE$BUILD /NoInit ATG_EVE ! ! The resulting section is invoked as follows: ! ! $ Edit /Tpu /Section=dev:[dir]ATG_EVE [/Command=init-file.TPU] [/INITIALIZATION=init-file.eve] file-name.type ! ! or, for old die-hards... ! ! $ Edt == "Edit /Tpu /Section=ATG_EVE" (no device/directory needed if section is in SYS$LIBRARY) ! $ Edt filename.type ! ! We place the EDT definition in the SYS$SYLOGIN command file, and always move the section to SYS$COMMON:[SYSLIB] and ! INSTALL it open and shared (see INSTALL.COM). ! ! For more information on TPU and EVE initialisation command files, refer to the VMS V5 manual ! "Volume 5B (General User) Processing Text, VAXTPU Program Development", section 5.4 (VAXTPU Startup Files) and section ! 5.4.4 (EVE Initialisation Files). ! ! Note that under VMS V5 the section can be INSTALLed (see INSTALL.COM), eg. ! ! $ Install Create Sys$Library:ATG_EVE.TPU$SECTION /Open /Header_Res /Shared ! ! INSTALLing the section shared is highly recommended. Major performance benifits can be gained on systems which have more ! than one user using this editing section. ! ! ! Local command procedure initialisation ! procedure ATG_MODULE_IDENT return "V02.04"; ! Version of this file endprocedure procedure ATG_MODULE_PRE_INIT ! eve$x_select_remove_flag := FALSE; ! Make