7h VTEDIT050.AL%P VTEDIT050.ABACKUP/NOASSIST/COMMENT=VAX/VMS SPKITBLD Procedure/INTER/LOG/VERIFY DISK$MASTER:[WECK.VTEDIT.KIT.V50.A]*.* MSA0:[0,0]VTEDIT050.A/LABEL=(VTEDIT)/SAVE/REWI/DENS=1600VAX/VMS SPKITBLD Procedure SYSTEM OV5.1 _PISA::  _PISA$MSA0: V5.0  &*[WECK.VTEDIT.KIT.V50.A]KITINSTAL.COM;5+,./ 4U-"0123KPWO5 6`Ŏj7`߂89Ŗ'vGHJ+$ ON CONTROL_Y THEN $ GOTO CONTROL_Y_EXIT $ ON ERROR THEN $ EXIT $STATUS$ !2$ IF P1 .EQS. "VMI$_INSTALL" THEN $ GOTO INSTALL$ EXIT VMI$_UNSUPPORTED$ !$ CONTROL_Y_EXIT:$ VMI$CALLBACK CONTROL_Y$ EXIT VMI$_FAILURE$ ! $ INSTALL:+$ VMI$CALLBACK CHECK_VMS_VERSION KIT$ 044$ VMS_VERSION = -K F$INTEGER(F$EXTRACT(F$LOCATE(",",VMI$VMS_VERSION)+1,3,VMI$VMS_VERSION)) $ IF KIT$ THEN $ GOTO SET_PRIVA$ VMI$MSG F BADVERS "This kit needs VMS version V4.4 or later."$ EXIT VMI$_FAILURE$ ! $ SET_PRIV:@$ IF "''F$PRIVILEGE("SETPRV")'" .EQS. "FALSE" THEN $ GOTO PRIVP$ IF "''F$PRIVILEGE("CMKRNL, SYSNAM, SYSPRV")'" .EQS. "TRUE" THEN $ GOTO PURGE5$ SET PROCESS /PRIVILEGE = (CMKRNL, SYSNAM, SYSPRV)$ GOTO PURGE$ !$ PRIV:P$ IF "''F$PRIVILEGE("CMKRNL, SYSNAM, SYSPRV")'" .EQS. "TRUE" THEN $ GOTO PURGE$ VMI$MSG F NOPRIV -B "You need CMKRNL, SYSNAM, and SYSPRV privilege to install VTEDIT"$ EXIT VMI$_FAILURE$ !$ PURGE:$ VMI$CALLBACK SET PURGE ASK$ !7$ VMI$FIND FILE$ TPUCALL.FOR VMI$ROOT:[SYSLIB] S OLD$C$ VMI$FIND FILE$ VTESPLIT.TPU VMI$ROOT:[SYSHLP.EXAMPLES] S SPLIT$;$ VMI$FIND FILE$ VTESECINI.TPU VMI$ROOT:[SYSLIB] S V4SOU$C$ VMI$FIND FILE$ VTESECINI.TPU$SECTION VMI$ROOT:[SYSLIB] S V4SEC$8$ VMI$FIND FILE$ VTEDIT.HLB VMI$ROOT:[SYSHLP] S V4HLP$$ ! $ LSE$ == 0 $ DOC$ == 0 $ TEC$ == 0$ VTBLOCKS = 28006$ VMI$FIND FILE$ LSESHR.EXE VMI$ROOT:[SYSLIB] S KIT$)$ IF KIT$ .NES. "S" THEN $ GOTO ASK_TEC$ VMI$CALLBACK ASK LSE$ -K "Do you want to have support for the Language Sensitive Editor" YES B -O "This allows you to use VAX LSE from VTEDIT, using VTEDIT key definitions."%$ IF .NOT. LSE$ THEN $ GOTO ASK_TEC$ VTBLOCKS = VTBLOCKS + 800$ ! $ ASK_TEC:0$ IF VMS_VERSION .LT. 50 THEN $ GOTO CHECK_NET$ VMI$CALLBACK ASK TEC$ -E "Do you want to have the VTEDIT macro for the TECO editor" NO B -; "This allows you to use the original VTEDIT from TECO."'$ IF .NOT. TEC$ THEN $ GOTO CHECK_NET$ VTBLOCKS = VTBLOCKS + 200$ ! $ CHECK_NET:6$ VMI$CALLBACK CHECK_NET_UTILIZATION KIT$ 'VTBLOCKS'$$ IF KIT$ THEN $ GOTO CHECK_SAFETY$ VMI$MSG F NOSPACE -E "This kit needs at least ''VTBLOCKS' blocks on your system disk."$ EXIT VMI$_FAILURE$ !$ CHECK_SAFETY:$ VTBLOCKS = VTBLOCKS + 16002$ VMI$CALLBACK SET SAFETY CONDITIONAL 'VTBLOCKS'$ !$ VMI$CALLBACK ASK INS$ -= "Do you want to install VTEDIT as a shared image" YES B -O "Installing is recommended to reduce startup time and memory requirements."$ !-$ IF .NOT. VMI$SAFETY THEN $ GOTO ALL_ASKED$ VMI$CALLBACK ASK DOC$ -F "Do you want to have the text of the VTEDIT User's Manual" YES B -D "The Manual consists of the two files VTEDIT.RNO and VTEDIT.LNI"$ ! $ ALL_ASKED:$ TYPE SYS$INPUTD All questions regarding the installation have now been asked.D The installation will continue without operator intervention from this point on.,$ IF VMS_VERSION .GT. 50 THEN $ GOTO GET_C"$ VMI$CALLBACK RESTORE_SAVESET B-$ IF .NOT. $STATUS THEN $ EXIT VMI$_FAILURE$ GOTO GET_D$ !$ GET_C:"$ VMI$CALLBACK RESTORE_SAVESET C-$ IF .NOT. $STATUS THEN $ EXIT VMI$_FAILURE$ !$ GET_D:#$ IF .NOT. LSE$ THEN $ GOTO GET_E"$ VMI$CALLBACK RESTORE_SAVESET D$$ IF $STATUS THEN $ GOTO SETUP_LSE$ VMI$MSG W NOLSE -Q "Could not restore LSE support files - Installing VTEDIT without LSE support" $ LSE$ == 0$ GOTO GET_E$ ! $ SETUP_LSE:4$ IF VMS_VERSION .GT. 50 THEN $ GOTO SETUP_LSE_V51J$ VMI$CALLBACK SUMSLP_TEXT FILE$ VMI$KWD:VTEDIT.UPD VMI$KWD:VTEDIT.CLD - FILE 543891269 694133836$ GOTO GET_E$ !$ SETUP_LSE_V51:J$ VMI$CALLBACK SUMSLP_TEXT FILE$ VMI$KWD:VTEDIT.UPD VMI$KWD:VTEDIT.CLD - FILE 1731082932 1193239083$ !$ GET_E:#$ IF .NOT. DOC$ THEN $ GOTO GET_F"$ VMI$CALLBACK RESTORE_SAVESET E $ IF $STATUS THEN $ GOTO GET_FP$ VMI$MSG W NOMANUAL "Did not find the Manual files - Continuing installation" $ DOC$ == 0$ !$ GET_F:#$ IF .NOT. TEC$ THEN $ GOTO FILES"$ VMI$CALLBACK RESTORE_SAVESET F $ IF $STATUS THEN $ GOTO FILES$ VMI$MSG W NOTEC -R "Could not restore TECO macros - Continuing installation without TECO support" $ TEC$ == 0$ !$ FILES:6$ IF VMS_VERSION .NE. 50 THEN $ GOTO REMAINING_FILES*$ DELETE VMI$KWD:VTESECINI.TPU$SECTION;*K$ RENAME VMI$KWD:VTESECINI.TPU$SECTION_V5 VMI$KWD:VTESECINI.TPU$SECTION;*$ !$ REMAINING_FILES:>$ VMI$CALLBACK PROVIDE_FILE KIT$ VTINI.TPU VMI$ROOT:[SYSLIB]I$ VMI$CALLBACK PROVIDE_FILE KIT$ TPUCALL.FOR VMI$ROOT:[SYSHLP.EXAMPLES]J$ VMI$CALLBACK PROVIDE_FILE KIT$ VTEBUILD.TPU VMI$ROOT:[SYSHLP.EXAMPLES]?$ IF VMS_VERSION .GT. 50 .AND. .NOT. LSE$ THEN $ GOTO V5_HELPB$ VMI$CALLBACK PROVIDE_FILE KIT$ VTESECINI.TPU VMI$ROOT:[SYSLIB]?$ VMI$CALLBACK PROVIDE_FILE KIT$ VTEDIT.HLB VMI$ROOT:[SYSHLP]2$ IF VMS_VERSION .LE. 50 THEN $ GOTO GET_SECTION$ ! $ V5_HELP:A$ VMI$CALLBACK PROVIDE_FILE KIT$ VTE_HELP.HLB VMI$ROOT:[SYSHLP]$ !$ GET_SECTION:1$ IF VMS_VERSION .GT. 50 THEN $ GOTO V5_SECTIONJ$ VMI$CALLBACK PROVIDE_FILE KIT$ VTESECINI.TPU$SECTION VMI$ROOT:[SYSLIB]$ GOTO GET_IMAGE$ ! $ V5_SECTION:L$ VMI$CALLBACK PROVIDE_FILE KIT$ VTE_SECTION.TPU$SECTION VMI$ROOT:[SYSLIB]D$ VMI$CALLBACK PROVIDE_FILE KIT$ VTE_SECTION.TPU VMI$ROOT:[SYSLIB]$ ! $ GET_IMAGE:A$ VMI$CALLBACK PROVIDE_IMAGE KIT$ TPUCALL.EXE VMI$ROOT:[SYSLIB]$ !/$ VMI$CALLBACK PROVIDE_DCL_COMMAND VTEDIT.CLD$ !/$ VMI$CALLBACK PROVIDE_DCL_HELP VTEDIT_VX.HLP$ !$ VMI$MSG I MANCOPY -J "The short guide VTEDIT.DOC will be copied to directory SYS$EXAMPLES."H$ VMI$CALLBACK PROVIDE_FILE KIT$ VTEDIT.DOC VMI$ROOT:[SYSHLP.EXAMPLES]$ !($ IF .NOT. DOC$ THEN $ GOTO TECO_FILESR$ VMI$MSG I MANCOPY "The Manual files will be copied to directory SYS$EXAMPLES."H$ VMI$CALLBACK PROVIDE_FILE KIT$ VTEDIT.RNO VMI$ROOT:[SYSHLP.EXAMPLES]H$ VMI$CALLBACK PROVIDE_FILE KIT$ VTEDIT.LNI VMI$ROOT:[SYSHLP.EXAMPLES]$ ! $ TECO_FILES:($ IF .NOT. TEC$ THEN $ GOTO REMOVE_OLDR$ VMI$MSG I TECO "Providing the TECO macro along with some formatters and Help.":$ VMI$CALLBACK PROVIDE_FILE KIT$ *.TEC VMI$ROOT:[SYSLIB]?$ VMI$CALLBACK PROVIDE_FILE KIT$ VTEDIT.HLP VMI$ROOT:[SYSHLP]$ ! $ REMOVE_OLD:,$ IF OLD$ .NES. "S" THEN $ GOTO SPLIT_FILE9$ VMI$CALLBACK DELETE_FILE VMI$ROOT:[SYSLIB]TPUCALL.FORH$ VMI$CALLBACK UPDATE_LIBRARY KIT$ VMI$ROOT:[SYSHLP]TPUHELP.HLB HELP - "/DELETE=(VTEDIT*)"$ VMI$MSG I LIBCOMP -U "You may compress the Help library SYS$HELP:TPUHELP.HLB to free about 200 blocks"$ ! $ SPLIT_FILE:-$ IF SPLIT$ .NES. "S" THEN $ GOTO REMOVE_V4C$ VMI$CALLBACK DELETE_FILE VMI$ROOT:[SYSHLP.EXAMPLES]VTESPLIT.TPU$ ! $ REMOVE_V4:0$ IF VMS_VERSION .LE. 50 THEN $ GOTO LSE_FILES"$ IF LSE$ THEN $ GOTO REMOVE_SEC.$ IF V4SOU$ .NES. "S" THEN $ GOTO REMOVE_SEC;$ VMI$CALLBACK DELETE_FILE VMI$ROOT:[SYSLIB]VTESECINI.TPU$ ! $ REMOVE_SEC:.$ IF V4SEC$ .NESp7i VTEDIT050.A"&[WECK.VTEDIT.KIT.V50.A]KITINSTAL.COM;5U. "S" THEN $ GOTO REMOVE_HLPC$ VMI$CALLBACK DELETE_FILE VMI$ROOT:[SYSLIB]VTESECINI.TPU$SECTION$ ! $ REMOVE_HLP:!$ IF LSE$ THEN $ GOTO LSE_FILES1$ IF V4HLP$ .NES. "S" THEN $ GOTO INSTALL_FILES8$ VMI$CALLBACK DELETE_FILE VMI$ROOT:[SYSHLP]VTEDIT.HLB$ ! $ LSE_FILES:+$ IF .NOT. LSE$ THEN $ GOTO INSTALL_FILESH$ VMI$CALLBACK PROVIDE_FILE KIT$ VTEDIT.FOR VMI$ROOT:[SYSHLP.EXAMPLES]?$ VMI$CALLBACK PROVIDE_FILE KIT$ VTEDIT.EXE VMI$ROOT:[SYSEXE]N$ VMI$CALLBACK PROVIDE_FILE KIT$ LSE$VTESECINI.TPU$SECTION VMI$ROOT:[SYSLIB]?$ VMI$CALLBACK PROVIDE_FILE KIT$ VTEDIT.ENV VMI$ROOT:[SYSLIB]$ !A$ VMI$CALLBACK UPDATE_FILE HLB_LIB$ VMI$ROOT:[SYSHLP]VTEDIT.HLB7$ LIBRARY /HELP /REPLACE HLB_LIB$ VMI$KWD:LSEHELP.HLP+$ IF VMI$SAFETY THEN $ GOTO INSTALL_FILES;$ VMI$CALLBACK MOVE_FILE KIT$ VMI$ROOT:[SYSHLP]VTEDIT.HLB$ !$ INSTALL_FILES:#$ IF .NOT. INS$ THEN $ GOTO START7$ VMI$FIND FILE$ TPUCALL.EXE VMI$ROOT:[SYSLIB] S KIT$'$ IF KIT$ .NES. "S" THEN $ GOTO SETUP!$ INSTALL := $ INSTALL /COMMANDF$ IF F$FILE("VMI$ROOT:[SYSLIB]TPUCALL.EXE","KNOWN") THEN $ INSTALL -$ REMOVE VMI$ROOT:[SYSLIB]TPUCALL.EXEA$ VMI$FIND FILE$ VTESECINI.TPU$SECTION VMI$ROOT:[SYSLIB] S KIT$'$ IF KIT$ .NES. "S" THEN $ GOTO SETUPP$ IF F$FILE("VMI$ROOT:[SYSLIB]VTESECINI.TPU$SECTION","KNOWN") THEN $ INSTALL -. REMOVE VMI$ROOT:[SYSLIB]VTESECINI.TPU$SECTIONC$ VMI$FIND FILE$ VTE_SECTION.TPU$SECTION VMI$ROOT:[SYSLIB] S KIT$'$ IF KIT$ .NES. "S" THEN $ GOTO SETUPJ$ IF F$FILE("VMI$ROOT:[SYSLIB]VTE_SECTION.TPU$SECTION","KNOWN") THEN $ -8 INSTALL REMOVE VMI$ROOT:[SYSLIB]VTE_SECTION.TPU$SECTION$ !#$ IF .NOT. LSE$ THEN $ GOTO SETUP6$ VMI$FIND FILE$ VTEDIT.EXE VMI$ROOT:[SYSEXE] S KIT$'$ IF KIT$ .NES. "S" THEN $ GOTO SETUPE$ IF F$FILE("VMI$ROOT:[SYSEXE]VTEDIT.EXE","KNOWN") THEN $ INSTALL -& REMOVE VMI$ROOT:[SYSEXE]VTEDIT.EXEE$ VMI$FIND FILE$ LSE$VTESECINI.TPU$SECTION VMI$ROOT:[SYSLIB] S KIT$'$ IF KIT$ .NES. "S" THEN $ GOTO SETUPL$ IF F$FILE("VMI$ROOT:[SYSLIB]LSE$VTESECINI.TPU$SECTION","KNOWN") THEN $ -= INSTALL REMOVE VMI$ROOT:[SYSLIB]LSE$VTESECINI.TPU$SECTION$ !$ SETUP:)$ APPEND SYS$INPUT VMI$KWD:STARTVTE.COM$ DECK $ SET NOON!$ INSTALL := $ INSTALL /COMMANDA$ IF F$FILE("SYS$LIBRARY:TPUCALL.EXE","KNOWN") THEN $ INSTALL - REMOVE SYS$LIBRARY:TPUCALL.EXE$ EOD-$ IF VMS_VERSION .GT. 50 THEN $ GOTO V5_REM)$ APPEND SYS$INPUT VMI$KWD:STARTVTE.COM$ DECKK$ IF F$FILE("SYS$LIBRARY:VTESECINI.TPU$SECTION","KNOWN") THEN $ INSTALL -) REMOVE SYS$LIBRARY:VTESECINI.TPU$SECTION$ EOD$ GOTO LSE_REM$ ! $ V5_REM:)$ APPEND SYS$INPUT VMI$KWD:STARTVTE.COM$ DECKM$ IF F$FILE("SYS$LIBRARY:VTE_SECTION.TPU$SECTION","KNOWN") THEN $ INSTALL -+ REMOVE SYS$LIBRARY:VTE_SECTION.TPU$SECTION$ EOD$ ! $ LSE_REM:)$ IF .NOT. LSE$ THEN $ GOTO ADD_INSTALL)$ APPEND SYS$INPUT VMI$KWD:STARTVTE.COM$ DECK?$ IF F$FILE("SYS$SYSTEM:VTEDIT.EXE","KNOWN") THEN $ INSTALL - REMOVE SYS$SYSTEM:VTEDIT.EXEO$ IF F$FILE("SYS$LIBRARY:LSE$VTESECINI.TPU$SECTION","KNOWN") THEN $ INSTALL -- REMOVE SYS$LIBRARY:LSE$VTESECINI.TPU$SECTION$ EOD$ !$ ADD_INSTALL:)$ APPEND SYS$INPUT VMI$KWD:STARTVTE.COM$ DECK $ INSTALL1 ADD SYS$LIBRARY:TPUCALL.EXE /OPEN /SHARE /HEADER$ EOD$ !-$ IF VMS_VERSION .GT. 50 THEN $ GOTO V5_INS)$ APPEND SYS$INPUT VMI$KWD:STARTVTE.COM; ADD SYS$LIBRARY:VTESECINI.TPU$SECTION /OPEN /SHARE /HEADER$ GOTO LSE_INS$ ! $ V5_INS:)$ APPEND SYS$INPUT VMI$KWD:STARTVTE.COM= ADD SYS$LIBRARY:VTE_SECTION.TPU$SECTION /OPEN /SHARE /HEADER$ ! $ LSE_INS:&$ IF .NOT. LSE$ THEN $ GOTO ADD_EXIT)$ APPEND SYS$INPUT VMI$KWD:STARTVTE.COM/ ADD SYS$SYSTEM:VTEDIT.EXE /OPEN /SHARE /HEADER? ADD SYS$LIBRARY:LSE$VTESECINI.TPU$SECTION /OPEN /SHARE /HEADER$ ! $ ADD_EXIT:)$ APPEND SYS$INPUT VMI$KWD:STARTVTE.COM EXIT$ !$ START:A$ VMI$CALLBACK PROVIDE_FILE KIT$ STARTVTE.COM VMI$ROOT:[SYSMGR]-$ IF VMS_VERSION .GE. 50 THEN $ GOTO SYSMAN)$ VMI$CALLBACK SET STARTUP STARTVTE.COM$ GOTO FILE_LIST$ ! $ SYSMAN::$ VMI$CALLBACK MODIFY_STARTUP_DB ADD STARTVTE.COM LPMAIN)$ VMI$CALLBACK SET STARTUP STARTVTE.COM$ ! $ FILE_LIST:$ TYPE SYS$INPUTF The installation will provide the following new and changed files:-$ IF VMS_VERSION .GT. 50 THEN $ GOTO V5_SEC$ TYPE SYS$INPUT( SYS$LIBRARY:VTESECINI.TPU$SECTION [new]$ ! $ V5_SEC:?$ IF VMS_VERSION .GT. 50 .AND. .NOT. LSE$ THEN $ GOTO V5_TYPE$ TYPE SYS$INPUT! SYS$LIBRARY:VTESECINI.TPU [new]0$ IF VMS_VERSION .LE. 50 THEN $ GOTO CALL_TYPE$ ! $ V5_TYPE:$ TYPE SYS$INPUT* SYS$LIBRARY:VTE_SECTION.TPU$SECTION [new]# SYS$LIBRARY:VTE_SECTION.TPU [new]$ ! $ CALL_TYPE:$ TYPE SYS$INPUT SYS$LIBRARY:VTINI.TPU [new] SYS$LIBRARY:TPUCALL.EXE [new] SYS$EXAMPLES:TPUCALL.FOR [new]! SYS$EXAMPLES:VTEBUILD.TPU [new]?$ IF VMS_VERSION .GT. 50 .AND. .NOT. LSE$ THEN $ GOTO V5_HELP$ TYPE SYS$INPUT SYS$HELP:VTEDIT.HLB [new]/$ IF VMS_VERSION .LE. 50 THEN $ GOTO DCL_TYPE$ ! $ V5_HELP:$ TYPE SYS$INPUT SYS$HELP:VTE_HELP.HLB [new]$ ! $ DCL_TYPE:$ TYPE SYS$INPUT& SYS$LIBRARY:DCLTABLES.EXE [modified]" SYS$HELP:HELPLIB.HLB [modified] SYS$MANAGER:STARTVTE.COM [new] SYS$EXAMPLES:VTEDIT.DOC [new]$ !&$ IF .NOT. LSE$ THEN $ GOTO DOC_LIST$ TYPE SYS$INPUT, SYS$LIBRARY:LSE$VTESECINI.TPU$SECTION [new] SYS$SYSTEM:VTEDIT.EXE [new] SYS$EXAMPLES:VTEDIT.FOR [new] SYS$LIBRARY:VTEDIT.ENV [new]$ ! $ DOC_LIST:'$ IF .NOT. DOC$ THEN $ GOTO TECO_LIST$ TYPE SYS$INPUT SYS$EXAMPLES:VTEDIT.RNO [new] SYS$EXAMPLES:VTEDIT.LNI [new]$ ! $ TECO_LIST:($ IF .NOT. TEC$ THEN $ GOTO START_LIST$ TYPE SYS$INPUT SYS$LIBRARY:FMTC.TEC [new] SYS$LIBRARY:FMTCOM.TEC [new] SYS$LIBRARY:FMTDOC.TEC [new] SYS$LIBRARY:FMTFOR.TEC [new] SYS$LIBRARY:FMTMAR.TEC [new] SYS$LIBRARY:FMTRNO.TEC [new] SYS$LIBRARY:INIT.TEC [new] SYS$LIBRARY:VTEDIT.TEC [new] SYS$HELP:VTEDIT.HLP [new]$ ! $ START_LIST:2$ IF VMS_VERSION .GE. 50 THEN $ GOTO ENVIRONMENT$ TYPE SYS$INPUTL In order to automatically make VTEDIT available after booting, you% should include the following line $ @SYS$MANAGER:STARTVTEL or directly include the contents of the file SYS$MANAGER:STARTVTE.COM in your SYSTARTUP.COM file.$ !$ ENVIRONMENT:"$ IF .NOT. LSE$ THEN $ GOTO EXIT$ TYPE SYS$INPUTL The installation has copied the environment file VTEDIT.ENV into theL directory SYS$LIBRARY. This environment file contains an extensiveL definition of the language "Runoff" and some basic definitions for theL languages "DCL", "Datatrieve", "Help" (for Help texts), and "VAXTPU", asL well as some changes to the language "Fortran". You may wish to includeL some of these changes, or all of them, into your system environment file.$ !$ EXIT:$ EXIT VMI$_SUCCESS%*[WECK.VTEDIT.KIT.V50.A]STARTVTE.COM;4+,./ 4D-"0123KPWO5 6`j7>89Ŗ'vGHJy VTEDIT050.A"%[WECK.VTEDIT.KIT.V50.A]STARTVTE.COM;4D/$ !8$ ! Startup command file for the VTEDIT TPU-based editor$ !D$ DEFINE /SYSTEM /EXEC /NOLOG TPU$CALLUSER SYS$LIBRARY:TPUCALL.EXE$ !$*[WECK.VTEDIT.KIT.V50.A]TPUCALL.EXE;2+, . / 4 -"0123 KPWO 5 6N27q'89Ŗ'vGHJ0DX0205*2 h TPUCALL01204-00  ! LIBRTL_001LNM$FILE_DEV !SWH,[}PQPЬ ԫϼB .ZЏ@ kޫ L1T P`P`P`Pޫ`P`lptPkkԫ1T lp˔ PRRlpˠl Pk/RPPlpRPP˨Bˬ˰? Pk1T ˨ˬ˼" Pk1T˨ˬPkkԫ1T˨ˬPQQ˨ˬPQQl@pPkkP2^Tp˨ˬvPQQ˨ˬPQQl@p-PkkP2 ˨ˬPkkPH[޼kмk@ЫP ,,D @ l H 8        d <    , d  , d  @@x x p80 H@   @LIBRTL"h p x |     $ , 0 4 @ D H X  TPU$CALLUSER TPU$CALLUSERW% \ TPUEXT \TPUEXT &DEFAULT_CLUSTER2TPUCALL0112-APR-1989 16:0612-APR-1989 16:06VAX-11 Linker V04-00 .$$ABS$$.!H TPU$CALLUSER$*[WECK.VTEDIT.KIT.V50.A]TPUCALL.FOR;1+,. / 4I V-"0123KPWO 5 627l89Ŗ'vGHJ9C ***************************************************9C * *9C * INTEGER*4 FUNCTION T P U $ C A L L U S E R *9C * *9C ***************************************************C++IC Call_User Functions used by VTEDIT; the needed function is selected>C via the first parameter IDISP, used as a dispatch value:C>C IDISP = 1 : Disable Ctrl/T, setup exit handler for re-enableC INSTRING: EmptyC OUTSTRING: The sameC%C IDISP = 2 : Translate logical name:-C INSTRING: Logical name to be translated!C OUTSTRING: Equivalence nameC-C IDISP = 3 : Create logical name translationEC INSTRING: Logical name and equivalence name, separated by spaceC OUTSTRING: EmptyCC IDISP = 4 : Delete file*C INSTRING: Name of file to be deletedC OUTSTRING: EmptyC!C IDISP = 5 : Evaluate DCL symbol.C INSTRING: Name of symbol to be evaj VTEDIT050.A"$[WECK.VTEDIT.KIT.V50.A]TPUCALL.FOR;1I luated C OUTSTRING: Value of symbolC+C IDISP = 6 : Compare two strings lexically:C INSTRING: Strings to be compared, separated by space?C OUTSTRING: One of the strings "-1", "0", or "1" as resultC5C IDISP = 7 : Compare two strings as a wildcard match:C INSTRING: Strings to be compared, separated by space9C OUTSTRING: One of the strings "0", or "1" as resultC--? INTEGER*4 FUNCTION TPU$CALLUSER(IDISP, INSTRING, OUTDESC)C INCLUDE '($SYSSRVNAM)' INCLUDE '($SSDEF)' INCLUDE '($LNMDEF)' INCLUDE '($LIBCLIDEF)'C8 INTEGER*4 STR$COPY_DX, STR$COMPARE, STR$MATCH_WILDCE INTEGER*4 ISTAT, IDISP, INLEN, IND, OUTLEN, OLDCTL, NEWCTL, LUN INTEGER*4 DESBLK(5) LOGICAL*4 EX INTEGER*2 FAOLEN CHARACTER*(*) INSTRING( CHARACTER*512 OUTSTRING, LOCSTRINGC EXTERNAL TPUEXTC5C Define itemlist and ouput descriptor structuresC STRUCTURE /ITMLST/ UNION MAP INTEGER*2 BUFLEN INTEGER*2 CODE INTEGER*4 BUFADR INTEGER*4 RETLENADR END MAP MAP INTEGER*4 ENDLIST END MAP END UNION END STRUCTUREC STRUCTURE /DYNAMIC/ INTEGER*2 LENGTH BYTE DTYPE BYTE CLASS INTEGER*4 ADDR END STRUCTUREC,C Declare itemlist and output descriptorC RECORD /ITMLST/ LNMLIST(2) RECORD /DYNAMIC/ OUTDESCC OUTLEN = 0C+C Big dispatchC-< GO TO (1000, 2000, 3000, 4000, 5000, 6000, 7000) IDISPC+C Disable Ctrl/TC-1000 NEWCTL = LIB$M_CLI_CTRLT+ CALL LIB$DISABLE_CTRL(NEWCTL, OLDCTL) DESBLK(2) = %LOC(TPUEXT) DESBLK(3) = 2 DESBLK(4) = %LOC(ISTAT) DESBLK(5) = %LOC(OLDCTL) CALL SYS$DCLEXH(DESBLK) GO TO 9000C+C Translate logical nameC-/2000 CALL STR$TRIM(LOCSTRING, INSTRING, INLEN)C( LNMLIST(1).BUFLEN = LEN(OUTSTRING)# LNMLIST(1).CODE = LNM$_STRING) LNMLIST(1).BUFADR = %LOC(OUTSTRING)) LNMLIST(1).RETLENADR = %LOC(OUTLEN) LNMLIST(2).ENDLIST = 0CE ISTAT = SYS$TRNLNM(,'LNM$FILE_DEV',LOCSTRING(1:INLEN),,LNMLIST)! IF (.NOT. ISTAT) OUTLEN = 0 GO TO 9000C+C Create logical nameC-/3000 CALL STR$TRIM(LOCSTRING, INSTRING, INLEN)) IND = INDEX(LOCSTRING(1:INLEN),' ')C IF (IND .LE. 1) THEN/ ISTAT = LIB$DELETE_LOGICAL(LOCSTRING(1:INLEN)) ELSE< ISTAT = LIB$SET_LOGICAL(LOCSTRING(1:IND-1),LOCSTRING(IND+1: * INLEN)) ENDIF GO TO 9000C+C Delete fileC-/4000 CALL STR$TRIM(LOCSTRING, INSTRING, INLEN)1 ISTAT = LIB$DELETE_FILE(LOCSTRING(1:INLEN)) GO TO 9000C+C Evaluate DCL symbolC-/5000 CALL STR$TRIM(LOCSTRING, INSTRING, INLEN)C ISTAT = LIB$GET_SYMBOL(LOCSTRING(1:INLEN), OUTSTRING, OUTLEN)! IF (.NOT. ISTAT) OUTLEN = 0 GO TO 9000C+C Compare two stringsC-/6000 CALL STR$TRIM(LOCSTRING, INSTRING, INLEN)) IND = INDEX(LOCSTRING(1:INLEN),' ')CD ISTAT = STR$COMPARE(LOCSTRING(1:IND-1),LOCSTRING(IND+1:INLEN))9 CALL SYS$FAO('!SW', FAOLEN, OUTSTRING, %VAL(ISTAT)) OUTLEN = FAOLEN GO TO 9000C+FC Match two strings as candidate string and corresponding wildcardC-/7000 CALL STR$TRIM(LOCSTRING, INSTRING, INLEN)) IND = INDEX(LOCSTRING(1:INLEN),' ')CG ISTAT = STR$MATCH_WILD(LOCSTRING(1:IND-1),LOCSTRING(IND+1:INLEN))9 CALL SYS$FAO('!SW', FAOLEN, OUTSTRING, %VAL(ISTAT)) OUTLEN = FAOLENC+$C Return (possibly emtpy) stringC-79000 ISTAT = STR$COPY_DX(OUTDESC, OUTSTRING(1:OUTLEN)) TPU$CALLUSER = ISTAT RETURN END-C ***************************************-C * *-C * INTEGER*4 FUNCTION T P U E X T *-C * *-C ***************************************C++BC Exit Handler for the VTEDIT interface to TPU; re-establishes<C control characters switched off during initialization.CC Parameters:C3C ISTAT: Exit-Value for the image (VMS status code)8C MASK: Mask for the control characters to be re-enabledC--+ INTEGER*4 FUNCTION TPUEXT(ISTAT,MASK)C INTEGER*4 ISTAT,MASKC CALL LIB$ENABLE_CTRL(MASK) CALL SYS$EXIT(%VAL(ISTAT))C RETURNC END&*[WECK.VTEDIT.KIT.V50.A]VTEBUILD.TPU;57+,. / 4N f-"0123KPWO 5 6`jUP6789Ŗ'vGHJ  ! Compile VTEDIT from TPU or LSEprocedure vte$build_sectionBlocal version_pattern, ! Pattern selecting version dependent code: temp_range, ! Range spanning the result of a search7 tpu_version, ! Version of TPU used for compiling? compile_result, ! Result of compilation of trailing code8 key_to_delete, ! LSE key definition being deleted5 symbol_characters, ! Anything allowed in a name8 pat_name_end, ! Pattern for end of procedure name/ pat_begin, ! Pattern for procedure start, pat_end, ! Pattern for procedure end0 pat_def, ! Pattern for definition module* pat_break, ! Pattern for page break8 proc_name, ! Name of procedure currently compiled7 pos, spos, epos, vpos, ! Several useful positions' n; ! Counter of activated lineson_error$ if error = tpu$_strnotfound then temp_range := 0; else! if error = tpu$_compilefail then quit; endif; endif; endon_error;set(message_flags, 1);1if get_info(system, "facility_name") = "LSE" then vte$x_lse_support := 1; set(timer, off, "");N adjust_window(current_window, 1 - get_info(current_window, "visible_top"), 0); 0 set(scrolling, current_window, on, 0, 0, 0);7 ! Remove LSE key definitions in order to save spaceC key_to_delete := get_info(defined_key, "first", "TPU$KEY_MAP"); loop exitif key_to_delete = 0;, undefine_key(key_to_delete, "TPU$KEY_MAP");? key_to_delete := get_info(defined_key, "next", "TPU$KEY_MAP"); endloop;J key_to_delete := get_info(defined_key, "first", "LSE$$STANDARD_KEYS"); loop exitif key_to_delete = 0;3 undefine_key(key_to_delete, "LSE$$STANDARD_KEYS");F key_to_delete := get_info(defined_key, "next", "LSE$$STANDARD_KEYS"); endloop;E key_to_delete := get_info(defined_key, "first", "LSE$$EDT_KEYS"); loop exitif key_to_delete = 0;. undefine_key(key_to_delete, "LSE$$EDT_KEYS");A key_to_delete := get_info(defined_key, "next", "LSE$$EDT_KEYS"); endloop;K key_to_delete := get_info(defined_key, "first", "LSE$$EVE_VT100_KEYS"); loop exitif key_to_delete = 0;4 undefine_key(key_to_delete, "LSE$$EVE_VT100_KEYS");G key_to_delete := get_info(defined_key, "next", "LSE$$EVE_VT100_KEYS"); endloop;K key_to_delete := get_info(defined_key, "first", "LSE$$EVE_VT200_KEYS"); loop exitif key_to_delete = 0;4 undefine_key(key_to_delete, "LSE$$EVE_VT200_KEYS");G key_to_delete := get_info(defined_key, "next", "LSE$$EVk@ VTEDIT050.A"&[WECK.VTEDIT.KIT.V50.A]VTEBUILD.TPU;57N 4E_VT200_KEYS"); endloop;else vte$x_lse_support := 0;* main_buffer := create_buffer("$MAIN"); position(main_buffer);3 read_file(get_info(command_line, "file_name"));endif;L! Set global variables such that the compiler won't take them for proceduresinfo_window := 0;message_window := 0;help_buffer := 0;message_buffer := 0;show_buffer := 0;set(no_write, current_buffer);+tpu_version := get_info(system, "version");0version_pattern := fao("!!V!SL!!", tpu_version);!pat_begin := line_begin & "proc";"pat_end := line_begin & "endproc";8pat_def := line_begin & "module vte$global_definitions";if tpu_version > 1 then pat_break := page_break;else pat_break := ascii(12);endif;Msymbol_characters := "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" +N "0123456789$_";(pat_name_end := span(symbol_characters);set(success, off);if tpu_version > 1 then+ position(beginning_of(current_buffer)); n := 0; loop7 temp_range := search(version_pattern, forward, exact); exitif temp_range = 0; n := n + 1; erase(temp_range); position(end_of(temp_range)); move_horizontal(1); endloop; if n > 0 thenH message(fao("!SL line!%S activated for version V!SL", n, tpu_version)); endif;% position(end_of(current_buffer));5 temp_range := search(pat_def, reverse, no_exact); position(temp_range);& move_horizontal(- current_offset); pos := mark(none); move_vertical(1);0 position(search(pat_break, forward, exact));; message("Executing constant and variable definitions");C compile_result := compile(create_range(pos, mark(none), none)); if compile_result <> 0 then execute(compile_result); endif;endif;'position(beginning_of(current_buffer));pos := mark(none);loop4 temp_range := search(pat_begin, forward, exact); exitif(temp_range = 0);% spos := beginning_of(temp_range); position(spos);% move_horizontal(-current_offset);3 temp_range := search("vte", forward, no_exact);% vpos := beginning_of(temp_range); position(vpos);7 temp_range := search(pat_name_end, forward, exact);M proc_name := substr(create_range(vpos, end_of(temp_range), none), 1, 80);- message(fao("Compiling !AS", proc_name));2 temp_range := search(pat_end, forward, exact); exitif(temp_range = 0);% epos := beginning_of(temp_range); position(epos); move_vertical(1); pos := mark(none); move_horizontal(-1);2 compile(create_range(spos, mark(none), none));endloop;position(pos);5compile("procedure vte$build_section endprocedure;");set(success, on);if tpu_version > 1 then set(line_number, off);endif;!position(end_of(current_buffer));,position(search(pat_break, reverse, exact));pos := mark(none);Kcompile_result := compile(create_range(pos, end_of(current_buffer), none));if compile_result <> 0 then' message("Executing trailing code"); execute(compile_result);endif; endprocedure;!vte$build_section;quit;$*[WECK.VTEDIT.KIT.V50.A]VTEDIT.DOC;25+,.l/ 4ulj-"0123KPWOm5 6`Z[7ඃ89Ŗ'vGHJ VTEDITu Keypad Text Editor and Corrector for VAXTPU Mini Reference; Software Version: VTEDIT V5.0 (for VAXTPU V2.2)" VTEDIT V4.7 (for VAXTPU V1.2 and VAX LSE V2.2) June 1989 2' The VTEDIT CommandM The VTEDIT command invokes the TPU editor using the VTEDIT interface. TheM VAX Text Processing Utility (VAXTPU) is a high performance, extensibleM utility that provides several editing interfaces. The VTEDIT interface isM an efficient, keypad driven editor allowing multi window editing and? providing semi-automatic, context dependent text formatting. Format:! $ VTEDIT [file-spec] Command Qualifiers:> /COMMAND /CREATE /CURRENT_FILE /DISPLAYL /ENVIRONMENT /INITIALIZATION /JOURNAL /LANGUAGE /LSEL /MODIFY /OUTPUT /READ_ONLY /RECOVER /START_POSITION% /SYSTEM_ENVIRONMENT /WRITE# General InformationM VAXTPU is a text processing utility available with the VMS operatingM system. High performance and extensibility are two of the major featuresM of VAXTPU. The screen oriented text processing features of VAXTPU areM targeted to the VT200 and VT100 families of terminals, but they can beM used on other ANSI CRTs. VAXTPU can also be used to do batch mode text processing.M The utility consists of a procedural language, a compiler, anM interpreter, and several editing interfaces of which VTEDIT is one. TheM interfaces are written in the VAXTPU language and they are layered onM VAXTPU. You can use VTEDIT or one of the other interfaces to performM editing tasks, and you can use them to access VAXTPU features that allow< you to customize or extend the interface you are using.M After you are familiar with VTEDIT and the functions it provides, useH the VAX Text Processing Reference Manual for information on VAXTPU.M Once you have invoked VAXTPU with the VTEDIT editing interface, you canM get on-line help about both the interface and VAXTPU from within the VTEDIT interface. Parameters file-specM Specifies the file to be created or edited using the VTEDIT editingM interface. If the file you specify does not exist, the VTEDITM interface provides a buffer in which to create the file. If you writeM out the contents of the buffer VAXTPU will create the file in the appropriate directory.M If you do not provide a file specification as a parameter when youM invoke VAXTPU, the VTEDIT interface will try to find out which file wasM edited last, and re-edit that file. If VTEDIT's memory is empty, VTEDITM will create an empty buffer named '$Main' having no output file name associated with it.M VAXTPU does not provide a default file type when creating files; if youM do not include a file type, it is null. The file must be a disk file% on a Files-11 formatted volume.P 3M You may use wildcards to specify the file to be edited. If there isM exactly one file mN K VTEDIT050.A"$[WECK.VTEDIT.KIT.V50.A]VTEDIT.DOC;254ulJatching the given wildcard, this file is edited. IfM there are several files matching, VTEDIT displays a list of their namesM and lets you select one of the files from this list. (Currently, thisF feature is not available if VTEDIT is invoked with LSE support.)" Command Qualifiers' /COMMAND[=command-file] (D) /NOCOMMANDM Determines whether VTEDIT reads a user-written VAXTPU source file forM initialization purposes. The default file type for command files isM TPU. By default, VTEDIT tries to read a file called VTE$COMMAND.TPUM from your default directory. You can use a file specification after theM /COMMAND qualifier or define the logical name VTE$COMMAND to point to a. command file other than the default one.M If VTEDIT is invoked with LSE support, the logical name LSE$COMMAND isM an alternative to the /COMMAND command qualifier. If /COMMAND orM /NOCOMMAND does not appear on the command line, VTEDIT attempts toM translate the logical name LSE$COMMAND. If it has a translation, thatD value is used in the same way as the /COMMAND qualifier value.M To prevent VAXTPU from processing a command file, use the /NOCOMMANDM qualifier. When you are not using a command file, specifyingM /NOCOMMAND decreases startup time by eliminating the search for a command file. /CREATE (D) /NOCREATEM Controls whether VAXTPU creates a new file when the specified inputM file is not found. The VTEDIT interface is responsible for processingM this qualifier. By default, the VTEDIT interface provides a buffer inM which to create the file. If you write out the contents of the bufferM (either explicitly or by exiting from the editor), VAXTPU will create aM new file for the input file specification. When you use the /NOCREATEM qualifier and enter a file specification that does not exist, VTEDIT6 returns you to the DCL command level as follows:# $ VTEDIT/NOCREATE NEWFILE.DATM (VTEDIT clears the screen and displays a message similar to the following:)9 Input file does not exist: DISK$:[USER]NEWFILE.DAT; $ /CURRENT_FILE (D) /NOCURRENT_FILEM If no input file is specified on the command line, /CURRENT_FILEM specifies that the name and type of the file that was edited last beM used as the input file. If an incomplete file specification isM specified on the command line (that is, only a file name or a fileM type), /CURRENT_FILE specifies that the name or the type of theM previously edited file be used to complete the file specification. IfM /NOCURRENT_FILE is specified, VTEDIT will not use its memory to resolve@ an input file specification. /CURRENT_FILE is the default. 4M This qualifier is only valid if VTEDIT has been installed with LSEM support and if the qualifier /NOLSE is not present on the command line.+ /DISPLAY[=display-filespec] (D) /NODISPLAYM Determines whether the editing session is being run on a supportedM terminal and is using terminal functions, such as the screen display and keyboard.M By default, sessions are run with a screen management file calledM TPU$CCTSHR.EXE, for ANSI terminals. For more information aboutM VAXTPU-supported terminals, see the VAX Text Processing Utility Manual.M Use /NODISPLAY when you want to run VTEDIT in batch mode, or when youM are using an unsupported terminal -- that is, without using the screen% display and keyboard functions.M The qualifier /NODISPLAY is not supported if VTEDIT is invoked with LSEM support; this qualifier must be combined with the qualifier /NOLSE if1 VTEDIT has been installed with LSE support.' /ENVIRONMENT=file-spec-list /NOENVIRONMENT (D)M Specifies the name of one or more binary environment files containingM Editor language, token, placeholder, or alias definitions. The Editor; reads in these definitions as part of Editor startup.M The file-spec-list is either a single file-spec or a list of file-specs6 separated by commas and enclosed in parentheses.M If definitions or deletions of items appear in more than one file, theI definition that appeared in the first listed file takes precedence.K SYS$LIBRARY is the default device, and the default file type is .ENV.M The logical name LSE$ENVIRONMENT is an alternative to the /ENVIRONMENTM qualifier. If /ENVIRONMENT or /NOENVIRONMENT is not used, the EditorM will attempt to translate the logical name LSE$ENVIRONMENT. If theM logical name has translations, the values are used in the same way asM the /ENVIRONMENT qualifier values. The Editor translates the first ten2 indices of the logical name LSE$ENVIRONMENT.M This qualifier is only valid if VTEDIT has been installed with LSEM support and if the qualifier /NOLSE is not present on the command line.% /INITIALIZATION=file-spec! /NOINITIALIZATION (D)M Determines whether VTEDIT reads a user-written initialization fileM containing a sequence of VTEDIT commands to be executed as part ofM Editor startup. The default file type for initialization files is VTE.M By default, VTEDIT tries to read a file called VTE$INIT.VTE from yourM default directory. You can use a file specification after theM /INITIALIZATION qualifier or define the logical name VTE$INIT to point: to a initialization file other than the default one.P 5 M If VTEDIT is invoked with LSE support, the logical nameM LSE$INITIALIZATION is an alternative to the /INITIALIZATION qualifier.M If /INITIALIZATION or /NOINITIALIZATION is not used, the Editor willM attempt to translate the logical name LSE$INITIALIZATION. If theM logical name has a translation, that value is used in the same way as* the /INITIALIZATION qualifier value.' /JOURNAL[=journal-file] (D) /NOJOURNALM Determines whether VAXTPU keeps a journal file of your editing sessionM so that you can recover from an interrupted session. The VTEDITM interface is responsible for processing this qualifier. By default,M the VTEDIT interface maintains a journal file that has the same name asM the input file and a file type of TJL. If you invoke VAXTPU without aM file specification, the default name for the journal file is TPU.TJL.M Use a full file specification with the /JOURNAL qualifier to specify a* different name for the journal file.M If you are editing a file from another directory and want the journalM file to be located in that directory, you must use the /JOURNALM qualifier with a file specification that includes the directory name.J Otherwise, VAXTPU creates the journal file in the default directory.M To prevent VAXTPU from keeping a journal file for your editing session,# jN VTEDIT050.A"$[WECK.VTEDIT.KIT.V50.A]VTEDIT.DOC;25ul4 use the /NOJOURNAL qualifier.M See the /RECOVER qualifier for information on how to have VAXTPU7 process the commands contained in a journal file. /LANGUAGE=languageM Sets the language for the current input file, overriding the language. indicated by the input file's file type.M This qualifier is only valid if VTEDIT has been installed with LSEM support and if the qualifier /NOLSE is not present on the command line. /LSE /NOLSEM Controls whether VTEDIT loads the Language-Sensitive Editor VAX LSE orM not. The Language-Sensitive Editor is a multi-language advanced textM editor specifically designed for software development, available as aM layered product for VMS. If VTEDIT is installed with LSE support, LSEM will be loaded together with VTEDIT, unless this is explicitly3 inhibited by specifying the /NOLSE qualifier. H Use of this Qualifier requires presence of VAX LSE on your system. /MODIFY /NOMODIFYM Specifies whether the buffer created for the input file is modifiableM or unmodifiable. If you specify the /MODIFY qualifier, the VTEDITM command creates a modifiable buffer. If you specify the /NOMODIFYM qualifier, the VTEDIT command creates an unmodifiable buffer. If you doM not specify either qualifier, VTEDIT determines the buffer's modifiableM status from the read-only/write setting. By default, a read-only buffer7 is unmodifiable and a write buffer is modifiable. 6# /OUTPUT=output-file (D) /NOOUTPUTM Determines whether VAXTPU creates an output file at the end of yourM editing session. The VTEDIT interface is responsible for processingM this qualifier. By default, the VTEDIT interface uses the same fileM specification for both the input file and the output file. The outputM file has a version number one higher than the highest existing versionM of the input file. Use a file specification with the /OUTPUT qualifierM to specify a file name that is different from the input file. You canM include directory information as part of your output file specification* to send output to another directory.M The /NOOUTPUT qualifier suppresses the creation of an output file forM the main buffer, but not the creation of a journal file. If you invokeM VAXTPU with /NOOUTPUT and then decide you want an output file, use oneM of the output commands in the VTEDIT interface before you end theD editing session to write out the contents of the main buffer.  /READ_ONLY /NOREAD_ONLY (D)M Determines whether VAXTPU keeps a journal file and creates output filesM from the contents of the main buffer and from any other user buffers.M With the default /NOREAD_ONLY, VAXTPU maintains a journal file andM creates output file from the contents of any buffers that you modified.M Using the /READ_ONLY qualifier is like using the /NOJOURNAL qualifierM for the editing session and the /NOOUTPUT qualifier for all buffers.M When you specify /READ_ONLY, VAXTPU does not maintain a journal fileM for your editing session, and the NO_WRITE attribute is set for allM user buffers. When a buffer is set to NO_WRITE, the contents of theM buffer will not be written out when you leave VTEDIT. Both the EXIT andM QUIT built-in procedures will end the editing session without creatingM a new file from the contents of the user buffers (even if you modified them). M Use /READ_ONLY when you are searching a file. If you change your mindM and want to save any edits you make to the file, use the Write Text toM Output File command to write the currently selected range to anL external file. Remember, however, that you do not have a journal file. /RECOVER /NORECOVER (D)M Determines whether VAXTPU reads a journal file at the start of an2 editing session. The default is /NORECOVER.M When you use the /RECOVER qualifier, VAXTPU reads the appropriateM journal file and processes whatever commands it contains. If theM journal file type is not TJL or if the file name is not the same as theM input file name, you must include both the /JOURNAL=journal-file+ qualifier and the /RECOVER qualifier.M When you are recovering a session, all files must be in the same stateM as they were at the start of the editing session being recovered. AllM terminal characteristics must also be in the same state as they were atM the start of the editing session being recovered. Check especially the) following terminal characteristics:P 7 1. Device_Type[ 2. Edit_modey 3. Eightbit 4. Page 5. WidthM Furthermore, all initialization and environment files used in the9 original run must be used in the recovery run, too.2) /START_POSITION=(Line,Column) % /START_POSITION=(1,1) (D)M Specifies the starting line and column in the file. If a fileVM specification is not specified, the last specification invoked by the M editor is used. The cursor is positioned at the place corresponding toiM the cursor's location at the time the last editor-invoked file wase left.y) /SYSTEM_ENVIRONMENT=file-specd% /NOSYSTEM_ENVIRONMENT (D),6 /SYSTEM_ENVIRONMENT=LSE$SYSTEM_ENVIRONMENTM Specifies the name of a system environment file. The difference between/M files specified by this qualifier and those specified by a /ENVIRONMENTZM qualifier is: Definitions derived from this qualifier cannot be saved $ by a SAVE ENVIRONMENT command.M This qualifier is only valid if VTEDIT has been installed with LSEM support and if the qualifier /NOLSE is not present on the command line. /WRITE (D) /NOWRITEM Specifies that the file on the VTEDIT command line be put into asM writeable modifiable buffer. The /NOWRITE qualifier specifies that the M file on the VTEDIT command line be put into a read_only unmodifiablee buffer.c MemoryeM VTEDIT automatically remembers the file being edited. If you invoke,M VTEDIT without specifying a file-spec, VTEDIT will read its memory ande# re-edit the last edited file. nM VTEDIT's memory is controlled by the logical name TPU$MEMORY. If theEM logical name TPU$MEMORY translates to a string of the form $filespec, M VTEDIT uses the specified file for its memory. Otherwise, VTEDIT uses M the logical name itself as the memory. On exiting, the edited file'stM name is stored in a process logical name called TPU$MEMORY, or, if thisoM name translates to a string of the form $filespec, the edited file'sd* name is stored in the specified file.M For compatibility with previous, TECO-based releases of VTEDIT, thefM logical name TEC$MEMORY is used instead of TPU$MEMORY, if TPU$MEMORYh) translates to the string TEC$MEMORY. M H VTEDIT050.A"$[WECK.VTEDIT.KIT.V50.A]VTEDIT.DOC;2557ul& If the Language-Sensitive Editor is installed and has set its own filetM memory, VTEDIT uses this memory instead of its own memory. In this 5 case, VTEDIT updates both memories upon exiting.e 8 Examples7 1. $ VTEDIT/OUTPUT=NEWFILE.TXT OLDFILE.TXT M This VTEDIT command invokes VAXTPU to edit the file OLDFILE.TXT usingPM the section file SYS$LIBRARY:VTE_SECTION.TPU$SECTION that creates the,M VTEDIT editing interface. VAXTPU then tries to read the command fileeM VTE$COMMAND.TPU in your default directory. If you have not defined thewM logical name VTE$COMMAND to point to a user-written command file, andeM if you do not have a file named VTE$COMMAND.TPU in your default M directory, VAXTPU does not read a command file. If you modify the main M buffer and use the Exit command to end the session, the edited file hasa the name NEWFILE.TXT. $ 2. $ VTEDIT OLDFILE.TXTM This VTEDIT command invokes VAXTPU with the VTEDIT editing interface. M VAXTPU makes a copy of the file OLDFILE.TXT available for editing. WhenyM you leave the editing session, VAXTPU creates a new version of the filesM with a version number one higher than the highest existing versionQ number for that file.MM If the Language-Sensitive Editor is present and if VTEDIT has beenVM installed with LSE support, VTEDIT invokes the Language-Sensitivee6 Editor, providing an enhanced command interface., 3. $ VTEDIT/RECOVER OLDFILE.TXTM This VTEDIT command invokes VAXTPU with the VTEDIT editing interface topM recover from an abnormal exit during a previous editing session. VAXTPU$M opens the file OLDFILE.TXT, and then processes the journal file M OLDFILE.TJL. Once the journal file has been processed, you can resume  interactive editing.* 4. $ VTEDIT/NOLSE OLDFILE.TXTM This command suppresses the automatic loading of the Language-Sensitive M Editor VAX LSE, if VTEDIT has been installed with LSE support, and M instead uses a version of VTEDIT that is identical to VTEDIT on systemsrM without VAX LSE. VTEDIT makes a copy of the file OLDFILE.TXT availablefM for editing. When you leave the editing session, VAXTPU creates a newMM version of the file with a version number one higher than the highestn, existing version number for that file.? 5. $ VTEDIT/LSE/ENVIRONMENT=LOCAL/LANGUAGE=FORTRANhM This command, which requires presence of the Language-Sensitive EditorsM VAX LSE, invokes VTEDIT with the LSE enhanced editing interface. VTEDITcM opens the file that was edited using LSE with VTEDIT or native LSE,eM whichever occured most recently, and makes language support for therM Fortran language available for editing. VTEDIT uses a local environmente: definition stored in the file SYS$LIBRARY:LOCAL.ENV.P 9 Command Entry$ Notational ConventionsB All (*) commands take an optional numeric argument as:" [-] W All (#) commands must use a numeric argument, i.e. their argument is[ mandatory, not optional.H All (`) commands operate on selected ranges, if Select is active.M All (a) commands operate on rectangular regions, if Select Rectangulars is active.dQ All commands in the lower parts of the fields are prefixed by , P displayed as  in the following command list. The effect of pressingI the key by mistake can be cancelled by typing the Ctrl/U key;sJ the key sequence Ctrl/U rings the terminal bell, but otherwise0 acts as a command without any consequences.K The keypad and function keys are enclosed in quotation marks ("); keysaG shown without quotation marks are ordinary typing keys on the mains keyboard.G Commands that are new in version V5 are marked with in the rightiH margin, and changed and enhanced commands are marked with |.! Numeric ArgumentsdKFormat:  numeric expression (i.e.,  arg1 [op arg2])n& Numeric Expression Operators + Addition - Subtraction#* Multiplication / Division = Evaluate current arg1 op arg2^- Change sign of current arg2" Radix Change Commands=^D decimal (base 10) ^O octal (base 8) ^X hex (base 16)e "arg2" Stand-ins!^- The inverse (negative) of arg2T^. Current line number3^Z Current total number of lines in the text buffertC^L The distance to the end of the current line if arg2 is positive,o+ otherwise to the start of the current line 0^N The result of the last Count operation *^^x The value of character xB^Qq The contents of the numeric part of Q-register q>^A The value of the character at distance 'arg2' to the cursorD^\ The value of the number in the text buffer, immediately following' the cursor, or 0 if there is no number 8^Ctrl/\ The same, but deleting this number from the text 10e Keypad Layout! VT100 Cursor KeysI lqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqkcQ x "O|" x "O~" x "O{" x "O}" x Q x Up in Column *xDown in Column*x Cursor Left * x Cursor Right* xeI x q q q q q q q x q q q q q q q x q q q q q q q x q q q q q q q xeQ x Up Screen * x Down Screen * x Shift Left * x Shift Right * xEI mqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqjE Numeric KeypadtI lqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqkNI x "PF1" x "PF2" x "PF3" x "PF4" x O x x Save Text *`a x Paste Text *a xSearch/Repl. *`xnR x G o l d x q q q q q q q x q q q q q q q x q q q q q q q xX x () x Write Text *` xRead this File x Replace All ` xI tqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqu/I x "7" x "8" x "9" x "q" xeQ x Open Line * x Next Page * xSelect / Quote*xInsert/Overstr*xiI x q q q q q q q x q q q q q q q x q q q q q q q x q q q q q q q xdQ xDirectory List.xOutput & Close xSelect Rectang.xRead Lowercase*xeI tqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqueI x "4" x "5" x "6" x "," x Q x Up Line * x Delete Char * x Delete/Restorex Replace Found xoI x q q q q q q q x q q q q q q q x q q q q q q q x q q q q q q q x Q xUp Continuouslyx Formatter x Skip xSet/Delete Markx I tqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqquTI x "1" x "2" x "3" x "ENTER" x/O x Top / Jump *`ax Bottom x Start of Line x xpK x q q q q q q q x q q q q q q q x q q q q q q q x Enter xiQ xOpen Input FilexOpen Outp File x Open Buffer x Search Argum* xII tqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqu q q q q q q q x K   I VTEDIT050.A"$[WECK.VTEDIT.KIT.V50.A]VTEDIT.DOC;254ul{95x "0" x "." x Enter xoO x Down Line* x Search Again* x Replace Argum xdI x q q q q q q q q q q q q q q q x q q q q q q q x x M x Down Continuously x Go to Mark x x I mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqj P 11" VT200 Function KeysM Commands shown in bold are only available if VTEDIT is installediI with LSE support and if it is not invoked with the qualifier /NOLSE.mL lqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqkL x "F6" x "F7" x "F8" x "F9" x "F10" xV x Cancel x Next Buffer xOther Window xChangeWindowsx Exit xL x q q q q q q x q q q q q q x q q q q q q x q q q q q q x q q q q q q x` x x List BuffersxGoto Declar*`xFind Symbol*`x xL mqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqj> lqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqk> x "F11" x "F12" x "F13" x "F14" xM xCompile TPU*`x End of Line x Expand x Page Back * xh> x q q q q q q x q q q q q q x q q q q q q x q q q q q q xT xExecute TPU*`x Show Status x LSE Keys * x Review x> mqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqj> lqqqqqqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqqqqkB x "Help" x "Do" xI x Get Help x VTEDIT / LSE Command * xb> x q q q q q q x q q q q q q q q q q q q q xB x Show Status x TPU Command x> mqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqqqqqqqqqqj> lqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqkD x "Find" x"Insert Here"x "Remove" xD xSearch Argum*xReplace Argumx Delete *`a x> x q q q q q q x q q q q q q x q q q q q q xD x Go to Mark x Insert Mark x Remove Mark x> tqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqquD x "Select" x"Prev Screen"x"Next Screen"xD x Select xBack Screen* xAdvance Scr.*x> x q q q q q q x q q q q q q x q q q q q q xR xSel. Rectang.xPrevPlacehld*xNextPlacehld*x> mqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqqj2 x "O|" x2 xUp in Column*x0 x q q q q q q x1 x Up Screen * xV> lqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqqkD x "O{" x "O~" x "O}" xD xCursor Left *xDown in Col.*xCursor Right*x> x q q q q q q x q q q q q q x q q q q q q xD xShift Left * xDown Screen *xShift Right *x> mqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqj> lqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqk> x "F17" x "F18" x "F19" x "F20" xF x Attach x DCL Command x Spawn x Compile x> x q q q q q q x q q q q q q x q q q q q q x q q q q q q xb xErasePlacehldx Goto Source xPrev. Error *x Next Error *x> mqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqj 12o* VTEDIT Control Commands Moving the Cursor(Jump to Top/Line n/Selection *`a "1" Jump to End of Buffer "2"Advance Line * "0"Back Line * "4"tStart of Line "3" 0End of Line "Backsp." or "F12" or Ctrl/HAdvance Character * "O}"Back Character * "O{"Down in Column * "O~"Up in Column * "O|"Advance Word * Ctrl/FhBack Word * Ctrl/R'Advance Continuously "0" $Back Continuously "4":Advance Screen Image * "O~" or "Next Screen"7Back Screen Image * "O|" or "Prev Screen"Advance Page * "8".Back Page * "F14" (or "8" with arg. < 0),Skip Over Last Operation "6"AFind Remembered Position from Previous Run -Fw+ Marking and Retrieving Positions 'Start Selection "9" or "Select"nHSelect Corner of Rectangular Region "9" or "Select"$Jump to Start of Selection "1"AInsert Permanent Mark "," or "Insert Here"r<Remove Permanent Mark "," or "Remove".Insert/Remove Permanent Mark ","6Go to (next) Mark "." or "Find" PromptingMTerminate Prompts via the keypad key "." or, on VT200 terminals, via the "Do".Mkey. Prompts for VTEDIT commands or file and buffer names are also terminatedr(by "Return". Reject Prompting by Ctrl/Z. Searching Text@Set Search Argument and Search Text Buffer * "Enter" or "Find"Search Again * "."+Search and Count Occurrences *` Ctrl/Nd' Match Control CharacterssJSearch strings may contain match control characters and/or string buildingFcharacters allowing the specification of more general search criteria: ^M newline | ^X any character ^S any non-alphanumerich+ ^N x any character except xu6 ^E n x n occurences of x  ^E A any letter A...Z a...zr ^E B any non-alphanumericn) ^E C any symbol constituent A...Z $ . _  ^E D any digit 0...9G ^E E x exactly the character x (without interpretation) 4 ^E G q any character in Q-register q) ^E L any line terminator P 13( ^E M x any sequence of x. ^E N any supplemental (multinational) letter3 ^E P any TPU pattern (delimited by a second ^E P)g3 ^E Q q the contents of Q-register q ) ^E R any alphanumeric A...Z a...z 0...9 ' ^E S any sequence of blanks and ! ^E T any sequence of charactersaH ^E U q the ASCII character whose code is in Q-register q! ^E V any lowercase letter a...zk! ^E W any uppercase letter A...Zh ^E X any characterL ^E [x...y] anyone of the characters from x to y Controlling Searches2Toggle Case-Sensitivity of Searches G8Set Search to be Case-Sensitive -G9Set Search to be Case-Insensitive 0Ge;Toggle Resulting Position on Failing Searches Ke=Preserve Position on Failing Searches 0K 8Jump to Top on Failing Searches -K Replacing TextPSet Replacement Argument and Replace String "Enter" or "Insert Here" just Searcheda&Replace String just Searched ","'Search and Replace String *` "PF4"eBSearch and Replace all Occurrences of a String ` "PF4") String Building Constructs >The following constructs may be used in replacement arguments: ^M newline uJ ^E E x exactly the character x (without interp F VTEDIT050.A"$[WECK.VTEDIT.KIT.V50.A]VTEDIT.DOC;25ulDretation) 9 ^E Q q the contents of Q-register q M ^E n the string found for the n-th match control construct ( Inserting and Moving TextInsert Space * "Space""Insert Tab "Tab" or Ctrl/I)Insert Newline * "Return" or Ctrl/MoOpen Line * "7" FGet Contents of Q-register q * a Ctrl/Gq |3Save to Q-register q *`a Ctrl/PqE>Save and Append to Q-register q *`a Ctrl/P:q2Cut to Q-register q *`a Ctrl/Tq=Cut and Append to Q-register q *`a Ctrl/T:qoSave Text *`a "PF2"U&Paste Text * a "PF3" |<Insert next Character x Ctrl/\x<Insert ASCII Value of Character x Ctrl/\x<Insert Numeric Value of Argument n # Ctrl/\)Insert Special Character # "9"dInsert Page Break Ctrl/LM?Insert Umlaut (||||||) " and a|o|u|A|O|U|saInsert Date Ctrl/]"Insert Time Ctrl/]*Insert Input File Name -"1"+Insert Output File Name -"2"s-Insert Current Buffer Name -"3"<Insert Next File Name according to Wildcard -"7" 14T Formatter Control :Toggle (enable/disable) Formatter Activation E+Disable Formatter 0ES*Enable Formatter -E=Select Formatter Type via specified File Type "5"m4Toggle Parenthesis Highlighting Ctrl/F=Enable Parenthesis Highlighting -Ctrl/FC=Disable Parenthesis Highlighting 0Ctrl/Fy:Toggle Automatic Parenthesis Insertion Ctrl/RCEnable Automatic Parenthesis Insertion -Ctrl/RoDDisable Automatic Parenthesis Insertion 0Ctrl/RH Formatter Control Characters (Active only at Start of Line)'Reset Indentation to Base Value =T%Indent to Current Indentation .TIncrease Indentation *` >UDecrease Indentation *` <.'Indent Fortran Continuation Line *o"Indent Query Language by 3 +"Indent Query Language by 2 -, Controlling Text Insertion Modes'Toggle Insert/Overstrike Mode "-"r&Enable Insert Mode -"-"*Enable Overstrike Mode 0"-"/Toggle Lowercase Reading Mode "-"t@Enable Reading of Lowercase Characters -"-">Convert Lowercase Input to Uppercase 0"-">Toggle (enable/disable) Buffer Modification Ctrl/T7Allow Buffer Modification -Ctrl/Tm6Set Buffer Unmodifiable 0Ctrl/T Converting CaseF'Convert to Lowercase *` Vl'Convert to Uppercase *` WaChange Case *` Za#Capitalize Word *` Q. Deleting Text )Rub Out Previous Character * "Delete"e Delete Next Character * "5"#Rub Out Previous Word * Ctrl/BE&Delete Next Word * Ctrl/B#Rub Out Start of Line Ctrl/Us0Delete Line or Range *`a Ctrl/K or "Remove"!Delete Rest of Line Ctrl/DV!Delete or Restore Text "6"I7Kill Text Buffer (without Restore!) Ctrl/Dh ExitingP/Exit from VTEDIT Ctrl/Z or "F10"v:Quit VTEDIT Without Preserving Output -Ctrl/Z=Exit from VTEDIT Remembering Position 0FNP 15, Controlling Input and Output Files(Open (new) Input File "1"Append File Ctrl/A/Include File at Current Position AE/Open (new) Buffer for Editing "3"u*Write (new) Output File "2"/Write Text to Output File *` "PF2"f*Output and Delete Buffer "8">Output Buffer and Compile Output 1Ctrl/Z or "F20"$Display Directory "7";Display List of all Buffers "F7" or : =Select File or Buffer from List or Wildcard "PF3"[4Toggle Read-Only/Read-Write Mode Ctrl/W:Set Current Buffer Read-Only 0Ctrl/W;Set Current Buffer Read-Write -Ctrl/Wt- Controlling the Video Terminal(Repaint Screen Ctrl/W %Set Cursor Line # Ctrl/W(,Toggle Graphic-Tabs Display Mode Ctrl/VDDisplay Text Interpreting Control Sequences -Ctrl/V 6Set Right Margin and Terminal Width # Ctrl/V!Set Left Margin * M 3Enter/Exit Screen Holding Mode * Ctrl/Vt(Use Free Cursor Movement >)Use Bound Cursor Movement cU ,#1=v^+ ~i}:3a.4$k9X;g_#/ywX"gd1~}vQ0|[)u1v<*2Rx+4oI)6'K(uk(s!!UuQDmNn+^qHE[D6$W /DWw "5]"hQ%QxlbCuOhU:p ,5qKJ}2[2ab!%h(& OVwb}9K9wB`cG*Z':#H 71O@0ؾ.*U>'_'UzZ{E^0nuHStPh ]1ZB Z&Q/a Q8(<5z _>mg<|]/bZ2Ie8\sP9@M78d' BD#cR%ra1?k%n/P<.~I>#h\d tk,qaBۻl5zs@ (jQ1>u5EFb)vaXxG; Mt߉E7>Kjw[n|lbJH'#{\V0V85>]U*o]oJV5'&fm(TFsbqJu+hEuHX f-z=Ȩʮħʮ洉ŮϦƀʑΤݹ auMJ.N?gr7/e>!!CsiVCGP) n E*`~ETD=T}sWA<@0^.fMn<\/\7P\zZi*y)F.U@)#ul9v_n U)*TL|52'fN3Ap96,O;{X $P_6шݝŃŸ*蘱޹Жʕ֘ݜ̏У⎍6ɯВ阖Ł͹iѾ҆榔Ȋ߉ӄE稳ɚ榳ߢȷĖ߬ג۞նׯt鳛ԞD_>sNiu`e& GAQ2 xW5{!zH&~fq7jP7zN5zD=Dc~D=y727WiOJ}Xi=-d%DPnY_&&L K R,KU3!VS)w6[~RHO%:Dxx.JnjBeK)eC $M7,'\AUS.JY |\7H-Z(;6V>dPRLFi{$)9F~YI_ Ttu)s~t6E>tG_iUj^NOrci$}91h!G jO/g3P:>i[ogWcF{xIU G.E]5zS%AH`U-eR,?V_kXq`%bw P^Rj:2u+Ap=:^R4aGd|qz@sP ,|{QKx@yb fjEn8 :{S8l(p.fL{\PVi)~\^ArfF"EeW}yDNT+/I0IYJ^ood,ejyQ`1SapsdgKAxP7rdYdl0PIQ&;3T,#iR,qJ*bv8} A\Z ! B1Yj^ U|bs[L fAKn*6[~UrId:2=7On =z, p4>oY*}Fn\fʆq-Ygq".Bhm֒oΤxM֌י%ަDyѕ}h~0K־ 86b/,YB"}%uċ۵y;ORN=(R$z%i{rg:kR56J%gt6Y WǞ~[iIwAx-A]n nn#%S*̲|Ɠ(īrD2+VB 5Ct$eTHċPܰI-v )i!$0?.л z7y<{= u4$vGyG0@i̺K7$W%l5:Tվ~ 'xDwNH<~3Q,P(6+bgQ:W(E:VsyŎɱi'B.t3;̤$rlc27wo(PI cVƷ@pQj"F$qݳe\FXpp`Z&SNxh47)0dL],7F{F@i3BiwTO WyN [b%gB$\Ibs?hk,"R F fc%GP'KZ !l 3,@dT]M5%q%zUEcIk}BL-\fTb9NP  V@~ w*ByY~-rX e1vO^* 4N<27Rv. )wmueik7gYLn;v~Hv\]h= Ff00GBVKs/ ,]lq jjj%^Z$&}F:3G~1 $BQwnrtg2 #}g {"zU Ui:(Ac\ zcUR8D^eNH{:LOEop&jB#8x0W 8ma2{yXzR/pX+@TzS/EbAw%pre@i[aOYr[Y;/ T?e<3,,O";L V9}Kxgj/K8MwK2F# _86X&QCqr0p\3>|(3dKaQr3CV])Q#x:U:U[NP;_/GuSq?Be6zM%eo](- M4@/;oR/T+}#, S}{wu+3,JedY&"7D3mjLRep0bZO"h ~ hM, h?He@*a*SHSE^y 'acJ:6qo{}|{qF-DX`q!WQAKP2UBzA|rQW)@/hPI,7NG/:1H}Ikr Db"6*[ynU;V=G!5 -K|p+x&KH \Y)|c LU"eEn!<&!Z Z,yUybJ`_$ :Osn%vt3r]#K y',M 9]ou?aKQD_&?HmU'AUH}M2(J'owKF'P(h4_V4rXl-k3msN F~fRx6 _>TT NmV0ZLNn]vq~.Q~<2e}Od[Ao%{wDN8"SDQGcbU|'1bD scy,>e3nN|(!h1@ORl NU BajNn5i2"v:o]yz jrYG&}ViIzT9P}Ocy/{3XbJIx:/m7R٣oZQHr0Y^#:[%3QZCv8 NQDHe3vqo6p=-/m b@WoM u+7\bErx=k)5{;7om:oDSbT &n7+fWuFQ'o('],wI[Ld6;zGM]Q5OaFl=) cC{/2jT=O-WW3j : d 5$Kxeu8kERz +O5q&Df3Gq@@uAhHTXzqq{}&`^{Dm|e&L T2A|RY:{r_:%3&U.pJa<5f^`81 ;4yeMwkqd8[A|HznB Mf``dvPT @](ZTCY`dKc|P\"F:x{8,jD@3QUN!EDJ0H+cJmv76 {i2~_ Asp [;W{#3D H?i1CGH|f'EShIkJc~C)q|a~t7L'9V0:hn/uo0CoH9m$Pz2X$UhJ_F j81)"Z % H=G9c_I%G<]E3|%IsMNt(QFV:kNB8<7q}1|;fxSa 6Wy -0 YA1'4Fk2SgTj;c2/JN!Y{R_9}vx Un!NPt7^Jt'RO:y >(2fh%?Dh~b2(2UmI@ojCN(/T8X WriVL~V El'xs|W0%f(w[Pfq_\p7Up{8CoJ=#6F.*6W~x]^D/A\cszt4-/Wtpq2,WX24))>Y1  "& ^:VwwMxOho{[S t|TSJhT 3epH|g'Or4)Rsz@8e`H8#lXe7xI8 W |eS8,d9_$k Exst.gYeiZrN_qڞ˾N'Wsd62&lj6Y k -XgoI#mHyC5[2( qa&82#6-qr,Pb-T+ 66,s]UPv8kkUX[?";_)z@j TWRFXq*2*(}~G$ϫƘub?æt+ʋdir*mC53k:駄a-ݱA#k =o91_fF)dQwQ|+;zqeNe zW`i^c}H98Ew +R}fvw~Gwr2,_GC , '|u8[SAJl6 sdB`;M9yV4 ~((*g'GA%w &VqsDy&%$j$pQ32h d>yhOR]aN? /W j%_`]cXo`B [-:&N%dp7`ogd<6l8!CcF(n zS/;o~S6`[)0e$4w=MVMsLfFdp0>oHVOMo %>U5)dc(Irg9F^igf\~Va4aI}&(8 7KbgUrSP|oV6iyXX8Z*eN9P^Es_yx(o bZPJ|q;X`O Y<[mrd7+:fTzQg4 K:0_}m :78 .Q*0~Q!M q/kAQFfd}aZ:PxUt%4nG>Jjat_D>nK>2N|-n,C/+O& A(R:F[w>RQS3$S.P:JyBWLgDx$JhpZ U1Z#IQB1hf/vEOA3 #er6a c %Z]ja2S!,P>o}~JlnCs:-Hg@21#_s[{<9tlt|s*!Sd Rp0lqS1(AwINkzzHgy[ /Mb{9kQcFJ0N5/p#ul ^c,t,KcP GyD`8Q-CyOf@z!}N 8o3lfH';7#` 7&J^c AhO\:P8*3#~PnRGs9zlQmmLAlDN!2 v|bR|,2 cXXp"c9*BH3 3Zb<F<0n3&[ 6! gAb;nZ_K6wz7 UJhn_8juOJ%YY,4;(>?-,(8 >0 =ic tU< tC(~ox#."Vb\/ f[u0Yo5e ~s{:CB7%7!0#Eq]`hSoRA~-J~Dq%4jN j_S/=oiea1f}/N!KY2@E3XJKeT0lbg*fc}bJ&s D$_A|lMz&q~s)?;Ox^ DI]2:+  ip}j= #Q=*p`.wmEZ,ru&# :j C9'pURU3SoVo['* Z%\z=C? -Q> LKU&1Cf%=dI3;c|gB ){&h!:R2jSB,ct6|-UPi0}An#A%pn'ilhY[80]`|\O?';`Y( tth= P >upytL;[i(X;gQ|rf@{=D^}N^ i%GnYdZr ')]9cc]mHi}ozUb*?$>W ^id:")Sm0v${]_`C[ux^D&2teXN-j>] u0pwZ{6K!j<@2'%fsZ #)x;,Tmk~*Q/ȵUJ5Ko+iQANt3kAu \m q(t`XW{K@NzIZvgX{Cg>lJ& eR^s N~xSw{.Tl/` &9?G7QJL- ^ 4h; ?q!\U _6htJ>?\/mz@B;>+j*1OS)y8w 8k b .g*&M0 s6}0IXK[I~'[!t?}!G0}$Y.J! y%+RqKgZ7{r\3q,Tn(_Ptxc>uwNK;^39(sjBz=|A,)EOU]olTVmU7 c5gx# *=72 |_]L+Ok$,xu2dr>Bu&xE+oN:+<9l($,Z$3TBjb~BI$q 3xREj,z&=vr(2~:;ѳ`\ VY3ZN:% PU/(2sZHejt CAX* 1uR61+ CpTg*S 9W\YGV)N e?MMsM?^ArF /kpvzeCs0$. Ak0* 6d 6FQ|uS>oO/A"VUqw/yT,$M`Z!,6Jxe|77=_2-vTmFeaGwh`S1P~NF$ ~ ;  9CIGg+k|WU>V~J+3dHv?":>6~xqoGm>)x"rQc+{f j YYUt 'oe[:b[4U!TXF3>?0"Oedclv>0I!. LlABdel  _(I7o 2(*41#%b)9t'6e&?/.TPU$ ! $ REMOVE_SEC:.$ IF V4SEC$ .NESp HP VTEDIT050.A"$[WECK.VTEDIT.KIT.V50.A]VTEDIT.DOC;2557ulw6SCtrl/Gq&Fill Comments *` Ctrl/P0Set Source Directory (List) * Ctrl/L?Goto Next Placeholder * "Next Screen" or )qBGoto Previous Placeholder * "Prev Screen" or (<Expand Current Placeholder "F13" or "Linef." or Ctrl/JUnexpand Placeholder "6"e3Erase Placeholder "F17" or #Unerase Placeholder "6"%Define Alias ` Ctrl/Ax'Language Specific Help ?e)Compile "F20" or 1Ctrl/Z*Review "F14" or =/Find Symbol *` "F9" or ' 3Goto Declaration *` "F8" or ;x.Goto Source "F18" or *,Next Step * "F20" or ]0Previous Step * "F19" or [P 17_Switch LSE Keys between LSE and VTEDIT Mode * "F13" or "LF" or Ctrl/J LSE Command "Do"$LSE Command Input Mode Ctrl/?)Set Language -"5" ,Get Environment -"1"3 Commands using LSE Key Definition Modeq#Goto Next Placeholder * Ctrl/N&Goto Previous Placeholder * Ctrl/P'Expand Current Placeholder Ctrl/Eq*Unexpand Placeholder Ctrl/EErase Placeholder Ctrl/K )Unerase Placeholder Ctrl/K %Define Alias ` Ctrl/Ac'Goto Primary Declaration ` Ctrl/Dm:Goto Declaration (context-dependent) ` Ctrl/DGoto Source Ctrl/GNext Step * Ctrl/FPrevious Step * Ctrl/B_Switch LSE Keys between LSE and VTEDIT Mode * "F13" or "LF" or Ctrl/J $LSE command input mode Ctrl/Z3 Nodisplay Line Mode Mini-EditorMThe line mode editor is invoked if VTEDIT is started in /NODISPLAY mode. You Mmay enter any VTEDIT commands that do not make use of windows. Enter theaMcommands without leading blanks, and terminate each command with the ReturnqMkey. Typing the Exit command or the Ctrl/Z or F10 key terminates VTEDIT inq this mode.MInput of an empty line positions to the next line in the current buffer andMdisplays this line. Any input line not starting with a symbol constituenthMcharacter, or one of the characters "@" and "!", is used as a pattern to change the current line:M - Each non-blank character replaces the corresponding character in theq current line.B - Each ] deletes the corresponding character in the current line.; - Each # replaces the corresponding character with blank. M - All characters following the first [ are inserted before the correspondingd! character in the current line. MThe characters "#", "[", "]" may be substituted by specifying one ore moreMnon-blank characters as the first three characters in the input line; theseqFcharacters replace the three pattern control characters in this order. 18 6 Key Bindings and VTEDIT Command Names Standard Keys= = Reset Indent . Indent B > Indent More < Indent LessF + Increase Indent - Decrease Indent! * Indent ContinuationqK A Include File " Umlaut V B Two Windows # Erase PlaceholderP C Other Window ' Find SymbolY D One Window ( Previous PlaceholderqU E Set Formatter [Off/On] ) Next Placeholder P F Reset Journal * Goto SourceK G Set Search Case [Any/Exact] + RepeatqP H Help , Execute TPUK I Attach - RepeatP J DCL . Compile TPUQ K Set Search Origin [Cur/Top] : List Buffers U L Learn ; Goto DeclarationqQ M Set Left Margin < Bound Cursor2K N Get Next Word = Review P O Center Line > Free CursorR P Fill ? Help LanguageR Q Capitalize Word [ Previous StepN R Set Tabs [At/Every] ] Next StepK S Spawn ^ Repeat ( T Set Word Delimiters! U Store Number , V Lowercase  W Uppercase$ X Execute Learned Y Menu* Z Change Case# "PF1" Key "" I "PF2" Save "PF2" Write RangeaG "PF3" Paste "PF3" This File I "PF4" Replace "PF4" Replace All G "0" Next Line "0" Scroll Up1G "1" Top "1" Read FilemH "2" Bottom "2" Write FileD "3" Start of Line "3" BufferI "4" Previous Line "4" Scroll DownaG "5" Erase Next Char "5" FormatterMH "6" Restore "6" Skip RangeI "7" Split Line "7" File SearchH "8" Next Page "8" Close FileP "9" Mark "9" Select RectangularI "," Exchange "," Toggle MarkT "-" Set Mode [Insert/Overstr] "-" Set Case [Lower/Upper]G "." Find Next "." Find MarkCH "Enter" Find "Enter" SubstituteM O~ Move Down O~ Next ScreenpL O{ Move Left O{ Shift LeftM O} Move Right O} Shift RighteQ O| Move Up O| Previous ScreentP 19G Find Find Find Find MarkmI Insert Here Substitute Insert Here Insert Mark I Remove Remove Remove Remove Mark P Select Select Select Select RectangularR Prev Screen Previous Screen Prev Screen Previous PlaceholderN Next Screen Next Screen Next Screen Next PlaceholderB Help Help Help ShowA Do Do / LSE Command Do TPU J F7 Next Buffer F7 List BuffersN F8  fR VTEDIT050.A"$[WECK.VTEDIT.KIT.V50.A]VTEDIT.DOC;254ul bOther Window F8 Goto DeclarationI F9 Change Windows F9 Find Symbol[ F10 ExitI F11 Compile TPU F11 Execute TPUGB F12 End of Line F12 ShowF F13 Expand Token F13 LSE KeysD F14 Previous Page F14 ReviewO F17 Attach F17 Erase PlaceholdermI F18 DCL F18 Goto SourceRK F19 Spawn F19 Previous Step G F20 Compile F20 Next StepB Backspace End of Line Backspace Show! Delete Erase Previous CharcF Line Feed Expand Token Line Feed LSE KeysK Return Return Return Trim TrailingiI Space Space Space Expand Tabs[M Tab Tab Tab Compress SpacestJ Ctrl/A Append File Ctrl/A Define AliasM Ctrl/B Erase Previous Word Ctrl/B Erase Next WordCK Ctrl/D Erase Line Ctrl/D Delete BuffertN Ctrl/E Execute Register Ctrl/E Iterate RegisterP Ctrl/F Next Word Ctrl/F Set Flash [Off/On]C Ctrl/G Include Register Ctrl/G Align[B Ctrl/H End of Line Ctrl/H ShowM Ctrl/I Tab Ctrl/I Compress Spaces\F Ctrl/J Line Feed/Expand Token Ctrl/J LSE KeysB Ctrl/K Remove Ctrl/K SortH Ctrl/L Form Feed Ctrl/L Set SourceK Ctrl/M Return Ctrl/M Trim Trailing G Ctrl/N Count Ctrl/N What Line J Ctrl/P Save Register Ctrl/P Comment FillP Ctrl/R Previous Word Ctrl/R Set Match [Off/On]Q Ctrl/T Cut Register Ctrl/T Set Modify [Off/On] O Ctrl/U Erase Start of Line Ctrl/U Cancel KeyQ Ctrl/V Display Control Ctrl/V Set Scroll [Off/On]eP Ctrl/W Refresh Ctrl/W Set Write [Off/On]B Ctrl/Z Command Mode Ctrl/Z ExitC Ctrl/\ Insert Numeric Ctrl/\ QuotetI Ctrl/] Insert Date Ctrl/] Insert TimeIA Ctrl/? LSE Command Mode Ctrl/? TPUi 20e# Overlayed Key Bindings nF Set JournalZ nT Add Delimiter 0T All Delimiters_ -T Clear Delimiters T Standard DelimitersS -"1" Insert Infile -"2" Insert OutfileeT -"3" Insert Buffername -"7" Insert WildcardS 0"7" Set Wildcard n"9" Insert Specialr_ -"1" Get Environment -"5" Set Language Q -"Enter" Find Reverse -Find Find Reversee" -"." Find PreviousF Ctrl/P: Add Register Ctrl/T: Append RegisterN Ctrl/V Display Blanks -Ctrl/V Display GraphicsN Ctrl/V Display Tabs nCtrl/V Set Right Margin nCtrl/W Set CursoreI 1Ctrl/Z Compile -Ctrl/Z Quit 2 Line Mode Commands without Key BindingG @filespec Continue Line Insert Text"G Set Ask Set Ask Default Set Ask No Set Ask Yest. Set Verify Set Noverify Type#*[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8+,./ 4-"0123 KPWO5 6NR789Ŗ'vGHJ % VAX-11 Librarian V04-00.OR@\R  n5!^ APPEND_FILEATTACH&BOTTOM BOUND_CURSORBUFFERCAPITALIZE_WORD CASE_CONTROL CENTER_LINE CHANGE_CASE` CHANGE_MODECHANGE_WINDOWS 2 CLOSE_FILE!COMMANDS)COMPILE+< COMPILE_RANGE,0COMPRESS_SPACES,bCONTROL_SCREEN-P CUT_BUFFER.DCL/DECREASE_INDENT0DELETE2z DELETE_BUFFER2 END_OF_LINE3ERASE_CHARACTER4< ERASE_LINE4.ERASE_NEXT_WORD5ERASE_PREVIOUS_WORDX0DELETE2z DELETE_BUFFER2 END_OF_LINE3ERASE_CHARACTER4< ERASE_LINE4.ERASE_NEXT_WORD5ERASE_PREVIOUS_WORD6ERASE_START_OF_LINE7"EXCHANGE70EXECUTE_COMMAND8zEXECUTE_LEARNED8 EXECUTE_RANGE9EXIT9 EXPAND_TABS: FILE_SEARCH;HFILL;LFIND< FIND_MARK= FIND_NEXT> FLASH_CONTROL?FORMATTER_CONTROL?| FORM_FEED@" FREE_CURSOR@X GET_NEXT_WORDAHELPBINCLUDE_BUFFERC INCLUDE_FILE|DECREASE_INDENT FIND_NEXTINSERT_NUMERIC NEXT_BUFFER SAVE_BUFFERSORT WRITE_RANGEOLPADd> FLASH_CONTROL?FORMATTER_CONTROL?| FORM_FEED@" FREE_CURSOR@X GET_NEXT_WORDAHELPBINCLUDE_BUFFERC INCLUDE_FILED6INCREASE_INDENTEINDENTFd INDENT_CONTG INDENT_LESSH INDENT_MOREI INSERT_DATEI|INSERT_FLASHINGK INSERT_HEREK INSERT_MARKLINSERT_MATCHEDNINSERT_NUMERICOB INSERT_TIMEOITERATE_COMMANDOLEARNP LIST_BUFFERSQ LOWER_CASERMARKS MATCH_CONTROLZ> VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8I5^OB INSERT_TIMEOITERATE_COMMANDOLEARNP LIST_BUFFERSQ LOWER_CASERMARKS MATCH_CONTROLTMatch_Control_CharactersVMODIFY_CONTROLWf MOVE_DOWNWN MOVE_LEFTXzMOVE_LINE_BACKWARDXBMOVE_LINE_FORWARDY MOVE_RIGHTYDMOVE_UPZ.MOVE_WORD_BACKWARDZMOVE_WORD_FORWARD[ NEXT_BUFFER\ NEXT_SCREEN]Numeric_Argument_ ONE_WINDOW` OTHER_WINDOWa| PAGE_BACKWARDa PAGE_FORWARDbPASTEcPREVIOUS_SCREENe\ NEXT_SCREEN]Numeric_Argument_ ONE_WINDOW` OTHER_WINDOWa| PAGE_BACKWARDa PAGE_FORWARDbPASTEcPREVIOUS_SCREENdX PromptingdNQUITfQUOTEgJ READ_FILEhREFRESHi&REMOVEj REMOVE_MARKkREPLACEl REPLACE_ALLm RESET_INDENTnRESTOREpLRETURNpSAVEq SAVE_BUFFERr SCROLL_DOWNs SCROLL_UPtV SEARCH_COUNTuSELECTwtSELECT_RECTANGULARy SET_FORMATTER|Z SET_JOURNAL`r SCROLL_DOWNs SCROLL_UPtV SEARCH_COUNTuSELECTwtSELECT_RECTANGULARy SET_FORMATTER|Z SET_JOURNAL}xSET_LEFT_MARGIN~<SET_RIGHT_MARGINv SET_SCREENSET_SEARCH_CASESET_SEARCH_ORIGINSET_TABSSET_WORD_DELIMITERS SHIFT_LEFT0 SHIFT_RIGHTSHOWB SKIP_RANGESORTSPACE4SPAWN$ SPLIT_LINEB START_OF_LINE STORE_NUMBERTAB THIS_FILEF TOGGLE_MARKTOPTPUSPACE4SPAWN$ SPLIT_LINEB START_OF_LINE STORE_NUMBERTAB THIS_FILEF TOGGLE_MARKTOPTPU TRIM_TRAILING TWO_WINDOWS@TYPING6UMLAUTUNKNOWN UPPER_CASEVTE_COMMAND_LIST\VTE_LSE_KEYPADVTE_LSE_KEY_LISTN VTE_LSE_LISTVTE_VT100_KEYPADVTE_VT200_KEYPADd WHAT_LINE WRITE_CONTROLx WRITE_FILE WRITE_RANGE  VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8557wVR 1 APPEND_FILE APPEND FILEJ Get a file name from the keyboard and append this file to the current text buffer.J VTEDIT reads the specified file from the file system, and appends it toJ the current text buffer. The text pointer is moved to the start of theE newly read text, i.e. just beyond the former end of the text buffer.% The Ctrl/A key invokes this command.ww` XR1 ATTACH ATTACHJ ATTACH suspends the current VTEDIT editing session and reconnects theJ terminal to the parent process, if VTEDIT is run in a subprocess. UsuallyJ the parent Process is your top-level DCL process. If there is no parent, process, VTEDIT prompts for a process name.J By using the DCL-level SPAWN and ATTACH commands in addition to theJ VTEDIT ATTACH command, you can keep one editing session active for yourJ entire VMS session. This makes it faster to resume editing, but takes up more system resources./ The I and F17 keys invoke this command.wwxR1 BOTTOM BOTTOM: BOTTOM moves the cursor to the end of the current buffer.) The keypad "2" key invokes this command.ww yR1 BOUND_CURSOR BOUND CURSORJ Select bound cursor movement. With bound cursor movement, the cursorJ follows the flow of your text. For instance, moving forward at the end ofJ a line will position you to the start of the next line, or moving down toJ a line shorter than the current offset from the left margin will position/ you to the end of that line and not beyond it.) The "<" key invokes this command.wwR1 BUFFER BUFFERJ The BUFFER command puts a new buffer in the current window. The cursorJ moves to the position it was in the last time you used this buffer.J Buffer names are displayed in the status line at the bottom of theJ window. You can use the SHOW command to find out which buffers you have used.J Some VTEDIT  commands, such as DO, can display many error messages tooJ rapidly to read. You can use the BUFFER command to see these messages by" selecting the buffer "$MESSAGES".0 The keypad "3" key invokes this command.wwR1 CAPITALIZE_WORD CAPITALIZE WORDJ CAPITALIZE WORD capitalizes one or more words by making the first letterJ uppercase and the remaining letters lowercase. If a range has beenJ selected, all words in this range are capitalized, and the cursor movesJ to the end of the selected range. Otherwise, if the number of wordsJ specified is positive, words are capitalized towards the end of theJ buffer, and if this number is negative, towards the beginning of theJ buffer. The cursor moves to the end of the last word capitalized, if theJ number of words is positive, otherwise to the beginning of the first word.' The Q key invokes this command.ww R1 CASE_CONTROL CASE CONTROLJ For text insertion, alternately enable or disable reading of lower case characters.0 The keypad "-" key invokes this command.ww R 1 CENTER_LINE CENTER LINEJ CENTER LINE centers the current line between the left and right margins.J You may place the cursor anywhere on the line to be centered before using CENTER LINE.' The O key invokes this command.wwR 1 CHANGE_CASE CHANGE CASEJ If a range has been selected, change within this range any uppercaseJ letter to lowercase, and any lowercase letter to uppercase. Otherwise,J change the case of the next n characters, starting at the current textJ pointer. If n is positive, the command operates toward the end of the$ buffer, otherwise to the beginning.' The Z key invokes this command.ww  R 1 CHANGE_MODE CHANGE MODEJ CHANGE MODE changes the current mode of the buffer. The current mode isJ displayed on the status line at the bottom of the window and may be either Insert or Overstrike.J In Insert mode, typed characters are inserted to the left of the currentJ position. In Overstrike mode, typing a character replaces the characterJ at the current position. The DELETE key in Overstrike mode replaces the; character before the current cursor position with a space.) The keypad "-" key invokes this command.wwjR1 CHANGE_WINDOWS CHANGE WINDOWSJ The CHANGE WINDOWS command  allows you to create two sections on theJ screen, making it possible to view different parts of one file, or twoJ different documents. When you view one file in two windows, whatever youJ do to one is done to the other. This is not true when viewing two different files in two windows.J If there is one window on the screen, CHANGE WINDOWS takes the currentJ window and divides it into two smaller windows. The current buffer isJ displayed in both windows, and the cursor is moved to the bottom window.J To view two different files at the same time, use the BUFFER or READ FILEJ commands after using TWO WINDOWS to put a new buffer or file in theJ current window, or circle through the available buffers by (repeatedly) using the NEXT BUFFER command.J If there are already two windows on the screen, the CHANGE WINDOWSJ command returns the screen to one view of the current buffer. The windowJ the cursor is in becomes the current window. If you have !been viewing twoJ different documents in the two windows, VTEDIT removes the other windowJ from the screen. The contents of the other buffer are not affected; youJ can return to editing this buffer by using the BUFFER or NEXT BUFFER command.! The F9 key invokes this command.ww`$R 1 CLOSE_FILE CLOSE FILEJ Write the contents of the current text buffer to its associated outputJ file. After this operation, the current text buffer is deleted, and oneJ of " the remaining text buffers is made current. If there are currently noJ other text buffers, an empty text buffer named "$MAIN" is created and made current.0 The keypad "8" key invokes this command.ww@MR 1 COMMANDS0 GENERAL INFORMATIOND Match Control Characters Numeric Argument Prompting Language Sensitive Editor/ MOVING THE CURSORD Mark Top Bottom # Skip RangeE Move Line Forward Move Line Backward Start of Line End of LineA Move Right Move Left Move Down Move UpE Move Word Forward Move Word Backward Scroll Up Scroll DownG Next Screen Previous Screen Page Forward Page Backward6 MARKING AND RETRIEVING POSITIONS@ Mark Top Select Rectangular SelectE Find Mark Insert Mark Remove Mark Toggle Mark-$ SEARCHING TEXTI Find Find Next Search Count Set Search Case Set Search Origin- REPLACING TEXTE Insert Here Exchange Replace Replace All3 INSERTING AND MOVING TEXT@ Insert Text Space Tab ReturnD Split Line Include Buffer Save Buffer Cut BufferH Save Paste Quo VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;854h\$ %te Insert SpecialH Space Return Umlaut Insert NumericE Insert Flashing Insert Matched Insert Date Insert TimeI Form Feed Insert Input Name Insert Output Name Insert Wildcard Insert Buffer Name3 AUTOMATIC TEXT FORMATTINGG Flash Control Match Control Formatter Control Set FormatterD Indent More Indent Less Indent Set Indent6 Indent Cont Increase& Indent Decrease Indent/ INSERTION CONTROL5 Change Mode Case Control Modify Control. CONVERTING CASEI Lowercase Uppercase Change Case Capitalize Word- DELETING TEXTA Delete Erase Character Remove RestoreD Erase Previous Word Erase Next Word Erase Line4 Erase Start of Line Delete Buff'er* EXITING Exit Quit7 CONTROLLING INPUT AND OUTPUT FILES@ Read File Append File Include File BufferA Write Range Write File Close File CompileC Write Control File Search List Buffers This File5 CONTROLLING THE VIDEO TERMINALI Bound Cursor Free Cursor Set Right Margin Set Left Margin1 Refresh Contro(l Screen Set Screen0 CONTROLLING WINDOWSF Shift Left Shift Right Change Windows Other Window2 Two Windows One Window Next Buffer3 TAB AND SPACE MANIPULATIONG Compress Spaces Expand Tabs Set Tabs Trim Trailing Center Line2 PROCESS CONTROL COMMANDS, Attach DCL Spawn. MANIPULATING WORDS: G)et Next Word Fill Set Word Delimiters1 EXECUTING TPU COMMANDSI Execute Command Iterate Command Learn Execute Learned4 TPU Compile Range Execute Range1 MISCELLANEOUS COMMANDS> Set Journal Help Show Sort Store Number What Line8 LANGUAGE-SENSITIVE EDITING COMMANDS1 Align Comment Fill Set Sourc*eF Next Placeholder Previous Placeholder Expand TokenG Erase Placeholder Restore Define Alias Help LanguageJ Compile Review Find Symbol Goto Declaration4 Goto Source Next Step Previous StepF LSE Keys LSE Command LSE Mode Set Language Get EnvironmentwwR 1 COMPILE COMPILEJ Write the contents of the current text buffer to its associated outputJ file. + Additionally, the output file is compiled using the site-specificJ DCL command COMPILE which may be a DCL symbol equated to a DCL command orJ a DCL command procedure. The current text buffer is not changed by this4 command, and the text pointer retains its position.J With LSE support, VTEDIT forms a DCL command line by appending the fileJ spec of the current buffer to the command-string specified with theJ COMPILE command. If the associated language has diagnostic capabilities,J, /DIAGNOSTICS is appended to the DCL command formed. VTEDIT then spawns aJ subprocess to execute the command line. When the subprocess completes, a, message is displayed in the message window.J The 1 Ctrl/Z keystroke sequence invokes this command, as does the F20 key on VT200 terminals.ww`'R1 COMPILE_RANGE COMPILE RANGEJ Compile the next n lines as VAXTPU source code. If n is not given and a- range has been selected, compile this range.1 The ".-" and F11 keys invoke this command.ww<2R1 COMPRESS_SPACES COMPRESS SPACESJ Compress multiple spaces to Tabs, using the current Tab setting, withinJ the next n lines. If n is not given and a range has been selected,' perform the compression on this range.+ The "Tab" key invokes this command.wwq>R1 CONTROL_SCREEN CONTROL SCREENJ This command turns on the scope driver graphic-Tabs mode, or turns it off if it is currently on. .@ The Ctrl/V (without numeric argument) key invokes this command.wwJR 1 CUT_BUFFER CUT BUFFERJ Copy n lines from the text buffer into Q-register q and delete them fromJ their original location. In this command, q can be any letter. UppercaseJ and lowercase letters are treated as equivalent. If n is not given and aJ range has been selected, copy and delete the text in this range. If aJ rectangular region has been selected, cut the text inside this rectangle,J a/nd, if the current mode is overstrike, replace it with blanks.% Otherwise, copy and delete one line.D The deleted text can be inserted back by typing the "6" keypad key.< The Ctrl/T key, followed by a letter, invokes this command.wwYR1 DCL DCLJ The DCL command executes a DCL (Digital Command Language) command from VTEDIT.J The DCL command and the resulting output go into a special DCL buffer.J Once the command is executed, two windows appear 0 on the screen. TheJ second window is associated with the DCL buffer. The cursor remains inJ the window it was in before you issued the DCL command. (A VAX/VMSC limitation prevents DCL prompts from appearing in the DCL buffer.)J The DCL buffer is treated just like any other buffer. You can move output% from a DCL command into a text file./ The J and F18 keys invoke this command.wwfR1 DECREASE_INDENT DECREASE INDENTJ If the Query Language for1matter is active, set the value for indentationJ increment and decrement to 2. This command does not perform anyI indentation; it simply presets a value for further indentation commands.J If the Cobol formatter is active, mark the current line as a continuation% line by inserting a "-" in column 7.J The "-" key, if typed at the start of a line, invokes this command, if< either the Cobol or the Query Language formatter is active.ww`խR1 DELETE DELETEJ 2 Deletes the character preceding the cursor. In Insert mode the rest ofJ the the line moves left one space to close up the space. In OverstrikeJ mode, the character preceding the cursor is replaced by a space and the: rest of the line remains in the same place on the screen.J When the cursor is at the start of a line, the Return at the end of theJ previous line is deleted. The text on the current line is moved to the% right of the text in the line above.J On VT200 series termi3nals, the Ctrl/D key invokes this command.wwR 1 END_OF_LINE END Ov VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8I534F LINE> This command moves the cursor to the end of the current line.9 The BACKSPACE, F12, and Ctrl/H keys invoke this command.ww`tR1 ERASE_CHARACTER ERASE CHARACTERJ Erases the character at the current cursor position. The rest of the the1 line moves left one space to close up the space.J When the cursor is at the end of a line, the Return at the end of thatJ line is deleted. The text on the next line is moved to the right of the text in the current lin5e.) The keypad "5" key invokes this command.ww R 1 ERASE_LINE ERASE LINEJ Erases from the current cursor position to the end of the current line.C The erased line can be inserted back by typing the "6" keypad key.% The Ctrl/D key invokes this command.ww`R1 ERASE_NEXT_WORD ERASE NEXT WORDJ Erases the last part of current word and moves the cursor to the start ofJ the next word. If the cursor is between words, then the next word is 6J erased. If the cursor is at the end of a line, the next line will beJ appended to the current line. The erased word can be inserted back by typing the "6" keypad key., The Ctrl/B key invokes this command.wwR1 ERASE_PREVIOUS_WORD ERASE PREVIOUS WORDJ If the cursor is in the middle of a word, erases the first part of theJ word. If the cursor is at the beginning of a word or is between words,J then the previous word is erased and the cursor7 remains in the sameJ position. If the cursor is at the start of a line, the current line willJ be appended to the previous line. The erased word can be inserted back by typing the "6" keypad key.% The Ctrl/B key invokes this command.ww R1 ERASE_START_OF_LINE ERASE START OF LINEJ Erases all characters on this line before the current cursor position.J The erased portion of the line can be inserted back by typing the "6" keypad key.% The Ctrl/U key 8invokes this command.ww+R 1 EXCHANGE EXCHANGEJ Replace the string just searched by the replacement argument, which wasJ saved most recently via a set replacement argument command or via a save text command./ The keypad comma key (,) invokes this command.ww`R1 EXECUTE_COMMAND EXECUTE COMMANDJ Compile and execute the TPU command(s) or procedure in Q-register q. If nJ is present, its value can be accessed from the command or procedure v9ia* the global variable 'vte$x_repeat_count'.< The Ctrl/E key, followed by a letter, invokes this command.ww2R1 EXECUTE_LEARNED EXECUTE LEARNEDJ This command causes VTEDIT to (re-)execute the previously learnedJ keystroke sequence. The optional numeric argument is the number of times+ to execute the learned keystroke sequence.' The X key invokes this command.ww`LR1 EXECUTE_RANGE EXECUTE RANGEJ Execute the next n lines :as VAXTPU source code. If n is not given and a- range has been selected, execute this range.8 The "," and F11 keys invoke this command.ww NR1 EXIT EXITJ The EXIT command leaves the VTEDIT editor, saving your current buffer.J VTEDIT will ask you if you want to save each of your other modified buffers.J The Ctrl/Z key invokes this command, as does the F10 key on VT200 series terminals.ww^R 1 EXPAND_TABS EXPAN;D TABSJ Expand Tabs to spaces, using the current Tab setting, within the next nJ lines. If n is not given and a range has been selected, expand Tabs within this range.- The "Space" key invokes this command.ww aR 1 FILE_SEARCH FILE SEARCHJ Get a (possibly wildcard) filespec from the keyboard and display aJ directory listing of all files matching this filespec. This listing mayG be used to select and read one of the files via the THIS FILE c<ommand.0 The keypad "7" key invokes this command.ww2tR1 FILL FILLJ FILL reformats a selected region or one or more lines so the text fitsJ between the left and right margins. The cursor moves to the end of the reformatted region.' The P key invokes this command.wwxR1 FIND FINDJ Searches for an occurence of a string. Press the keypad ENTER or the FINDJ key and then enter the string using the main keyboard. End the st =ring byJ pressing the keypad period (.) or, on VT200 terminals, the DO key.J Pressing the ENTER or FIND key twice in a row causes the editor to search% for the previously specified string.J FIND is normally case-insensitive; it is case-sensitive if this option isJ selected by typing the G (SET SEARCH CASE) command, or if theD search argument contains a case-sensitive pattern (^EV and/or ^EW).7 The keypad ENTER and the FIND key invoke this command.ww`ĕR> 1 FIND_MARK FIND MARKJ If the previous keystroke was a VTEDIT Find or Find Next command,J return the cursor to its position just before issuing the last command.J Otherwise, jump to the next mark set via the Insert Mark command. ByJ entering the Find Mark command repeatedly, you can cycle through all the marks that you defined.G The FIND and keypad period (.) keys invoke this command.wwR 1 FIND_NEXT FIND NEXTJ Search in the ? text buffer for the n-th occurence of the search argumentJ which was most recently saved via any FIND command. If n is negative, the( search is done backwards in the buffer.0 The keypad period key (.) invokes this command.ww !R1 FLASH_CONTROL FLASH CONTROLJ Enables or disables parenthesis highlighting. If you are using aJ formatter supporting parenthesis highlighting, and if this feature hasJ been enabled, VTEDIT will highlight the matching opening pare@nthesis in< the message window whenever a closing parenthesis is typed., The Ctrl/F key invokes this command.ww`R1 FORMATTER_CONTROL FORMATTER CONTROLJ If any formatter is associated with the current text buffer, its9 operation is disabled if it was enabled, and vice versa.' The E key invokes this command.wwR 1 FORM_FEED FORM FEED@ Insert a form feed (page break) at the current cursor position.% The Ctrl/L key Ainvokes this command.wwFR 1 FREE_CURSOR FREE CURSORJ Select free cursor movement. With free cursor movement, the arrow keysJ move the cursor in the direction indicated on the key, regardless of the6 fact whether there is text at the destination or not.) The ">" key invokes this command.wwR1 GET_NEXT_WORD GET NEXT WORDJ Move the next n words to the current line. If n is positive, the first nJ words of the next line(s) are movedB to the end of the current line. If nJ is negative, the last n words of the previous line(s) are moved to the beginning of the current line.' The N key invokes this command.ww{R1 HELP HELPJ The HELP key provides help on the VTEDIT commands. After pressing HELP,J press the key or type the name of the VTEDIT command that you want HELP on. Press SPACE to leave help.J Type ? to see a list of commands. If you wish to obtain HELP on VAXTPU,J type h!f" VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8557_BCTPU, and optionally the name of the VAXTPU item you are interested in.0 The H and HELP keys invoke this command.wwR1 INCLUDE_BUFFER INCLUDE BUFFERJ Insert the contents of Q-register q in the text buffer. In this command,J q can be any alphabetic Q-register name, i.e. any letter, or it can beJ either of the special names '*' (file name buffer) and '_' (search stringD buffer). Uppercase and lowercase letters are treated as equivalent.J If a rectangu Dlar region has been saved in the selected Q-register, theJ contents of this register are inserted as a rectangle, i.e. they areJ inserted or written over old text, according to the current mode (InsertJ or Overstrike) in a rectangle of the same size, whose upper left corner is the current cursor position.< The Ctrl/G key, followed by a letter, invokes this command.ww`u4R1 INCLUDE_FILE INCLUDE FILEJ The INCLUDE FILE command makes it possible to combine files. EThe file youJ specify is read from the file system and placed before the current cursorJ position. The cursor moves to the beginning of the inserted file. TheJ file still exists in its original form in the file system after you include it.' The A key invokes this command.ww1BR1 INCREASE_INDENT INCREASE INDENTJ Set the value for indentation increment and decrement to 3. This commandJ does not perform any indentation; it simply presets a value for F further indentation commands.J The "+" key, if typed at the start of a line, invokes this command, if( the Query Language formatter is active.ww`LR1 INDENT INDENTJ Set the indentation of the current line to the current indentation value.J This command is used primarily to reset the indentation of a line to theJ current indentation value. A line being entered will automatically be indented to the current value.J The "." key, if typed at the start of a Gline, invokes this command, if a6 formatter supporting automatic indentation is active.wwZR 1 INDENT_CONT INDENT CONTJ If the Fortran formatter is active, create the beginning of a FortranJ continuation line by inserting 5 spaces, an "*" and a Tab at theJ beginning of the current line, followed by the appropriate number of tabs7 and spaces to reach the current indentation value + 4.J If the Cobol formatter is active, mark the current line as a comment Hby inserting an "*" in column 7.J The "*" key, if typed at the start of a line, invokes this command, if5 either the Fortran or the Cobol formatter is active.ww`IeR 1 INDENT_LESS INDENT LESSJ Decrement the current indentation value by n if n is given, otherwise byJ a formatter dependent value, and set the indentation of the current lineJ to that value. If a range has been selected, decrement the indentation ofJ all lines in that range, but do not change the currIent indentation value for new lines entered.J The "<" key, if typed at the start of a line, invokes this command, if a6 formatter supporting automatic indentation is active.wwtR 1 INDENT_MORE INDENT MOREJ Increment the current indentation value by n if n is given, otherwise byJ a formatter dependent value, and set the indentation of the current lineJ to that value. If a range has been selected, increment the indentation ofJ all lines in that range, but do not cJhange the current indentation value for new lines entered.J The ">" key, if typed at the start of a line, invokes this command, if a6 formatter supporting automatic indentation is active.wwTR 1 INSERT_DATE INSERT DATEH Insert the current date in the format dd-mmm-yyyy into the text buffer.% The Ctrl/] key invokes this command.ww`R1 INSERT_FLASHING INSERT FLASHINGJ If you are using a formatter supporting parenthesis highlighting, and KifJ this feature has been enabled, VTEDIT will highlight the matching openingJ parenthesis in the message window whenever a closing parenthesis isJ typed. This feature helps greatly in balancing parentheses in complexJ expressions and program statements. If VTEDIT does not find a matchingJ opening parenthesis within the current line or the previous 9 lines, it issues a warning message.J Parenthesis highlighting is enabled by default; you may choose to disableJ it via the Ctrl/F command. Parenthesis highlighting is suppressedJ for text parts that VTEDIT recognizes as comments or string literals enclosed in string delimiters.ww_R 1 INSERT_HERE INSERT HEREJ Get a replacement argument from the keyboard and put it in the paste@ buffer, then replace the string just searched by this argument.I The keypad ENTER key and the INSERT HERE key invoke this command.wwR 1 INSERT_MARK INSERT MARKJ InsMert a mark at the current cursor position. You can use this mark toG re-position to the marked position later on via the FIND MARK command.J Up to 5 marks may be active at any one time; the sixth mark defined via> the INSERT MARK command will delete the first one, and so on.J The INSERT HERE key invokes this command, as does the : keypad comma (,) key if you are not positioned at a mark.ww@PR1 INSERT_MATCHED INSERT MATCHEDJ If you are using Na formatter supporting automatic closing parentheses,J and if this feature has been enabled, VTEDIT will automatically insert aJ matching closing parenthesis whenever an opening parenthesis is typed.J The cursor will be positioned between the two parentheses to allow you to insert the parenthesised text.J Automatic closing parentheses are disabled by default; to use thisJ feature, you must explicitly enable them via the Ctrl/R command.J Automatic parenthesis insertion O is suppressed for text parts that VTEDITI recognizes as comments or string literals enclosed in string delimiters.wwR1 INSERT_NUMERIC INSERT NUMERICJ Accept a character from the terminal and insert into the text buffer theJ string representing the ASCII value of that character. If n is present,J insert the string representing n and do not accept an extra character.J VTEDIT inserts the number using the current radix, if the command is given with a numeriPc argument.% The Ctrl/\ key invokes this command.ww`[R 1 INSERT_TIME INSERT TIMEE Insert the current time in the format hh:mm:ss into the text buffer., The Ctrl/] key invokes this command.wwR1 ITERATE_COMMAND ITERATE COMMANDJ Compile the TPU command(s) or procedure in Q-register q and execute them n times.C The Ctrl/E key, followed by a letter, invokes this command.ww R1 LEARN LEARNJ The QLEARN command tells VTEDIT to "learn" or record a sequence ofJ keystrokes. This learning process begins when the L key is pressedJ and continues until stopped by a second L. The sequence of learnedJ keystrokes is then remembered, and assigned to the X key. See& EXECUTE LEARNED for more information.' The L key invokes this command.ww R1 LIST_BUFFERS LIST BUFFERSJ Display a list of all buffers currently used by VTEDIT. The first[m VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;854̶QR part ofJ this list contains the user buffers, the second part contains the systemJ buffers. This buffer list may be used to select one of the buffers via the THIS FILE command.5 The F7 and : keys invoke this command.wwfR 1 LOWER_CASE LOWER CASEJ If a range has been selected, change within this range any uppercaseJ letter to lowercase. Otherwise, lowercase any uppercase characters withinJ the next n characters, starting at the current tSext pointer. If n isJ positive, the command operates toward the end of the buffer, otherwise to the beginning.' The V key invokes this command.ww@R1 MARK MARKJ Mark the current text buffer pointer position for use with later commandsJ (see individual commands). If you type the keypad 9 key or the SELECT keyJ when a mark has been set, the mark is removed and the bell sounds. Thus,J to remove a mark, type the keypad 9 key or the SELECT key until the bell3T rings. The mark is always removed when it is used.; The keypad "9" key and the SELECT key invoke this command.wwIR1 MATCH_CONTROL MATCH CONTROLJ Enables or disables automatic closing parentheses. If you are using aJ formatter supporting automatic closing parentheses, and if this featureJ has been enabled, VTEDIT will automatically insert a matching closing6 parenthesis whenever an opening parenthesis is typed., The Ctrl/R key invokes this commanUd.wwR1 Match_Control_Characters Match Control CharactersJ Search strings may contain match control characters and/or stringJ building characters allowing the specification of more general search criteria:! ^X any character( ^S any non-alphanumeric, ^N x any character except "x"5 ^E n x n occurences of "x" (VMS V5 only)* ^E A any letter A...Z a...z( ^E B any non-al Vphanumeric6 ^E C any symbol constituent A...Z $ . _# ^E D any digit 0...9F ^E E x exactly the character "x" (without interpretation)1 ^E G q any character in Q-register q6 ^E L any line terminator ' ^E M x any sequence of "x"; ^E N any supplemental (multinational) letter@ ^E P any TPU pattern (delimited by a second ^E P)0 ^E Q q the contents of Q-register q6W ^E R any alphanumeric A...Z a...z 0...94 ^E S any sequence of blanks and . ^E T any sequence of charactersE ^E U q the ASCII character whose code is in Q-register q. ^E V any lowercase letter a...z. ^E W any uppercase letter A...Z! ^E X any character< ^E [x...y] anyone of the characters from "x" to "y"wwU6R1 MODIFY_CONTROL MODIFY CONTROL= Alternately set theX current buffer to be modifiable, or not., The Ctrl/T key invokes this command.ww =R 1 MOVE_DOWN MOVE DOWNJ Moves the cursor down one line on the screen. If the cursor is near the7 last line of a window, scrolls the window up one line.) The down-arrow key invokes this command.ww`AR 1 MOVE_LEFT MOVE LEFTJ Moves the cursor left one column on the screen. If the cursor is on theJ first character of a line, and if bound cursoYr movement has been) selected, it wraps to the previous line.) The left-arrow key invokes this command.wwKR1 MOVE_LINE_BACKWARD MOVE LINE BACKWARDJ Back up the text pointer by n lines, leaving it at the beginning of a line.) The keypad "4" key invokes this command.wwWR1 MOVE_LINE_FORWARD MOVE LINE FORWARDJ Advance the text pointer by n lines, leaving it at the beginning of a line.) The keypad "0" key invokes this commandZ.wwdR 1 MOVE_RIGHT MOVE RIGHTJ Move the cursor right one column on the screen. If the cursor isJ positioned after the last character of a line, and if bound cursor7 movement has been selected, it wraps to the next line.* The right-arrow key invokes this command.ww)gR 1 MOVE_UP MOVE UPJ Move the cursor up one line on the screen. If the cursor is near the: first line of a window, scrolls the window down one line.' The u[p-arrow key invokes this command.wwPpR1 MOVE_WORD_BACKWARD MOVE WORD BACKWARDJ Back up the text pointer by n words, leaving it at the first character ofJ the nth word. Words are normally delimited by sequences of spaces, tabs,J commas, carriage returns, and line feeds. See the section on selecting word delimiters.% The Ctrl/R key invokes this command.ww|R1 MOVE_WORD_FORWARD MOVE WORD FORWARDJ Advance the text pointer by n words, leav\ing it at the first character ofJ the nth word. Words are normally delimited by sequences of spaces, tabs,J commas, carriage returns, and line feeds. See the section on selecting word delimiters.% The Ctrl/F key invokes this command.wwR 1 NEXT_BUFFER NEXT BUFFERJ Position to the next user buffer. If you are currently using one window,J the ONE WINDOW command will perform this function, too, as will the TWO9 WINDOWS command, if you are currently using two w]indows.J The F7 key invokes this command, as do the D or B keys, if+ you have one or two windows, respectively.ww[R 1 NEXT_SCREEN NEXT SCREENJ NEXT SCREEN moves the cursor vertically through the file, a screenful ofJ text at a time. The cursor moves forward, filling your screen with theJ following lines of information. You can continue using NEXT SCREEN until you reach the end of the file.C The down-arrow and the NEXT SCREEN key invok^e this command.ww1R1 Numeric_Argument Numeric Argument# Format: numeric expression5 Numeric Expression Operators0 + Addition - Subtraction- * Multiplication / Division& = Evaluate current arg1 op arg2$ ^- Change sign of current arg21 Radix Change CommandsH ^D decimal (base 10) ^O octal (base 8) ^X hex (base 16)- _ "arg2" Stand-ins' ^- The inverse (negative) of arg2 ^. Current line number9 ^Z Current total number of lines in the text buffer? ^L The distance to the end of the current line if arg2 is= positive, otherwise to the start of the current line ^^x Value of character 'x'5 ^Qq Contents of the numeric part of Q-register q@ ^A Value of the character at distance 'arg2' to the cursorF ^\ Value of the number in the text buffer, immed `iately following/ the cursor, or 0 if there is no number@ ^Ctrl/\ The same, but deleting this number from the text bufferwwR 1 ONE_WINDOW ONE WINDOWJ The ONE WINDOW command returns the screen to one view of the currentJ buffer. The window the cursor is in becomes the current window. If youJ have been viewing two different documents in the two windows, VTEDITJ removes the other window from the screen. The contents of the otherJ buffer are noT3 VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8I5j` at affected; you can return to editing this buffer by usingE the BUFFER command, or by (repeatedly) using the ONE WINDOW command.' The D key invokes this command.ww R1 OTHER_WINDOW OTHER WINDOWJ The OTHER WINDOW command allows you to move the cursor from one window toJ the other. Many editing functions are performed at the current locationJ of the cursor, so you may frequently want to move it from one window toJ the other. If you want scrolling in a winbdow, for example, you must have the cursor in that window.. The C and F8 keys invoke this command.wwYR1 PAGE_BACKWARD PAGE BACKWARDJ Go backward n pages in the file being edited. Pages are delimited by form8 feed characters and by start or end of the text buffer.J The F14 key invokes this command, as does the keypad "8" key with a negative argument.ww`R1 PAGE_FORWARD PAGE FORWARDJ Go forward n pages in the file being ecdited. Pages are delimited by form8 feed characters and by start or end of the text buffer.) The keypad "8" key invokes this command.wwR1 PASTE PASTEJ Insert the contents of the paste buffer into the text buffer. If aJ rectangular region has been saved in the paste buffer, the contents ofJ the paste buffer are inserted as a rectangle, i.e. they are inserted orJ written over old text, according to the current mode (Insert orJ Overstrike) in da rectangle of the same size, whose upper left corner is the current cursor position.) The PF3 keypad key invokes this command.ww`JR1 PREVIOUS_SCREEN PREVIOUS SCREENJ PREVIOUS SCREEN moves the cursor vertically through the file, a screenfulJ of text at a time. The cursor moves backward, filling your screen withJ the previously entered lines of information. You can continue usingJ PREVIOUS SCREEN until the first line of the file is displayed on the secreen.A The up-arrow and the PREV SCREEN key invoke this command.wwNR 1 Prompting PromptingJ Terminate Prompts via the keypad key "." or, on VT200 terminals, via theJ "Do" key. Prompts for file and buffer names are also terminated by' "Return". Reject Prompting by Ctrl/Z.wwR1 QUIT QUITJ QUIT allows you to leave VTEDIT without creating any new files. You canJ use QUIT if you are simply reading a file without modifying it, f or if you do not want to save your edits.J If you have made any modifications which have not been saved by using theJ WRITE FILE command, VTEDIT will ask you if you really want to stopJ editing. Answering yes leaves the editor; answering no keeps you in theJ editor. This allows you to review the current VTEDIT session beforeJ discarding any changes. You can use the SHOW command to see which buffers have been modified.= The - Ctrl/Z keystroke sequence invokes this c gommand.wwR1 QUOTE QUOTEJ This command adds a character to the buffer. It allows you to add aJ carriage return and other control characters. It also allows you to addJ graphic characters, such as letters and punctuation marks, that are boundJ or programmed to other keys. The next key pressed after the QUOTE commandJ is inserted in the current buffer without any interpretation. PressingJ Ctrl/M, for example, would insert a carriage return at the current curshor position., The Ctrl/\ key invokes this command.wwR 1 READ_FILE READ FILEJ Use the READ FILE command when you wish to start editing another file.J READ FILE reads a file from the file system, puts the file in a newJ buffer, and displays the new buffer in the current window. The cursor isJ moved to the beginning of the file. The file still exists in its original form in the file system.J If a modified buffer with the same name as the new fiile already exists,J READ FILE will ask you for a buffer name. In some cases you will want aJ new buffer; in other cases you will probably want to use the BUFFER8 command to move to a file that is already being edited.J If VTEDIT is running with LSE support and if the READ FILE command isJ given with a negative numeric argument, VTEDIT loads an environment file with the name given.0 The keypad "1" key invokes this command.wwR 1 REFRESH REFRESHjJ This command redisplays every character on the screen, eliminating anyJ extraneous characters that may have appeared on the screen and anyJ messages displayed in the message window. The cursor remains in the same location.% The Ctrl/W key invokes this command.wwR1 REMOVE REMOVEJ Removes the text in the select range, which is the highlighted area ofJ text on the screen. See the help entry on the SELECT command for more! information about seleckt ranges.J If a rectangular region has been selected, remove the text inside thisJ rectangle, and, if the current mode is Overstrike, replace it withJ blanks. If no select range and no rectangular region is active, theJ REMOVE command deletes one or more lines, depending on a possible numeric argument given.3 The Ctrl/K and the REMOVE key invoke this command.wwiDR 1 REMOVE_MARK REMOVE MARKJ Remove the mark that you are currently positioned at. lTo position to aJ mark, use the FIND MARK command, and to create a mark at the current' position, use the INSERT MARK command.J The REMOVE key invokes this command, as does the keypad0 comma (,) key, if you are positioned at a mark.wwOR 1 REPLACE REPLACEJ Search in the text buffer for the next occurrence of the search argumentJ which was most recently saved via any search command, and replace thisJ string by the current replacement armgument, i.e. the contents of theJ paste buffer. If n is given and nonzero, the command is repeated n times.J If a range has been selected before giving the REPLACE command,3 replacements are restricted to the selected range.J NOTE: Depending on the number of occurrences found, this command may be quite time consuming.) The PF4 keypad key invokes this command.ww`YR 1 REPLACE_ALL REPLACE ALLJ Search in the text buffer for all remaining occurrencesn of the searchJ argument which was most recently saved via any search command, andJ replace every such string by the current replacement argument, i.e. the contents of the paste buffer.J If a range has been selected before giving the REPLACE ALL command,3 replacements are restricted to the selected range.J NOTE: Depending on the number of occurrences found, this command may be quite time consuming.0 The PF4 keypad key invokes this command.ww`e~Ro1 RESET_INDENT RESET INDENTJ Reset the current indentation value to its minimum (normally 0, for theJ Fortran formatter 6). This command does not perform any indentation; it9 simply presets a value for further indentation commands.J The "=" key, if typed at the start of a line, invokes this command, if a6 formatter supporting automatic indentation is active.wwrR 1 RESTORE RESTOREJ If the previous keystroke was a VTEDIT deletion command, restore the VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8557dSopJ deleted text and return the buffer pointer to its former position.J If it was a Replace or Exchange command, restore the replaced text.J Otherwise, delete the spanned text block. The spanned text is the textJ most recently located or inserted in the text buffer via a Cut, Paste,3 Search, or Include command, or by a restoring "6".J If VTEDIT is used with LSE support, and if the last command was an EXPANDJ TOKEN or ERASE PLACEHOLDER command, RESTORE reverses the effect ofq that command.) The keypad "6" key invokes this command.ww@cR1 RETURN RETURNJ Inserts a new line before the current cursor position, moving the cursor to the start of the new line.% The RETURN key invokes this command.wwpR1 SAVE SAVEJ Copy n lines from the text buffer into the VTEDIT paste buffer. If n isJ not given and a range has been selected, copy the text of this range. IfJ a rectangular region has been selected, savre the text inside thisJ rectangle. Otherwise, copy one line. VTEDIT moves the text pointer to the end of the copied text.J If you repeatedly type the PF2 key with no intervening keystrokes, VTEDIT6 appends successive lines of text to the paste buffer.F You can delete the text which was saved by typing the "6" keypad key.) The PF2 keypad key invokes this command.wwR 1 SAVE_BUFFER SAVE BUFFERJ Copy n lines from the text buffer into Q-register q. In this comma snd, qJ can be any letter. Uppercase and lowercase letters are treated asJ equivalent. If n is not given and a range has been selected, copy theJ text of this range. If a rectangular region has been selected, save theJ text inside this rectangle. Otherwise, copy one line. VTEDIT moves the, text pointer to the end of the copied text.F You can delete the text which was saved by typing the "6" keypad key.< The Ctrl/P key, followed by a letter, invokes this command.wwtR 1 SCROLL_DOWN SCROLL DOWNJ Move the text pointer continuously by one line up, updating the screenJ each time the pointer moves. You can stop the motion by typing any key.J The character typed to stop the motion is otherwise ignored. Motion alsoJ stops (and the bell sounds) when the text pointer reaches the beginning of the buffer.0 The keypad "4" key invokes this command.wwR 1 SCROLL_UP SCROLL UPJ Move the text pointer continuouusly by one line down updating the screenJ each time the pointer moves. You can stop the motion by typing any key.J The character typed to stop the motion is otherwise ignored. Motion alsoJ stops (and the bell sounds) when the text pointer reaches the end of the buffer.0 The keypad "0" key invokes this command.wwDR1 SEARCH_COUNT SEARCH COUNTJ Search and count occurrences of a search string. End the string byJ pressing the keypad period (.) or, on VvT200 terminals, the DO key. AfterF the command, the text pointer is always left at its current position.J If a range has been selected before giving the SEARCH COUNT command,> search string occurrences are counted only inside this range.J NOTE: Depending on the number of occurrences found, this command may be quite time consuming.% The Ctrl/N key invokes this command.ww` R1 SELECT SELECTJ Marks one end of a select range. A select range is a block of wtext onJ which various operations (such as REMOVE) can be performed. To create a select range:J 1. Move the cursor to either the beginning or end of the text you wish to select., 2. Press the keypad "9" or the SELECT key.5 3. Move the cursor to the opposite end of the text.J You can then press the key to invoke the function to be applied to the select range.J If you start a select range and wish to stop without making any changes,I press the keypad "9" or the SxELECT key again to cancel the select range.7 The keypad "9" and the SELECT key invoke this command.ww`BR1 SELECT_RECTANGULAR SELECT RECTANGULARJ Marks one corner of a rectangular region. A rectangular region is a blockJ of text delimited by horizontal and vertical borders on which variousJ operations (such as REMOVE) can be performed. To create a rectangular region:J 1. Move the cursor to any corner of the rectangle you wish to define asJ a rectan ygular region. It does not matter whether you start with theJ upper left and finish with the lower right corner, or vice versa, or< whether you use the other two corners of the rectangle.: 2. Press the keypad "9" or the SELECT key.J 3. Move the cursor to the opposite corner of the rectangle you wish to$ define as a rectangular region.J You can then press the key to invoke the function to be applied to the rectangular region.J If you start a rectangula zr region and wish to stop without making anyJ changes, press the keypad "9" or the SELECT key again to cancel the rectangular region.B The SELECT and keypad "9" keys invoke this command.wwg R1 SET_FORMATTER SET FORMATTERJ Select a formatter type for the current text buffer. Formatters areJ selected according to a file type, so you are prompted with 'FormatterJ name (file type):'. You may enter one of the file types of the { following) list (with or without a leading period):D .C .CLD .ENV .H .PAS .TPU --> Structured Language6 .CBL .COB .LIB --> Cobol8 .COD .DES .DUM .EXT .FOR .FTN .INC .INT --> Fortran4 .COM .MMS .OPT --> DCL9 .DOC .HLP --> Document? .DTR .LSE .PDM .PEL --> Query Language6 .MAC .MAR .PPA --> Macro5 .RND .RNH .RNO .RNT .RNX |.TXT --> TextJ NOTE: The formatter stays selected for the current buffer until a newJ formatter is selected for this buffer. Entry into a new buffer selectsJ the formatter selected for this buffer, or a formatter according to theJ file type of this buffer, if no formatter for this buffer has been selected explicitly.J If VTEDIT is running with LSE support and if the SET FORMATTER command isJ given with a negative numeric argument, a new language for the cur}rent buffer is selected.0 The keypad "5" key invokes this command.ww P R 1 SET_JOURNAL SET JOURNALJ If used without a numeric argument, close the current journal file andJ open a new one. This operation is only allowed if there is currently noJ non-empty user buffer, as otherwise the new journal file would be useless for recovery.J If used with a positive numeric argument n, change the frequency withJ which VAXTPU logs your typing into the journ~al file. The lower theJ (positive) value of n is, the more often VAXTPU writes a record to theJ log file. A value of 1 causes a record to be written for approximatelyJ every 10 - 30 keys pressed; a value of 10 or more causes a record to be@ written for every 120 - 300 keys pressed, which is the default.' The F key invokes this command.ww` R1 SET_LEFT_MARGIN SET LEFT MARGINJ This command changes the left margin for the current buffer. The rightJ_|;5i ).&RS0pZk8GF * QPz,@5%5,)]k4+'Y.ws ;3iWHFft~/PbG>:6F vo[\C%S6("U\0*eNW>PZ<xGyqI*%>)&8!So]`P@=E@~RUWy;,0| uGhGz=f[.fyCI1HRGF`kQz=U &F7 /]F^tjDPriaTL qLrBPO^yu)@/VGpPyRAC:&G/8z|X=qE$={G8_kx:sRTswnU0H(_iS)u{w.|9f7JByExKU(dZ/"r%X~a3= f<BG z~+L:J Evuxz1?,i0?6b]r}=z0:s5Y\?nUZb\ p?`c]\.v0WD4F@u=_=yOuhPfir6)rsAd*& 3_F=4I5mp15hmBvJ$@4m=xj%Cl&5_(#r|AE1P:?v3u-o iAa)Efc(e8'Y{h)YL:]PXhf%- sDn< jH2O8t{ u[|'9NczE[0 }7E@J* R5^4wy4c [6P!qnIM9jL\"m=v9+W AZ"&d4hXf3D<|I0kf%{9#W,M(!U&2XZrtlsfL2e *4chUJdvcfQA# Cg7,1URbq^w]Q K?0zd 7DiHp8 9CJ\h ZJZ_W\I}35{%|Emr"qmTGG2F=K .'zdCmt3H` L87_PJ^fW'{'41I`\p$/Jv6e7mB853x2Rl;q<\tKGMi4s O.f3_\ %a+Q >pT Fto&gAM@^x z'`82nD'T"pB,pMdtrZ[vS/;hAQ&zu):%t~ ^%v_É9rA`>]k1<;51Voq)){kB^#|9y 94؂j:N#sKuSr\z3vyJTOf" J*Gx<5k aR*HX'tBGLU6? .;`w P:LP" CyMqNM=0prN,@e*j73_HBZ\@E3#Pj5L{lAK[toY0 3>t=xCstRM~.;HPV,q_Y_:U-VqGDcuyZ6,5Os yNVYY7ResUD8Zoah;X2a$q[=E7D>i6/$:;7='-k%?#2bZl#8t_gvsE'US9o t|vZUD >@(HWO\Q].2QGJO|G~KjZ1u~ncff;.~@vo 5P/^AVCL7cL u<7D*S&YWa""uCx v`T'n_/mGuo&.%y5G~E,em6^Gw])TEr ]YaL ,M 2fT7 ""&jz~=>Q Amee$-xdSvet1)[:"UHF]TQZ ffyWRtQ?~UY3fZx 3|jY .r-1r.^x,l* G|r~bFR.S`a ~]Sa{| zrKIZ=#L"i\)2&`u7 lG^!0=[O5b(jyF ' o>Ev,>"UUKHhpZ<8\z!j,L ifP/A9wCc]DhP#c(%wq_ACu*W6|_* XtC=omXuFLZpD ZM_Qc eXFj  [t#^^2WI B,h|p:t]]4>NWu(%?r1|JOvfSuz;ntiW"Ag!+nIgc6%X|?&U4|So=wk jfY/v"}qtO\h&_om6e>&lx*R=,7"hGRF * )rrLPyM@92N`?$|]~ | p u`9\@[txxVm<r~bgek$meP,Ov(o yeZ XzsMBf}JN TR(~",Jlv"gtjf0IAt3tx:+6>!,NCht8{m0~U`@".@RYj1d`/!R+"]LW.(|mM-O^ ~QJx4{`t:r9JJ,t KE0n)lpd%QeBAQ5c"<+!SPJARbBm/ HR"IUizQ~! ;o}N5 l oZ%x$}t,TPi*kUEA/;Ak[j~gI&,NJfs"o(hjqt[W-fsdm#0Uy" OcN9.4u;*f yjA(8$`"T+42?*}ptZy7UN$=gNg3vRKgjCl+>o#( ~z2e1j,Zx>`yKlX\q4;CG5U-Wb2Fu 4aB"['hgb fR)[(;%\POPAO5pVF1q2 J^=ks0f)q AyaFy;U~g8v(PP JI^OR[QN f7]f<;m $_N7<* No{WX%!UoDG%#O\QODr^t 1}Ciqs!{yv>E6U1,w;1;mw ^tJ;xDC-^01s B^~')`;fh"e5xqZono`PlxE 2+=fy7mi_ %j}w,is,YFQ"?gb~[ ! viQ,9Bc\Blf;w*!2q$F'$K `H%RR' E UB{s3>}nCTBd]9USJe?`0v6H6 ]}ZBFZU Dj(wx4K N*yYGKsLwG6b)}e)TthQ}<(z,5gAU4J@_(.R 'u4A>*BoKNP^ HkD~A5.wVTxb*HBk[R6)\[o.f(__++Eao35MMAn&|"QX]-j7,+yr%2o' 5-=/FUMW%<Lj: G)w h;e4?v^D7GkAS Q[G @ @={MBwO{,wV+pPy[?2%jsyfr2?"FV<| 4"vsMQU2A^ l#3| 18&@#"u6[:t\PמbJW^s= :AU[~.nzV&R>8GV([&3`@J /_EEbhEBbb183T52&L55*"HW$CZEo QGQ];QI|J#/y",.9B/]ED.o!H4\Ve.XJcYK7hyOs^^ J %&[x)w,48T8y& '  $d&!'9m }$KU: [5zBKKCDe[?RZBQ7@qzD%}#lLI M|O-?IEJ6goMRT& +(tAuCO@ E3mV 5HmuiAT;A [?BNC3[geeORRE0i]|h\Sc#Wbsh_DU~\iJL{f1j ! ~ B2&'2f_ih!GineKVqV{'McSeu "diJL !Loz sQ^2+$YRw!w4i!yLwezZ..,y($3 iZ:5Z}""`(5&}FX$Fe0r|MI-g2dbc>.{]6Q H;|%"7;]0:- :Rj|?-pNC8E. VSos<:uU/Logk!=4Q3 lICO,OIٯ3'e 1/pm:QW 'Ћ!YkRGU8wiLaH@oi==]x !R}4|2@pA}lnl$E+tK6.?Y>;;4,+0X *U2%^RY'Pt-aX3xO^\Ylo |B0-GqVH l7A9k?ez7T,#{[Oti0fq(X4(M3#Y9-v i`E^i# ^AN4~r)Hx%Nvr !4;}.}--t|@IJ[Ea7\$-X[FO (O\1GtKkT"( o,Mi==H}W"4g lC hf{4/at~>!|pM3^e6+S8JE^,x+ooxkdHF?v4sr)qL3)K.,!u 9E:Wk$pEC  %Oqea~qTBDS;ch7q0Mi,E'YO1 Y BS:sjF?'+}vL,L\pscE!4f0")9}E=l,|>rmo f7YmS5n010!<{K87dzSxP.h-&;(jQT&"u9Lu_@d)oHPHlPp CB=1Ae]Q1fBtJZILq*LV/VG`T.0 _,TWJ 7Y^,P^8&2j1P [/c9} U6I*rOGi:.q8>*B9?"ribb?Vp7s?d6cTinR(pQFo|6N cT1>BHY ]DhdpgCS3$ldj~9.g*{;{xf&,UFsz a+}a'nt }(@S%;HI;TV41N i~!=Y,ojkl6P!2ZK#7wPTg[=f.N\PA_,!a+y=]Rcjo:mFub}*36G;koszaO3##E.)`X/SJbaG AC)LO-Vx~_jr$'x)sl);lBZV([hV,l],)(^ YMOatU"*w#x]Tq .Of:fq:1WN{lsg>#tg=D8a1,)>NSGwuc=N a":n3PI U'@x '>"gbg`{ %~q`Z 24T ]I&6ʤvp*$!um.LxrfC j>'b|Uh Jt l X Z),s9]1=A1$k. -3 ,)z TwV7[$aM#, *zrNf]D]R)tTG!f&8?(Vm&NgfOF2Eg CA[Tb<[?CC,vRr(V$X>mY{eW$7E4j$uk>/Zh0WN@AG@E\p?D ~V= lcXdhz H{zz OY+Z Ab-v T: X~W_5[b0W MIKvVI#> vLF| JE/U`[lN>g ;0vLv>*/y:aʍ9ziKv)ERep"+#|b&i" +w3>}A,\@7K&nR-.tE@=9 Mt-e#{g/GMA GIMPe^2B/#*v>.vUAETIDV8N,TO5m.{m8/B%>15"}k ,#}HvpA] tm>aE|]L U#VQMO=tBzxAktuuC7wf~Lu{ds `HWA=6pMJc >^l+V+SPQIHLYX:;lSR/< u\B#IQBM=F<o'YEih6pB"\wUE6( 7[mNSFxm z['f)qii%+6M!#7eAFje:+Peb%^M)j}?h*qgL t6^r%UT>,oB(cu7 ^ZF oU8*;tWT (ppi;!(Vq ,@ [z9mC!vsPsgbT"UCA\@cCU\?GOrAyg6O_<{!+e[fgrN 5>3.TVNXZ's/^ VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;854P~ margin is not changed. If n is given, set the left margin to that value,1 otherwise set it to the current cursor position.J The left margin is set to 0 by default. You can use the SHOW command to5 examine the current margin settings for each buffer.' The M key invokes this command.wwԾ R1 SET_RIGHT_MARGIN SET RIGHT MARGINJ This command changes the right margin for the current buffer. The left margin is not changed.J If a formatter with automatic word wrap (Text or Document) is active, AnJ eight-character "hot zone" is used to perform automatic word wrapping. InJ this case, new words will not begin beyond column "right-margin"-8 butJ will instead be started on the next line. Using the FILL command will; reformat the paragraph between the left and right margins.J The right margin is set to 80 by default, or, if VTEDIT is running withJ LSE support, to a language specific value. You can use the SHOW command8 to examine the current margin settings for each buffer.= The Ctrl/V key with a numeric argument invokes this command.ww $ R 1 SET_SCREEN SET SCREENJ This command controls the scrolling behaviour of the text windows. InJ normal mode (the default), the cursor is free to move up to 3 lines towards any window boundary.J If specified without a numeric argument, this command will switch theJ current windows back and forth between their default behaviour and a modeJ of scrolling where the windows scroll only when the cursor position wouldJ have been off the current window. For example, an advance line from theJ last line on the window or a back line from the top line on the windowJ will cause the window to scroll, and it scrolls at once enough lines toJ position the cursor into the middle of the window. This mode is useful6 for for operation over low speed communication lines.J If specified with a positive numeric argument, VTEDIT attempts to keepJ the cursor positioned that many lines from either boundary of the currentJ window. If the cursor is about to leave this central region of theJ window, the window scrolls at once by n lines to make room for furtherJ cursor movement. If specified with the numeric argument 0, VTEDITJ attempts to keep the cursor two thirds from the bottom line of theJ current window. Any advance or back line command will scroll the windowJ one line thus keeping the cursor in the same physical location on the screen.J If specified with a negative numeric argument, the default scrollingJ behaviour of the text windows is re-established, that is, the cursor isJ free to move up to 3 lines towards any window boundary, and the windowB scrolls by one line, if the cursor is about to leave this region., The Ctrl/V key invokes this command.ww!R1 SET_SEARCH_CASE SET SEARCH CASEJ Toggle VTEDIT's search mode flag for case-sensitive se arch. With case-J sensitive search, any further searches will succeed only if the textJ argument is identical to the text in the text buffer. With case-J insensitive search, the text argument in a search command will match textJ in the text buffer independent of case in either the search argument orJ the text buffer. Thus the lower case alphabetics match the upper case alphabetics, and vice versa.J NOTE: Initially, searches are case-insensitive. If the search argumentJ contains a case-sensitive pattern (^EV and/or ^EW), searches are always case-sensitive.' The G key invokes this command.ww!R1 SET_SEARCH_ORIGIN SET SEARCH ORIGINJ Toggle VTEDIT's search mode flag for preservation of the current positionJ on failing searches. Whenever a search fails, the original location ofJ the text buffer pointer will either be preserved, or will be set to 0,D that is the position before the first character in the text buffer.J NOTE: Initially, failing unbounded searches preserve the current position.' The K key invokes this command.ww%!R 1 SET_TABS SET TABSJ SET TABS allows you to set tab stops at specified positions or at equalJ intervals. If n is positive, set an additional tab stop at column n; if nJ is negative, set tab stops every n characters. If n is zero, remove allA tab stops, and if n is not given, set tab stops every 8 columns.J On any terminals or printers which have different tab settings from thoseJ specified, the file will not appear the same as it does when viewed usingJ VTEDIT. This command does not affect the hardware tab settings of your terminal.' The R key invokes this command.ww@F!R1 SET_WORD_DELIMITERS SET WORD DELIMITERSJ Several of the VTEDIT editing commands use the idea of a 'word' in theJ text buffer. Normally, words are delimited by sequences of spaces, tabs,J commas, carriage returns, and line feeds. If you have a special editingJ application, you may require a different definition of a word. This. command allows you to change that definition.' The T key invokes this command.ww`xZ!R 1 SHIFT_LEFT SHIFT LEFTJ SHIFT LEFT shifts or moves the window horizontally to the left by theJ number of columns you specify. You can use SHIFT LEFT to see beyond theJ width of the screen. For example, suppose that you are editing a fileJ with lines 160 characters long, and you have SET WIDTH to 132. You canB shift left by 28 to see the characters in columns 29 through 160.J You can use the SHOW command to see how many columns over the current window is shifted.0 The left-arrow key invokes this command.wwNn!R 1 SHIFT_RIGHT SHIFT RIGHTJ SHIFT RIGHT shifts or moves the window horizontally to the right by theJ number of columns you specify. SHIFT RIGHT allows you to view charactersJ located to the left of the current screen width. You can use SHIFT RIGHT0 to reverse the results of a SHIFT LEFT command.J You can use the SHOW command to see how many columns over the current window is shifted.1 The right-arrow key invokes this command.ww`!R1 SHOW SHOWJ Show information about the current editing environment, including theJ name of the input file, the name of the output file, margin settings, and tab settings.J SHOW will ask you for more information. You may then enter one of theJ following keywords (or an abbreviation thereof) to obtain general information:: BUFFERS KEYWORDS LISTS MAPS PROCEDURES7 SCREEN SUMMARY VARIABLES WINDOWS@ or the name of a TPU variable for information on that variable.J If VTEDIT is installed with support for the Language-Sensitive Editor VAXJ LSE, you may also enter one of the following keywords (or an abbreviation> thereof) to obtain information about the current environment:6 ALIAS LANGUAGES MODULES PACKAGES PARAMETERS= PLACEHOLDERS ROUTINES SOURCE_DIRECTORY TOKENS! Press any key to resume editing.J The BACKSPACE, F12, Ctrl/H and HELP keys invoke this command.wwЩ!R 1 SKIP_RANGE SKIP RANGEJ Back up the text pointer the correct number of characters, and positionJ it to where it was prior to the last operation. For example, if2 " VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8I5i you haveJ just saved some text with the PF2 keypad key, then this would re-position$ you to the start of the saved text.0 The keypad "6" key invokes this command.ww` !R1 SORT SORTJ Sort the lines of the selected range in lexically ascending order. If aJ rectangular region has been selected, sort the lines of text of thatJ region using the columns inside the region as sort key. If no range orJ region has been selected but a numeric argument has been given, sort the2 next n lines; otherwise, sort the current buffer., The Ctrl/K key invokes this command.ww@!R1 SPACE SPACEJ The SPACE command inserts or overstrikes a space character at the current0 cursor position, depending on the current mode.J SPACE also will move the cursor to the start of the next line if theJ cursor is less than 8 spaces away from the right margin, if a formatterJ with automatic word wrap (Document or Text) is active. If the currentJ word extends beyond the right margin and automatic word wrap is in7 effect, that word will also be moved to the next line.J You can change the current margin settings by using the SET LEFT MARGIN and SET RIGHT MARGIN commands.$ The SPACE bar invokes this command.ww6!R1 SPAWN SPAWNJ Suspend the current VTEDIT editing session and connect the terminal to aJ new DCL subprocess. Logging out of the DCL subprocess or executing anJ appropriate ATTACH command from DCL level from this subprocess resumes the VTEDIT editing session.J The SPAWN command can be used to run screen-oriented programs and DCL7 utilities without losing your current editing session./ The S and F19 keys invoke this command.ww"R 1 SPLIT_LINE SPLIT LINEJ Insert a return/line feed sequence after the current text pointer. TheJ effect of this command is to move the rest of the text on the current line down to a new line.) The keypad "7" key invokes this command.ww"R1 START_OF_LINE START OF LINE@ This command moves the cursor to the start of the current line.) The keypad "3" key invokes this command.ww1"R1 STORE_NUMBER STORE NUMBERJ Save the numeric value of n in the numeric part of Q-register q. In this command, q can be any letter.J The U key (with a numeric argument), followed by a letter, invokes this command.ww %3"R1 TAB TABJ Inserts a tab character at the current cursor position. The tab characterJ is inserted regardless of whether the buffer is in Insert or Overstrike mode." The Tab key invokes this command.wwJ"R 1 THIS_FILE THIS FILEJ Read the file pointed at by the cursor in a directory listing produced byJ the FILE SEARCH command, or move to the buffer pointed at by the cursor7 in a buffer list produced by the LIST BUFFERS command.J In the first case, THIS FILE reads that file from the file system, putsJ the file in a new buffer, and displays the new buffer in the currentJ window. The cursor is moved to the beginning of the file. The file still0 exists in its original form in the file system. J If the cursor is positioned on a buffer name in a buffer list produced byJ the LIST BUFFERS command, THIS FILE displays that buffer in the currentJ window. This command provides an easy method for positioning to a system buffer.J If th e cursor is positioned neither on a directory listing nor on aJ buffer list, but a current wildcard has been established via a FILEJ SEARCH command, THIS FILE reads - after asking for confirmation - the& next file according to this wildcard.2 The keypad "PF3" key invokes this command.ww "R 1 TOGGLE_MARK TOGGLE MARKJ Insert a mark at the current cursor position, or, if you are alreadyJ positioned at a mark, remove it. You can use the mark you inserted toG re-position to the marked position later on via the FIND MARK command.6 The keypad comma (,) key invokes this command.ww"R1 TOP TOPJ Move the text pointer to the start of line n. If n is not given but aJ range or rectangular region has been selected, jump across that range or= region. Otherwise, jump to the beginning of the text buffer.) The keypad "1" key invokes this command.ww@9"R1 TPU TPUJ The TPU command lets you execute a VAX Text Processing Utility command. For example, message ('Hello')J compiles and executes the VAXTPU command, "message ('hello')". The word' "Hello" appears in the message window.J The VAX Text Processing Utility Reference Manual contains complete' information about the VAXTPU language.; The Ctrl/? and DO keys invoke this command.ww"R1 TRIM_TRAILING TRIM TRAILINGJ Delete trailing blanks within the n ext n lines. If n is not given and aC range has been selected, delete trailing blanks within this range.. The "Return" key invokes this command.ww`D"R 1 TWO_WINDOWS TWO WINDOWSJ The TWO WINDOWS command creates two sections on the screen, making itJ possible to view different parts of one file, or two different documents.J When you view one file in two windows, whatever you do to one is done toJ the other. This is not true when viewing two different fi les in two windows.J If there is one window on the screen, TWO WINDOWS takes the currentJ window and divides it into two smaller windows. The current buffer isJ displayed in both windows, and the cursor is moved to the bottom window.J To view two different files at the same time, use the BUFFER or READ FILEJ commands after using TWO WINDOWS to put a new buffer or file in theJ current window, or circle through the available buffers by repeatedly using the TWO WINDOW command.' The B key invokes this command.ww "R1 TYPING TYPING KEYSJ In Insert mode, typed characters are inserted to the left of the currentJ cursor position. In Overstrike mode, typing a character replaces the* character at the current cursor position.ww"R1 UMLAUT UMLAUTJ Insert an umlaut character of the supplemental (multinational) characterJ set at the current position. The character to be inserted is selected viaJ the character 'x' typed after the quote, according to the following rules:1 a --> o --> u --> 1 A --> O --> U --> ' s --> J This command is useful for entering German texts from a VT100 terminal6 not supporting the eightbit multinational ASCII code.' The " key invokes this command.ww"R 1 UNKNOWN UNDEFINED KEYB The key that you have pressed has not been assigned to a command.ww0#R 1 UPPER_CASE UPPER CASEJ If a range has been selected, change within this range any lowercaseJ letter to uppercase. Otherwise, uppercase any lowercase characters withinJ the next n characters, starting at the current text pointer. If n isJ positive, the command operates toward the end of the buffer, otherwise to the beginning.' The W key invokes this command.ww`ËR1 VTE_COMMAND_LISTP  in the fol^h VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8|;5 lowing command list stands for typing the Gold key.8 Moving the Cursor< Jump to Top/Line n/Selection *`a "1": Jump to End of Buffer "2": Advance Line * "0": Back Line * "4": Start of Line "3"S End of Line "Backsp." or "F12" or Ctrl/ H; Advance Character * "->"; Back Character * "<-": Down in Column * "^": Up in Column * "v"= Advance Word * Ctrl/F= Back Word * Ctrl/RB Advance Continuously "0"B Back Continuously [ m"4"S Advance Screen Image * "v" or "Next Screen"S Back Screen Image * "^" or "Prev Screen": Advance Page * "8"S Back Page * "F14" (or "8" with arg. < 0)B Skip Over Last Operation "6"I Find Remembered Position from Previous Run -F@ Marking and Retrieving PositionsF Start Selection "9" or "Select"V Select Corner of Rectangular Region "9" or "Select": Jump to Start of Selection "1"[ Insert Permanent Mark "," or "Insert Here"V Remove Permanent Mark "," or "Remove"B Insert/Remove Permanent Mark ","T G o to (next) Mark "." or "Find"4 PromptingP Terminate Prompts via the keypad key "." or, on VT200 terminals, via the "Do"K key. Prompts for file and buffer names are also terminated by "Return". Reject Prompting by Ctrl/Z.6 Searching TextH Set Search Argument and Search Text Buffer * "Enter" or "Find": Search Again * "."? Search and Count Occurrences *` Ctrl/NM Search strings may contain match control characters and/or string buildingI characters allowing the specification of more general search criteria:5 Match Control Characters% ^X any character, ^S any non-alphanumeric0 ^N x any character except "x"9 ^E n x n occurences of "x" (VMS V5 only). ^E A any letter A...Z a...z, ^E B any non-alphanumeric: ^E C any symbol constituent A...Z $ . _' ^E D any digit 0...9J ^E E x exactly the character "x" (without interpretation)C ^E G q any character in Q-register q: ^E L any line terminator + ^E M x any sequence of "x"? ^E N any supplemental (multinational) letter D ^E P any TPU pattern (delimited by a second ^E P)B ^E Q q the contents of Q-register q: ^E R any alphanumeric A...Z a...z 0...98 ^E S any sequence of blanks and 2 ^E T any sequence of charactersW ^E U q the ASCII character whose code is in Q-register q2 ^E V any lowercase letter a...z2 ^E W any uppercase letter A...Z% ^E X any character@ ^E [x...y] anyone of the characters from "x" to "y"; Controlling Searches@ Toggle Case-Sensitivity of Searches GI Set Search to be Case-Sensitive -GI Set Search to be Case-Insensitive 0G@ Toggle Resulting Position on Failing Searches KI Preserve Position on Failing Searches 0KI Jump to Top on Failing Searches -K8 Replacing TextW Set Replacement Argument and Replace String "Enter" or "Insert Here" just Searched: Replace String just Searched ","> Search and Replace String *` "PF4"F Search and Replace all Occurrences of a String ` "PF4"= Ins erting and Moving Text> Insert Space * "Space"F Insert Tab "Tab" or Ctrl/II Insert Newline * "Return" or Ctrl/M: Open Line * "7"N Get Contents of Q-register q a Ctrl/GqN Save to Q-register q *`a Ctrl/PqO Save and Append to Q-register q  *`a Ctrl/P:qN Cut to Q-register q *`a Ctrl/TqO Cut and Append to Q-register q *`a Ctrl/T:q> Save Text *`a "PF2"> Paste Text a "PF3"F Insert next Character "x" Ctrl/\x> Insert ASCII Value of Character "x" Ctrl/\xD Insert Numeric Value of Argument "n"  # Ctrl/\A Insert Special Character # "9"= Insert Page Break Ctrl/LR Insert Umlaut (||||||) " and a|o|u|A|O|U|s= Insert Date Ctrl/]E Insert Time Ctrl/]C Insert Input File Name -"1"C Insert Output File Name  [1m-"2"C Insert Current Buffer Name -"3"C Insert Next File Name according to Wildcard -"7"; Formatter Control@ Toggle (enable/disable) Formatter Activation EI Disable Formatter 0EI Enable Formatter -EB Select Formatter Type via specified File Type "5"E Toggle Parenthesis Highlighting Ctrl/FN Enable Parenthesis Highlighting -Ctrl/FN Disable Parenthesis Highlighting 0Ctrl/FE Toggle Automatic Parenthesis Insertion Ctrl/RN Enable Automatic Parenthesis Insertion -Ctrl/RN Disable Automatic Parenthesis Insertion 0Ctrl/RH Formatter Control Characters (Ԙ VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;854 Active only at Start of Line)8 Reset Indentation to Base Value =8 Indent to Current Indentation .: Increase Indentation *` >: Decrease Indentation *` <8 Indent Fortran Continuation Line *8 Indent Query Language by 3 +8 Indent Query Language by 2 -A Controlling Text Insertion M odes: Toggle Insert/Overstrike Mode "-"C Enable Insert Mode -"-"C Enable Overstrike Mode 0"-"B Toggle Lowercase Reading Mode "-"K Enable Reading of Lowercase Characters -"-"K Convert Lowercase Input to Uppercase 0"-"E Toggle (enable/disable) Buffer Modification Ctrl/T N Allow Buffer Modification -Ctrl/TN Set Buffer Unmodifiable 0Ctrl/T9 Converting CaseB Convert to Lowercase *` VB Convert to Uppercase *` WB Change Case *` ZB Capitalize Word *` Q9 Deleting Text? Rub Out Previous Character * "Delete": Delete Next Character * "5"= Rub Out Previous Word * Ctrl/BE Delete Next Word * Ctrl/B= Rub Out Start of Line Ctrl/UK Delete Line or Range *`a Ctrl/K or "Remove"= Delete Rest of Line Ctrl/D: Delete or Restore Text "6"E Kill Text Buffer (without Restore!) Ctrl/D6 ExitingN Exit from VTEDIT Ctrl/Z or "F10"F Quit VTEDIT Without Preserving Output -Ctrl/ZI Exit from VTEDIT Remembering Position 0FA Controlling Input and Output Files B Open (new) Input File "1"= Append File Ctrl/A@ Include File at Current Position AB Open (new) Buffer for Editing "3"B Write (new) Output File "2"F Write Text to Output File *` "PF2"B Output and Delete Buffer "8"O Output Buffer and Compile Output 1Ctrl/Z or "F20"B Display Directory "7"P Display List of all Buffers "F7" or :D Select File or Buffer from List or Wildcard "PF3"E Toggle Read-Only/Read-Write Mode Ctrl/WN Set Current Buffer Read-Only 0Ctrl/WN Set Current Buffer Read-Write -Ctrl/W B Controlling the Video Terminal= Repaint Screen Ctrl/WD Set Cursor Line # Ctrl/W= Toggle Graphic-Tabs Display Mode Ctrl/VD Set Right Margin and Terminal Width # Ctrl/V@ Set Left Margin * ME Enter/Exit Screen Holding Mode * Ctrl/V@ Use Free Cursor Movement >@ Use Bound Cursor Movement <= Controlling WindowsC Shift Window Left * "<-"C Shift Window Right * "->"; Change Windows * "F9"; Next Buffer "F7"@ Two Windows / Next Buffer BH O ther Window C or "F8"@ One Window / Next Buffer DP Entering the "Two Window" command when two windows are displayed, or the "OneL Window" command when one window is displayed, selects the next buffer forN display in the current window. "Change Windows" alternately displays one or two windows.D Tab and Space Manipulation CommandsF Compress Multiple Spaces to Tabs *` "Tab"H Expand Tabs to Spaces *` "Space"@ Set Tabulators * RI Delete Trailing Spaces *` "Return"M Center Current Line between Margins O (letter "O")? Process Control CommandsI Attach to Parent/Other Process I or "F17"I Execute DCL Command J or "F18"I Spawn Subprocess S or "F19"< Manipulating Words@ Use Standard Words TI Use Extended Word Delimiter Set 0TI Clear Delimiter Set -TG Add Word Delimiter # T@ Get Next Word * NB Fill Paragraph *` P= Executing TPU commandsL Execute Q-register q * Ctrl/EqT Repeat Q-register q * Ctrl/EqW Set TPU Command and Execute Ctrl/? or "Do"@ Start/End Learning Mode L@ Execu te Learned Sequence * XK Compile TPU code *` . or "F11"S Execute TPU code *` , or "F11"= Miscellaneous CommandsG Set Journaling Frequency # F@ Close Journal File and Start New Journal File FJ Redisplay Keypad Layout and obtain HELP H or "Help"\ Show Information about Buffers, Windows etc. "Backspace" or "Help"C Set up Wildcard for Filename Search 0"7"G Sort Current Buffer or Range *`a Ctrl/KV Save Numeric Value in Q-register q # UqE Display Current and Last Line Number Ctrl/N6 Numeric ArgumentsN Format:  numeric expressionRS VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8I5 (i.e.,  arg1 [op arg2]); Numeric Expression Operators2 + Addition - Subtraction/ * Multiplication / Division( = Evaluate current arg1 op arg2& ^- Change sign of current arg27 Radix Change CommandsP ^D decimal (base 10) ^O octal (base 8) ^X hex (base 16)3 "arg2" Stand-ins ^. Current l ine number; ^Z Current total number of lines in the text bufferK ^L The distance to the end of the current line if arg2 is positive,5 otherwise to the start of the current line% ^^x The value of character 'x'I ^Qq The contents of the numeric part of Q-register qF ^A The value of the character at distance 'arg2' to the cursorL ^\ The value of the number in the text buffer, immediately following1 the cursor, or 0 if t here is no number; ^Ctrl/\ The same, but deleting this number from the textwwsyR1 VTE_LSE_KEYPADN lqqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqqkN x "F6" x "F7" x "F8" x "F9" x "F10" xX x Cancel x Next Buffer xOther Window xChange Wind *x Exit xw x x List BuffersxGoto Declar*`xFind Symbol*`x xN tqqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqqqj? x "F11" x "F12" x "F13" x "F14" xG xCompile TPU *`x End of Line x Expand x Page Back * xc xExecute TPU *`x Show Status x LSE Keys * x Review x N tqqqqqqqqqqqqqwvqqqqqqqqqqqqwvqqqqqqqqqqqqwvwqqqqqqqqqqqqnqqqqqqqqqqqqqqkX x "Find" x"Insert Here"x "Remove" x x "Help" x "Do" xX xSearch Argum*xReplace Argumx Delete *`a x x Get Help x LSE Command x{ x Go to Mark x Insert Mark x Remove Mark x xShow Status x TPU Command xN tqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqqu mqqqqqqqqqqqqvqqqqqqqqqqqqqqjQ x "Select" x"Prev Screen"x"Next Screen"x Ctrl/A Define AliasS x Select xBack Screen *xAdvance Scr.*x  ?  Help /Languaged xSel. Rectang.xPrevPlacehld*xNextPlac ehld*x Ctrl/? LSE command input? tqqqqqqqqqqqqqvwqqqqqqqqqqqqvwqqqqqqqqqqqqvwqqqqqqqqqqqqqk? x "F17" x "F18" x "F19" x "F20" xG x Attach x DCL Command x Spawn x Compile xc xErase Placehldx Goto Source x Prev. Step *x Next Step *x ? mqqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqjwwJR1 VTE_LSE_KEY_LISTN Language-Sensitive Editing Commands usin g LSE Key Definition ModeG Align Comments *` Ctrl/GG Fill Comments *` Ctrl/PE Set Source Directory (List) * Ctrl/LE Toggle (enable/disable) Buffer Modification Ctrl/TN Allow Buffer Modification -Ctrl/TN Set Buffer Unmodifiable 0Ctrl/T= Goto Next Placeholder * Ctrl/N= Goto Previous Placeholder * Ctrl/P= Expand Current Placeholder Ctrl/EE Unexpand Placeholder Ctrl/E= Erase Placeholder Ctrl/KE Unerase Placeholder Ctrl/KG Define Alias ` Ctrl/A@ Language Specific Help ?O Compile "F20" or 1Ctrl/ZR Find Symbol *` "F9" or '? Goto Primary Declaration ` Ctrl/DG Goto Declaration (context-dependent) ` Ctrl/D= Goto Source Ctrl/G= Next Step * Ctrl/F= Previous Step * C trl/B[ Switch LSE keys between LSE and VTEDIT mode * "Linefeed" or Ctrl/J= LSE command input mode Ctrl/ZK Set Language -"5"K Get Environment -"1"ww`?R1 VTE_LSE_LISTA Language-Sensitive Editing Commands G Align Comments *` C trl/GG Fill Comments *` Ctrl/PE Set Source Directory (List) * Ctrl/LY Goto Next Placeholder * "Next Screen" or )Y Goto Previous Placeholder * "Prev Screen" or (R Expand Current Placeholder "F13" or "Linef." or Ctrl/J: Unexpand Placeholder "6"Q Erase Placeholder  "F17" or #: Unerase Placeholder "6"G Define Alias ` Ctrl/A@ Language Specific Help ?O Compile "F20" or 1Ctrl/ZQ Review "F14" or =R Find Symbol *` "F9" or [1m'R Goto Declaration *` "F8" or ;Q Goto Source "F18" or *Q Next Step * "F20" or ]Q Previous Step * "F19" or [f Switch LSE Keys between LSE and VTEDIT Mode * "F13" or "LF" or Ctrl/J; LSE Command " Do"= LSE Command Input Mode Ctrl/?K Set Language -"5"K Get Environment -"1"ww&JR1 VTE_VT100_KEYPADT lqqqqqqqqwqqqqqqqqwqqqqqqqqwqqqqqqqqk lqqqqqqqqwqqqqqqqqwqqqqqqqqwqqqqqqqqk` x ^ x x x x x x x Text x Paste xSearch/`xd x x x v x x x[7m Gold xSave *`ax Text a xReplace*x~ x Up * x Down * x Left * x Right* x x xWrite *`xGet Filex All ` xw x Screen*x Screen*x Shift* x Shift* x tqqqqqqqqnqqqqqqqqnqqqqqqqqnqqqqqqqquY mqqqqqqqqvqqqqqqqqvqqqqqqqqvqqqqqqqqj x Open x Page * xSelect /x Insert/xY x Line x x Quote* xOverstr*xy All (*) commands tT5 VTEDIT050.A"#[WECK.VTEDIT.KIT.V50.A]VTEDIT.HLB;8|;5Oake an optional numeric xWildcardx Output xSel.RectxRead LowxU argument of the following form: tqqqqqqqqnqqqqqqqqnqqqqqqqqnqqqqqqqqud  Gold [-]  x Up x Delete x Delete/x Replacex[ x Line * x Char * x Restorex Again x{ All (`) commands operate on selected  xContin. x Format x Skip x[Un]Mark[mxW ranges, all (a) commands on rectangular tqqqqqqqqnqqqqqqqqnqqqqqqqqnqqqqqqqqu] regions. x Top x Bottom x Start x Enter xi All shaded commands are prefixed by Gold. x/Jump*`ax x of Linex Search xp xOpen InpxOpen Outx Buffer x Argum *xU Delete Rubout character tqqqqqqqqvqqqqqqqqnqqqqqqqqu xb Backspace End of line x Down Line * x Search x Enter x` Ctrl/Z Execute TPU command(s) x x Again *x Replacexw Ctrl/Z Exit and close file xDown Continuouslyx Goto xArgumentx]  -  Ctrl/Z Kill output and exit mqqqqqqqqqqqqqqqqqvqqqqqqqqvqqqqqqqqjww`$gR1 VTE_VT200_KEYPADN lqqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqqkN x "F6" x "F7" x "F8" x "F9" x "F10" xX x Cancel x Next Buffer xOther Window xChange Wind *x Exit xs x x List Buffersx x x xN tqqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqqqj? x "F11" x "F12" x "F13" x "F14" xG xCompile TPU *`x End of Line x Line Feed x Page Back * x_ xExecute TPU *`x Show Status x x x ? mqqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqjN lqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqk lqqqqqqqqqqqqwqqqqqqqqqqqqqqkX x "Find" x"Insert Here"x "Remove" x x "Help" x "Do" xV xSearch Argum*xReplace Argumx Delete *`a x x Get Help x x{ x Go to Mark x Insert Mark x Remove Mark x xShow Status x TPU Command xN tqqqqqqqqqqqqqnqqqqqqqqqqqqqnqqqqqqqqqqqqqu mqqqqqqqqqqqqvqqqqqqqqqqqqqqj6 x "Select" x"Prev Screen"x"Next Screen"x= xSelectRectangxBack Screen *xAdvance Scr.*x0 mqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqj@ lqqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqwqqqqqqqqqqqqqk ? x "F17" x "F18" x "F19" x "F20" xG x Attach x DCL Command x Spawn  x Compile x? mqqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqvqqqqqqqqqqqqqjww5#R 1 WHAT_LINE WHAT LINEJ Show the current line number, total number of lines in the buffer, andJ percentage of that position in the buffer. This is useful if you want toJ know whether to insert a page break or simply to find out how many lines are in the buffer., The Ctrl/N key invokes this command.ww K#R1 WRITE_CONTROL WRITE CONTROL @ Alternately set the current buffer to read-only, or read/write., The Ctrl/W key invokes this command.ww\#R 1 WRITE_FILE WRITE FILEJ The WRITE FILE command places the contents of the current buffer in theJ file you specify. The editing session does not end until you use either the EXIT or QUIT commands.J The WRITE FILE command does not change the buffer name, but it allows toJ change the output file name. A future WRITE FILE command will write theJ buffer to the new file name (as will the EXIT command, if the buffer hasJ been modified). You can examine the current output file name with the SHOW command.0 The keypad "2" key invokes this command.ww@#R 1 WRITE_RANGE WRITE RANGE) Write a range of text to an output file.J VTEDIT writes n lines of text to an output file, starting at the currentJ text pointer (the character under the cursor). If n is not given but aJ mark is set, VTEDIT writes the text between the mark and the current textJ pointer, otherwise, VTEDIT writes one line. VTEDIT moves the text pointerJ to the end of the text written. You can delete the text which was written by typing the "6" keypad key.0 The PF2 keypad key invokes this command.ww(*[WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808+,. / 4P P-"0123KPWO 5 6ɥI789Ŗ'vGHJ! Page 1 ! VTEDIT - Video Terminal Editor!!++ ! FACILITY:"! Text Processing Utility (VAXTPU)! ! ABSTRACT:5! This is the source program for the VTEDIT interface!! ENVIRONMENT: ! VAX/VMS!! Author: Gerhard Weck!! Creation Date: 21-Oct-1985!! Modified by:!=! G.Weck Apr/Jun-1986 Upgrade to V4.1 - EVEPLUS functionality/! G.Weck Oct/Nov-1986 Upgrade to V4.2 - Keymaps4! G.Weck Jun-1987 Upgrade to V4.3 - LSE V1.3 support8! G.Weck Sep-1987 Upgrade to V4.4 - Changes for LSE V2.0/! G.Weck Jan-1988 Upgrade to V4.5 - SCA support8! G.Weck Aug-1988 Upgrade to V4.6 - Changes for TPU V2.0B! G.Weck Mar-1989 Upgrade to V4.7 - Prepare compatibility for V5.0!!--! VTESECINI.TPU!%! Table of Contents as of 17-Apr-1989!)! Procedure name Page Description*! -------------- ---- ------------!! vte$init_variables 21! vte$active_range 3 Utility procedures! vte$adjust_prompt 4! vte$ask 5! vte$at_start_of_line 6"! vte$backup_over_whitespace 7! vte$build_target 8! vte$check_bad_window 9! vte$check_buffer 10! vte$check_case 11! vte$check_position 12! vte$check_version 13! vte$compress_spaces 14! vte$copy_pattern 15! vte$copy_text 16! vte$create_buffer 17! vte$current_line 18! vte$cut_rectangular 19! vte$dcl 20 ! vte$define_rectangle 21! vte$delete_buffer 22! vte$display_line 23! vte$end_of_word 24! vte$execute_key 25#! vte$exit_command_window 26! vte$expand_tabs 27 ! vte$extend_formatter 28! vte$extended_range 29! vte$fill_line 30! vte$find 31! vte$get_buffer 32! vte$get_buffername 33! vte$get_formatter 34! vte$get_margin 35! vte$get_memory 36! vte$go_to 37! vte$help_text 38! vte$in_indent_raJG VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P )nge 39! vte$indent 40! vte$indent_line_to 41! vte$init_buffer 42! vte$insert_char 43! vte$insert_colon 44! vte$insert_lower 45! vte$journal_open 46! vte$justify_line 47! vte$lse_repeat 48! vte$match 49! vte$message 50! vte$move_by_word 51! vte$new_window 52! vte$page 53!! vte$paste_rectangular 54"! vte$position_in_middle 55! vte$prompt_key 56! vte$prompt_string 57! vte$range 58! vte$read_file 59! vte$recall 60! vte$register_value 61! vte$remember_buffer 62! vte$remove 63! vte$repeat_count 64! vte$set_margins 65! vte$set_memory 66 ! vte$set_right_margin 67! vte$set_status_line 68! vte$set_width 69! vte$setup_formatter 70! vte$show_first_line 71! vte$split_line 72! vte$start_of_word 73#! vte$update_status_lines 74! vte$write_file 75*! vte_bottom 76 Cursor movement! vte_end_of_line 77! vte_mark 78! vte_move_down 79! vte_move_left 80! vte_move_right 80"! vte_move_line_backward 81!! vte_move_line_forward 81! vte_move_up 82"! vte_move_word_backward 83!! vte_move_word_forward 83! vte_next_screen 84! vte_previous_screen 84! vte_page_backward 85! vte_page_forward 85! vte_scroll_down 86! vte_scroll_up 86! vte_select 87"! vte_select_rectangular 88! vte_skip_range 89! vte_start_of_line 90! vte_top 91-! vte_find_mark 92 Marker commands! vte_insert_mark 93! vte_remove_mark 94! vte_toggle_mark 95(! vte_find 96 Search commands! vte_find_next 96! vte_search_count 97! vte_set_search_case 98!! vte_set_search_origin 98-! vte_exchange 99 Replace commands! vte_insert_here 100! vte_replace 101! vte_replace_all 102;! vte_cut_buffer 103 Text insertion and movement! vte_include_buffer 104 ! vte_insert_flashing 105! vte_insert_matched 106! vte_insert_numeric 107! vte_paste 108! vte_return 109! vte_split_line 110! vte_save 111! vte_save_buffer 111! vte_space 112! vte_tab 112! vte_umlaut 1134! vte_flash_control 114 Formatter commands! vte_match_control 115"! vte_formatter_control 116! vte_indent 117! vte_reset_indent 117! vte_indent_less 118! vte_indent_more 118 ! vte_decrease_indent 119 ! vte_increase_indent 119! vte_indent_cont 120! vte_set_formatter 1212! vte_case_control 122 Insertion control! vte_change_mode 122! vte_modify_control 1233! vte_capitalize_word 124 Case conversion! vte_change_case 125! vte_lowercase 125! vte_uppercase 125)! vte_delete 126 Text deletion! vte_delete_buffer 127 ! vte_erase_character 128! vte_erase_line 129 ! vte_erase_next_word 130$! vte_erase_previous_word 130$! vte_erase_start_of_line 131! vte_remove 132! vte_restore 133'! vte_exit 134 Exit commands! vte_quit 1351! vte_append_file 136 Input and output! vte_buffer 137! vte_close_file 138! vte_compile 139! vte_file_search 140! vte_include_file 141! vte_list_buffers 142! vte_read_file 143! vte_this_file 144! vte_write_control 145! vte_write_file 146! vte_write_range 1471! vte_bound_cursor 148 Terminal control! vte_free_cursor 148! vte_control_screen 149! vte_refresh 150 ! vte_set_left_margin 151! vte_set_screen 1521! vte_change_windows 153 Window control! vte_next_buffer 154! vte_one_window 155! vte_other_window 156! vte_two_windows 157! vte_shift_left 158! vte_shift_right 158;! vte_center_line 159 Tab and space manipulation ! vte_compress_spaces 160! vte_expand_tabs 161! vte_set_tabs 162! vte_trim_trailing 163+! vte_attach 164 Process control! vte_dcl 165! vte_spawn 166+! vte_fill 167 Word manipulation! vte_get_next_word 168$! vte_set_word_delimiters 1693! vte_do 170 TPU functions and learning ! vte_execute_command 171 ! vte_iterate_command 171 ! vte_execute_learned 172! vte_learn 173! vte_tpu 1740! vte_help 175 Miscellaneous commands! vte_set_journal 176! vte_show 177! vte_sort 178! vte_store_number 179! vte_what_line 180&! vte_alias 181 LSE support! vte_align 182"! vte_erase_placeholder 183! vte_find_symbol 184!! vte_goto_declaration 185! vte_goto_source 185! vte_expand_token 186! vte_lse_command 187! vte_lse_keys 188! vte_next_step 189! vte_previous_step 189!! vte_next_placeholder 190$! vte_previous_placeholder 190! vte_review 191! vte_set_source 192;! vte$standard_keys 193 Initialization procedures! vte$lse_keys 194! vte$init_procedure 195 ! Page 2!P! Procedures with names beginning with vte_ are VTEDIT commands. The proceduresK! with names beginning with vte$ are internal utility procedures of VTEDIT.=! User-written procedures should not begin with vte$ or vte_.! Initialize VTEDIT variablesL! Global variables should be initialized to eliminate the possible confusion*! of global variables with procedure namesprocedure vte$init_variables! Global string constants)vte$x_version := ! VTEDIT version number "VTEDIT Version V4.7-172"; vte$x_null := ""; ! Null string$vte$x_spaces := ! Used for paddingP" ";Dvte$x_whitespace := ! Whitespace characters: space & horizontal tab ' ' + ascii(9);=vte$x_cont_space := ! Fortran continuation lines label field " ";Avte$x_cobol_space := ! Cobol comment lines sequence number field " ";:vte$x_dcl_separators := ! Separators used in DCL commands "! " + ascii(9);*vte$x_tabs := ! Used to fill left margin " ";Gvte$x_line_separators := ! Line separators: form feed, carriage return,! ! vertical tab, and line feed2 ascii(10) + ascii(11) + ascii(12) + ascii(13);6vte$x_newline := ! Embedded carriage return/line feed ascii(13) + ascii(10);Dvte$x_init_word_sep := ! Initial Word separators: space, horizontal/ ! tab, form feed, carriage return, vertical ! tab, comma, and line feed3 vte$x_whitespace + vte$x_line_separators + ',';@vte$x_add_word_sep := ! Additional word separators suitable for ! programming languages "()[]<>{}+-*!=:/.;$_'""";'vte$x_cap_letters := ! Capital letters! "ABCDEFGHIJKLMNOPQRSTUVWW VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P XYZ";)vte$x_low_letters := ! Lowercase letters! "abcdefghijklmnopqrstuvwxyz";0vte$x_letters := ! All (american ASCII) letters* vte$x_cap_letters + vte$x_low_letters;Evte$x_multi_characters := ! Alphabetic characters of the supplemental/ ! character set("multinational characters")B "";"vte$x_digit_characters := ! Digits "0123456789";;vte$x_alpha_numeric := ! Alphanumerics: letters and digits+ vte$x_letters + vte$x_digit_characters;Evte$x_symbol_characters := ! Symbol characters are alphanumerics plus* ! "$" and "_", including multinational ! character set8 vte$x_alpha_numeric + "$_" + vte$x_multi_characters;<vte$x_not_alphabetic := ! Non-alphabetic graphic characters< "!@#%^&*()[]{}-+=~`|\:;""'<,>.?/";Kvte$x_continuation_chars := ! Characters allowed as Fortran cont indicators3 vte$x_symbol_characters + vte$x_not_alphabetic;Dvte$x_cobol_comment := ! Characters allowed in Cobol sequence field "*-";Fvte$x_argument_characters := ! Characters allowed in numeric arguments "0123456789ABCDEF^+-*/=";:vte$x_matchable_open := "([{<'`"""; ! Opening parentheses<vte$x_matchable_close := ")]}>''"""; ! Closing parenthesesMvte$x_show_list := " BUFFERS KEYWORDS LISTS MAPS PROCEDURES SCREEN SUMMARY" +F " VARIABLES WINDOWS ALIAS LANGUAGES PACKAGES MODULES PARAMETERS" +5 " PLACEHOLDERS ROUTINES SOURCE_DIRECTORY TOKENS";8vte$x_lse_marker := ! Show LSE presence in status line+ substr("* ", 1, 2 * vte$x_lse_support);! Define names for key maps@vte$map_standard := "vte$map_standard"; ! Common key definitionsDvte$map_indent := "vte$map_indent"; ! Indentation control charactersFvte$map_flash := "vte$map_flash"; ! Closing parentheses (for flashing)Bvte$map_match := "vte$map_match"; ! Opening (electric) parentheses>vte$map_lse := "vte$map_lse"; ! LSE overlayed key definitions! Define names for keymap listsEvte$list_all := "vte$list_all"; ! Keymap list containing all keymapsAvte$list_com := "vte$list_com"; ! DCL and Macro formatter<vte$list_doc := "vte$list_doc"; ! Document formatterPvte$list_for := "vte$list_for"; ! Fortran, Cobol, Query and Struct form.Pvte$list_nil := "vte$list_nil"; ! Text formatter and no formatter at all! Global integer constantsHvte$x_tpu_version := get_info(system, "version"); ! Major version of TPUGvte$x_tpu_update := get_info(system, "update"); ! Minor version of TPU@vte$x_default_left_margin := 1; ! Left margin for new buffersIvte$x_default_right_margin := 0; ! Amount to subtract from window width) ! for right margin for new buffersGvte$x_hot_zone_size := 8; ! Number of characters before right margin# ! where word wrap will occurMvte$x_largest_right_margin := 983; ! Maximum value allowed by set(margins...)Ivte$x_largest_width := 65535; ! Maximum value allowed by set(width...)Hvte$x_narrow_window := 80; ! Maximum width of a full char size windowHvte$x_wide_window := 132; ! Maximum width of a small char size windowIvte$x_max_string_value := 132; ! Maximum length of a text string valueOvte$x_max_buffer_name_length := 43; ! Buffer names can be any size, but this is0 ! the largest size that will be shown on1 ! the status line without being truncatedMvte$x_min_buffer_name_length := 13; ! Minimum length of buffer name that will ! be shown in any caseGvte$x_max_scroll_offset := 4; ! Maximum number of lines above/below the& ! final position of a find commandHvte$x_max_prompt_lines := 6; ! Maximum number of lines for prompt windowOvte$x_max_buffer_lines := 100; ! Maximum number of lines for message and recall ! buffersMvte$x_max_match_offset := 9; ! Maximum number of lines to be checked backward=vte$x_disable_ctrl_t := 1; ! Dispatch value to disable Ctrl/TJvte$x_translate_logical := 2; ! Dispatch value to translate a logical nameKvte$x_create_logical := 3; ! Dispatch value to create/delete a logical name:vte$x_delete_file := 4; ! Dispatch value to delete a fileEvte$x_get_symbol := 5; ! Dispatch value to the value of a DCL symbolCvte$x_compare_strings := 6; ! Dispatch value to compare two strings! Global program constants9vte$default_insert := ! Default text insertion procedure1 compile("vte$insert_lower(ascii(last_key))");(! Global pattern constants and variables;vte$pattern_end_of_word := arb(1); ! End of a word (preset)Jvte$pattern_end_this_word := arb(1); ! End of a next word or line (preset):vte$pattern_whitespace := anchor & span(vte$x_whitespace);8vte$pattern_multi_space := ' ' & span(vte$x_whitespace);@vte$pattern_trailing_space := span(vte$x_whitespace) & line_end;Evte$pattern_empty_line := anchor & span(vte$x_whitespace) & line_end;Nvte$pattern_embedded_newline := (span(vte$x_whitespace) | '') & vte$x_newline;4vte$pattern_start_of_line := vte$pattern_whitespace;Gvte$pattern_dcl_label := anchor & '$' & (span(vte$x_whitespace) | '') &( span(vte$x_symbol_characters) & ':';Nvte$pattern_dcl_comment := anchor & '$' & (span(vte$x_whitespace) | '') & '!';Bvte$pattern_digit_string := anchor & span(vte$x_digit_characters);Pvte$pattern_signed_number := anchor & ('-' | '') & span(vte$x_digit_characters);Lvte$pattern_match_control := '' & ("'" | "^S" | "^X" | "^N" | "^E" | "^M");&vte$pattern_anchored_control := anchor/ & ("'" | "^S" | "^X" | "^N" | "^E" | "^M");Gvte$pattern_negated_control := anchor & ("^E" & any("ABCDEGLNRSUVW["));Hvte$pattern_counted_control := anchor & ("^E" & any("ABCDEGLNRSUVWX["));Nvte$pattern_counted_pattern := anchor & ("^E" & span(vte$x_digit_characters));vte$pattern_search := arb(1);vte$pattern_1 := arb(1);vte$pattern_2 := arb(1);vte$pattern_3 := arb(1);vte$pattern_4 := arb(1);vte$pattern_5 := arb(1);vte$pattern_6 := arb(1);vte$pattern_7 := arb(1);vte$pattern_8 := arb(1);! Global string variablesDvte$x_target := vte$x_null; ! Last target built for find commandGvte$x_old_target := vte$x_null; ! Last string given to find commandAvte$x_old_command := vte$x_null; ! Remember last command givenCvte$x_input_file := vte$x_null; ! Remember last input file nameDvte$x_output_file := vte$x_null; ! Remember last output file nameEvte$x_memory_file := vte$x_null; ! Remember name of file in memoryBvte$x_journal_file := vte$x_null; ! Name of current journal file;vte$x_wild_file := vte$x_null; ! Remember last wildcardDvte$x_wild_result := vte$x_null; ! Result of last wildcard search?vte$x_buffer_name := vte$x_null; ! Remember last buffer nameEvte$x_dcl_command := vte$x_null; ! Remember last DCL command givenOvte$x_attach_name := vte$x_null; ! Remember last process selected via attach->vte$x_show_item := vte$x_null; ! Remember last item showedNvte$x_source_directory := vte$x_null; ! Remember current directory search list4vte$x_command_prompt := vte$x_null; ! Command promptJvte$x_count_prompt := vte$x_null; ! Additional text for search prompting<vte$x_formatter_name := vte$x_null; ! Name of formatter usedBvte$x_extended_formatter := vte$x_null; ! Full name for displayingKvte$x_language := vte$x_null; ! Language associated with current buffern8vte$x_comment_char := vte$x_null; ! Comment introducer=vte$x_start_comment := vte$x_null; ! Line comment introducerBvte$x_special_comment := vte$x_null; ! Conditional code introducer@vte$x_string_delim := vte$x_null; ! String delimiter characterFvte$x_act_opTAF VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P o#en := vte$x_null; ! Currently used opening parenthesesGvte$x_act_close := vte$x_null; ! Currently used closing parenthesesc! Global marker variablesc>vte$x_select_position := 0; ! Marker for start of select rangeGvte$x_select_rectangular := 0; ! Marker for start of rectangular region Avte$x_old_rectangular := 0; ! Copy of start of rectangular regionBvte$x_restore_start := 0; ! Marker for start of text just restored?vte$x_restore_end := 0; ! Marker for end of text just restoredeGvte$x_restore_position := 0; ! Marker for position of text just deleted Bvte$x_first_position := 0; ! Marker for position from previous run9vte$x_move_position := 0; ! Marker for last vertical move Dvte$x_check_position := 0; ! Marker for last lowercase char insertedAvte$x_stop_position := 0; ! Marker for end of range for searchingfKvte$x_pre_command_position := 0;! Marker for last position before promptingIvte$x_pre_find_position := 0; ! Marker for last position before searching >vte$x_reverse_position := 0; ! Marker for flashing parenthesisBvte$x_pre_select := 0; ! Marker for select range before promptingLvte$x_pre_rectangular := 0; ! Marker for rectangular region before prompting2vte$x_mark1 := 0; ! First marker to be remembered3vte$x_mark2 := 0; ! Second marker to be remembered$2vte$x_mark3 := 0; ! Third marker to be remembered3vte$x_mark4 := 0; ! Fourth marker to be remembered 2vte$x_mark5 := 0; ! Fifth marker to be remembered! Global range variablesCvte$x_find_range := 0; ! Range containing the last string searched5-vte$x_pre_find := 0; ! Copy during prompting =vte$x_prompt_range := 0; ! Range containing the prompt string1>vte$x_text_range := 0; ! Range containing the prompted string! Global buffer variables @vte$x_pre_command_buffer := 0; ! Current buffer before prompting-vte$buffer_buffer := 0; ! Buffer list buffer )vte$command_buffer := 0; ! Command buffer$Dvte$dcl_buffer := 0; ! DCL buffer used for output from DCL commandsIvte$directory_buffer := 0; ! Directory buffer used for directory listingsiBvte$lse_buffer := 0; ! Placeholder for LSE buffer in non-LSE modeCvte$memory_buffer := 0; ! Memory buffer used to remember last file &vte$paste_buffer := 0; ! Paste buffer(vte$prompt_buffer := 0; ! Prompt buffer>vte$restore_buffer := 0; ! Buffer used to restore deleted text/vte$search_buffer := 0; ! Search string buffer_/vte$target_buffer := 0; ! Search target bufferw/vte$tpu_buffer := 0; ! Buffer for TPU commandstif vte$x_lse_support then< vte$expand_buffer := 0; ! Buffer used for LSE expansionselse= lse$$prompt_window := 0; ! We use a private prompt windowe> lse$message_window := 0; ! We use a private message window= lse$$cut_paste_buffer := 0; ! We don't use the LSE buffer = lse$$prompt_buffer := 0; ! We use a private prompt buffer_endif;! Global window variablesmFvte$x_pre_command_window := 0; ! Current window when Do key is pressedCvte$x_this_window := 0; ! Current text window using window command7=vte$bottom_window := 0; ! Bottom window in split window mode 4vte$command_window := 0; ! Window used for prompting7vte$main_window := 0; ! Full window in one window mode0Cvte$prompt_window := 0; ! Prompt window overlay for simple promptse7vte$top_window := 0; ! Top window in split window mode0! Global program variables7vte$learn_sequence := ! Sequence learned in learn moder( "vte$message(0, 'Nothing learned')";! Global process variables=vte$x_dcl_process := 0; ! DCL subprocess used by DCL commande! Global integer variablesKvte$x_number_of_windows := 1; ! Number of windows currently being displayedoJvte$x_old_window_number := 1; ! Number of windows before directory commandEvte$x_repeat_count := 1; ! Number of times to execute current commandt5vte$x_pre_command_count := 0; ! Copy during promptinge:vte$x_prompt_length := 0; ! Length of vte$x_command_prompt6vte$x_running := 0; ! False during tpu$init_procedure3vte$x_radix := 10; ! Radix for argument evaluationr+vte$x_arg_1 := 0; ! First numeric argumentn,vte$x_arg_2 := 0; ! Second numeric argument/vte$x_auto_indent := 0; ! Left margin setttinge@vte$x_old_indent := 0; ! Indentation before disabling formatterDvte$x_indent_basis := 0; ! Leftmost left margin for auto-indentationEvte$x_delta_indent := 0; ! Indentation increment for auto-indentation <vte$x_offset_column := 0; ! Offset before last vertical move;vte$x_main_top := 3; ! Scrolling offset of main window toptAvte$x_main_bottom := 3; ! Scrolling offset of main window bottom Gvte$x_main_amount := 0; ! Offset of main window cursor after scrolling59vte$x_top_top := 3; ! Scrolling offset of top window top_?vte$x_top_bottom := 3; ! Scrolling offset of top window bottom Evte$x_top_amount := 0; ! Offset of top window cursor after scrolling4?vte$x_bottom_top := 3; ! Scrolling offset of bottom window topDvte$x_bottom_bottom := 3; ! Scrolling offset of bottom window bottomJvte$x_bottom_amount := 0; ! Offset of bottom window cursor after scrolling8vte$x_first_line := 0; ! Current line from previous run;vte$x_first_column := 0; ! Current column from previous run5-vte$x_last_line := 0; ! Current line on exit_1vte$x_last_column := 0; ! Current column on exit Avte$x_erase_placeholder := 0; ! Remember erasing LSE placeholdersw8vte$x_expand_token := 0; ! Remember expanding LSE tokens! Global Boolean variablesEvte$x_search_select := 0; ! Flag if search created a temporary select Evte$x_search_exact := 0; ! Flag if search should be temporarily exact0,vte$x_nowrap := 1; ! Don't wrap at line end,vte$x_formatter := 0; ! Formatter is active;vte$x_justify := 0; ! Flag if filling should justify lines ?vte$x_left_justify := 0; ! Toggle justifying from left or rightd8vte$x_auto_case := 0; ! Disallow automatic case control?vte$x_repeated := 0; ! Current command has no numeric arguments0vte$x_pre_repeated := 0; ! Copy during prompting=vte$x_lower_case := 1; ! Allow lowercase letters to be input1;vte$x_append_buffer := 0; ! Append current text to registere?vte$x_append_flag := 0; ! Flag if save operation should append Ivte$x_restore_rectangular := 0; ! Flag restoration of rectangular regions Fvte$x_term_flag := 0; ! Flag if Return/Enter is allowed as terminator=vte$x_learning := 0; ! Flag if learning a keystroke sequence 7vte$x_file_search := 0; ! Flag if prompting a wildcarda9vte$x_abort := 0; ! Flag if learn mode should be aborteda9vte$x_prompting := 0; ! Flag if prompting is in progress_Evte$x_prompt_restored := 1; ! Flag if prompted text has been restored ?vte$x_vt200_keypad := 0; ! True if LK201 keyboard is being useda9vte$x_lse_keys := 0; ! True if LSE keys have LSE meaningrFvte$x_multiple_lse := 0; ! Set to allow entry of multiple LSE commands@vte$x_review_in_progress := 0; ! True if review has been startedCvte$x_first_expand := 1; ! True until the first expand is performede>vte$x_comment_indent := 1; ! Flag to indent comments like code! Global keyword variables8vte$x_key_prompt := 0; ! Remember key causing prompting@! Global variables connecting file type, formatter, and languageEvte$x_formatter_files := ! File extensions known as to be formattableP ".C .CBL.CLD.COB.COD.COM.DES.DOC.DTR.DUM.ENV.EXT.FOR.FTN.H .HLP.INC.INT" +K ".LIB.LSE.MAC.MAR.MMS.OPT.PAS.PDM.PEL.PPA.RND.RNH.RNO.RNT.RNX.TXT.TPU";E<vte$x_formatter_names := ! Names of corresponding formattersP ".TPU.COB.TPU.COB.FOR.COM.FOR.DOC.DTR.FOR.TPU.FOR.FOR.FOR.TPU.DOC.FOR.FOR" +K ".COB.DTR.MAR.MAR.COM.COM.TPU.DTR.DTR.MAR.RNO.RNO.RNO.RNO.RNO.RNO.TPU";r L VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P v2Gvte$x_language_types := ! File extensions known as to have LSE support P ".C .COB.CLD.COB.FOR.COM.FOR.DOC.DTR.FOR.PAS.FOR.FOR.FOR.C .HLP.FOR.FOR" +K ".COB.LSE.MAC.MAR.MMS.OPT.PAS.PDM.PEL.PPA.RNO.RNO.RNO.RNO.RNO.RNO.TPU";a:vte$x_formatter_list := ! Unified list of formatter names' ".COB.COM.DOC.DTR.FOR.MAR.RNO.TPU";f=vte$x_map_list := ! List of corresponding key map list nameso' ".FOR.FOR.DOC.FOR.FOR.COM.NIL.FOR";e>vte$x_formatter_ext := ! List of corresponding extended namesP "Cobol/DCL/Document/Query Language/Fortran/Macro/Text/Structured Language/";Bvte$x_language_list := ! Unified list of supported language types+ ".C .COB.COM.DTR.FOR.HLP.PAS.RNO.TPU";rBvte$x_formatter_language := ! List of corresponding language names@ "C/Cobol/DCL/Datatrieve/Fortran/Help/Pascal/Runoff/VAXTPU/";.! Global variables setting defaults at startup?vte$x_word_separators := ! Set word separators to initial value_ vte$x_init_word_sep;3vte$x_flashing := 1; ! Enable parenthesis flashing_?vte$x_matching := 0; ! Disable automatic parenthesis insertion"-vte$x_search_case := 0; ! Non-exact searcheslAvte$x_search_origin := 1; ! Preserve position on failing searcheshIvte$x_free_cursor := 0; ! Flag usage of free cursor but don't use it yeteAvte$x_indent_comments := 1; ! Indent comment lines just like codeGvte$x_indent_cont := 4; ! Indent continuation lines more than the code ?vte$x_fortran_basis := 6; ! Write Fortran code from column 7 ons@vte$x_cobol_string := '"'; ! Use quote as Cobol string delimiterIvte$x_indent_struct := 4; ! Indent Structured Language in increments of 4$4vte$x_indent_spaces := 0; ! Use Tabs to indent linesDvte$x_final_message := "HERE"; ! Message to be output on terminationKvte$x_auto_goto_source := 0; ! Don't add a Goto Source after Prev/Next Step~/! Separate setups performed by other procedurest9vte_set_word_delimiters; ! Define word delimiter patternst endprocedure;y l! Page 3! Utility ProceduresF! If a mark is set, return the select range. Otherwise, return a rangeC! containing n items starting from the current cursor location, thecD! direction depending on the sign of n, and the item type determined! by the parameter act_mode.!s ! Parameters:a!_(! act_mode: Type of item to be skipped:.! 0 return n characters, 1 return n lines9procedure vte$active_range(act_mode) ! Utility procedures 7local temp_range, ! active (selected/designated) rangeH0 pos, ! intermediate storage for position2 final_pos; ! final position after executionon_error ! Just continues endon_error;4temp_range := 0; ! Such that we know when we have it"if vte$x_select_position <> 0 thenF if get_info(vte$x_select_position, "buffer") = current_buffer then, if vte$x_select_position <> mark(none) then temp_range := select_range; elsec> temp_range := create_range(mark(none), mark(none), none); endif;t vte$x_select_position := 0; endif;endif;if temp_range = 0 then pos := mark(none);" if vte$x_repeat_count > 0 then if act_mode then' move_horizontal(- current_offset); ' move_vertical(vte$x_repeat_count);  elses) move_horizontal(vte$x_repeat_count);i endif;  vte$check_position(0,0);o final_pos := mark(none);u2 if final_pos <> beginning_of(current_buffer) then move_horizontal(-1);t endif;l1 temp_range := create_range(pos,mark(none),none);  position(final_pos);r else if act_mode then7 if mark(none) <> beginning_of(current_buffer) thenv move_horizontal(-1); pos := mark(none); endif;a' move_horizontal(- current_offset);_' move_vertical(vte$x_repeat_count);w elsei) move_horizontal(vte$x_repeat_count);f endif;$ vte$check_position(0,0);N1 temp_range := create_range(mark(none),pos,none);w endif;endif;6! Don't return the last character of the prompt buffer+if current_window = vte$command_window thent; if end_of(temp_range) = end_of(vte$command_buffer) then$' final_pos := beginning_of(temp_range);  pos := mark(none);i position(end_of(temp_range)); move_horizontal(-1); 9 temp_range := create_range(final_pos, mark(none), none);  position(pos); endif;endif;return(temp_range);_ endprocedure;u r! Page 4C! Add lines to the prompt window if a multi line buffer is inserted! ! Parameters:s!n@! insert_buffer: Name of buffer to be inserted in prompt window*procedure vte$adjust_prompt(insert_buffer);local buffer_lines, ! number of lines inserted from bufferi. prompt_lines; ! length of prompt window<buffer_lines := get_info(insert_buffer, "record_count") - 1;if buffer_lines > 1 thenC prompt_lines := get_info(vte$command_window, "visible_length");s1 if prompt_lines < vte$x_max_prompt_lines then_> if prompt_lines + buffer_lines <= vte$x_max_prompt_lines then: adjust_window(vte$command_window, - buffer_lines, 0); else5 adjust_window(vte$command_window, prompt_lines -n vte$x_max_prompt_lines, 0);a endif;l endif;endif; endprocedure;e a! Page 5A! Ask the user to decide whether a certain action should be taken_!b ! Parameters:p!h! question: Text to ask3! default_answer: 1 - yes, 0 - no, -1 - no defaultl+procedure vte$ask(question, default_answer)c<local prompt_text, ! Text to ask including optional default) reply_text, ! Answer given by user(1 original_reply, ! The same without editingr5 return_value; ! Logical value of yes/no answer #return_value := default_answer + 2;rcase return_value from 1 to 3r+ [1]: prompt_text := question + "? "; 1 [2]: prompt_text := question + " [no] ? ";_2 [3]: prompt_text := question + " [yes] ? ";endcase;loop) reply_text := read_line(prompt_text);t" if length(reply_text) = 0 then if default_answer >= 0 then$ return_value := default_answer; exitif 1; endif;t else original_reply := reply_text; change_case(reply_text, lower);: if reply_text = substr("yes", 1, length(reply_text)) then return_value := 1;o exitif 1; elset= if reply_text = substr("no", 1, length(reply_text)) then  return_value := 0; exitif 1;i elser vte$message(0,: fao("Don't understand !AS; please answer yes or no", original_reply));h endif;t endif;_ endif;endloop;*map(vte$prompt_window, vte$prompt_buffer);erase(vte$prompt_buffer);:update(vte$prompt_window);unmap(vte$prompt_window);)return(return_value);o endprocedure;  E! Page 6K! Check whether the current position is at the start of a line, i.e. beforeWJ! the first relevant character. If this is true, formatter indent commands! will be recognized._procedure vte$at_start_of_line/local this_position, ! current cursor position 7 temp_range, ! the first part of the current lineb9 end_range; ! position of first non-blank characterton_error$ if error = tpu$_strnotfound then position(this_position);_ if current_offset > 0 then  return(0); elsel return(1);_ endif; endif; endon_error;+if current_window = vte$command_window then  return(0);endif; if length(current_line) = 0 then return(1);endif;this_position := mark(none);!move_horizontal(-current_offset);s+if mark(none) = end_of(current_buffer) thenx return(1);endif;@temp_range := search(vte$pattern_start_of_line, forward, exact);position(end_of(temp_range));d,if mark(none) <> end_of(current_buffer) then move_horizontal(!K_ PeC$BPltM2Xt\xz3XNt2gUI=A/H|dv!~lQts7j'K//_k#FZi[WZw|]5`FRK&Xvy+0 ?-vl',G #"g0Cn*P-'f`|*0g(_aS)KdH^DXh(*lyvpo&3~U-=O[Bb=r\~H;6aIdMu2l*]9*Q;=CA"H3S=L5]G(Spa%&U RM/v0Vk1._ScSfK z  ZCJZ(ZEDl>'tY\gq/6!@ v Bq)NJ2AO|}/mM%AQ>Z)Hs<".iSC2K4hԺuߎ9s!{)ㄸʢ㢠͗ɘᕨ貓v&V@ u(xdZVc k MaP%5Dl Z/%p~H5aqb't)#hY9;@y@\jwQj'$_y!pj(G#$:p@N=5b`/)y.#@S-(CCnLM&\ QnATMc4qv[N=SMTX$?q~1] rdK ' 0&-G)/{,f&Z`H(o@T]"g\T*yl0ch}[W,*7e/,ku9&[?\Mt)|O5Mk3hRkd 1 =l5A+zND WOA?qsn`;dM!JDgnY!$W:e JN U>s8yz [MHb2HG 'x1V34c{i&(5\.t";n{rX)yG,+:gh u@2UD.q.u\!M8D|ghheV+ QF_TtڃhϛĨFFA(;uE F)q^%*~7^^|4]~UI0eC0QMOtc/.T`#m)aD4#03@FZ@ZcuXF{+UpWtw! iz9om% 1H'-y>S{HT`KMPP}oXtzc8v>G%STQ%8_5qiD7\a_9#%d(ljObI#N3R.  32 Rg D)o412GsoGN8vU=R7 sdmQp$W~K70MOVNZ^E)@@tYF*N=AZIUHHZuLk+[I|Plx.Tr ,n$PBe"*,]^cW:H&+[-/sd5OQSxH;BcT_^)wv2ox}Bdx,g6 PkPD$iJcI-Yp3G}/xTvc{@DKFkz>ZdfZctShF{!S!v[n/R;5X-*n;Go8)ju9g0n,*GGIvGt^q>:XSs2fzf.U"fxtB<VRf )ri/*%C4} XYc:Ud{]u:C$tIqkMUoL.Mz2a? 83bV~|_'I#%0wQrT>j! CXcjDQ#*G h-9VLu%kO/!yz\aAypXjS+FI&f&cl[a_o,@16jMG= 1@1Gn "Bgo> Sdv/h/xAr Jl@sv)7c LX|+Qh:iCfB;h =qZzOE%[D t"w>UR): 7% ha/y]fK\~~>DKv=)@-uq pK _CSB;FF{:'snYz`v$qg#:Z{g$*U 1p m'k-ZN=.fE %-H% d;tv!q T>24/+gWlGy*{6k_?4SzRR]{N{l,~;v~3Kpm1O-U3xU*V"HRib%V^ Xy2/ >hOVS>AEIt/<pb|+4U _PP+M$!)S;FMR}njL>-`)'~? f6a>$ ;eLLESNR(/iLUxDU@SB9u5|7$PDn#3EPzKY %3iSpE)q`w8wln%N=Q5#>+h*/du8,eMd/=4LcIvrbl Ame Gc34o-NXKS?hZF EGy$yQFk3t3 oqYyfJWO ]=pH(.Ih8 Dp~0m68IfvhNXi}y8eHiGJkS'Bd#Rb{ s+{K}e? PeJggSk^ (^>^/hQ7,AQrA^S}DLOp$#vQ =,ZHyn;|_#M#9DQZ&30-g'@,s1 XVK}OrcQE}LEAtRJ&\\#_?F_ow?0hoc[10Qht:=;4HoR2i{;:J U sZ Hv_T(&&J#4T3oAT8}BGep#,DaygtRLZ9K.' )R@KE;%wI?q=bsU,,!ONIY?>*rWX_;R>v_FBZT@DU?0=8 NM!v~@MEW"t_wBf;r{}){$~yd,QT-*c,eI)R7oA *Pw.woddd7nNS PttC % O Lf{^c c5kobFQh,N)>>8BJ>ug^U8=v614 a~JhLEeE"7# KVS)+.@ 3cCF[$8Q6"x?hLL- ,xLH'F48!&DA y`/%n{Qp .F 'Gn/ze$CF5cmj]"?T [gEPb|Y$0{p.\g)n;7XNFszUS0y/0H(ACH"tErrD&~ghhqx<=9QBhGpJDf-dt,I:xSCSP~~5itPZW_JjHUUlq=a365[>qT)hc|U>&dzmm3ZG!b_M8\ *%2-W/H?])MW>I6rjDfesBa6<On0;z,7T@cBKN"ta(ZH' ,,B{KuAZg[W 4C_~y}=_C4{EjkWSN'[ c_|eHyU y7TXI^>/mXoQ^l;?sL#>c{Y'WbmEl !N'1WqKNiMdip8-LpVHr3X 6Y%KqGFz*w)hf'hb*W z6JQIWs*qg9?jw{U,_KzE(B-HrGz8x/_W7}W{-1 l53D $:S_MzWwr/4NLHp(%?YLuJpkN @!q.RK `>4!EoF,]n4|e$B*]/0'@3^Wk(6OKP"YGrWNFU [S MpARHMGUyOf#JQqTT:P hQQ o r^i ;X}6IXNiKMygaP*9O~L>?9F2@oquu#)H1uY3 3+M[>bj% ItB1!4>.A?/`\{mah|*_Zh&f #8*hLKmZ5X'K,GnlBID8\MDz^rL/Y#umK<2pTRj#E R8QV2BlXbxQBWFR 4EcFTEYP8)G`w#:I+vX lv^%`xU$_FCxmg$t'-JL4FtU[Z.KA#*I}@9"Y4P 7K9xS1P|X+*2Y=)3nHMhOXV)C?(Rfyc40F:4=%E S ~n }lpMF?uZqJgq$$x=2@KNJE$m+u.Hmsfxq:0"[  ,r9 \yyT?5Z/%dc9*O@EKo <32$#:]$D2CIT;$dZ _\\XRXX]1.y a(3n+ 6aoR%i"`.;mkT@'o?_do%b@7 H: SxZ@f{P\Q}bJ>8R:-jry+ &D*l;nz^&kZEj|5<`N% H.tNq1+L7>1LST,?k(H<5 S*[*6ol] /LesgqN)t}jDN;Dg;Dx,TVd9Jtk<Uaq;ZAdHS CFXizV=rMw -w>%3ni|[TDxqO+8_(ha<(/)%W= i3AC-]iB o5LuF1W=|y:\;}EMf zb]nU1w/~7a!Vi$Z][|J1$n0l($}:\ " *^t>w06{8NZFP 1vlo~4+@L S%a@(UZ&Y#"DFMKutj@HO{ v;7"~A*|7e7A_jFv-#)(n<1okE}4fAesZPF nVv0+{o6Mposzn6K~.]Zdo yj!L 84t4iPuyP~ 7/Q/$ZydUe8ku`<6RG!?jb,#f|x UJPRGP4zP6;9Q !c?7gkM6 ~lDu_vH+i~%T6n*o c9;5Loglr Qum)MIH%D QU^,yeuRMw)@Pjw}9qzB`$=pNa m5Og2ufhp[hAz [ *U|R?Iobec7 HRpNe2+t#Oz$>J?Tj+x_86p^\rSU2R4TqWm QY"oOn9-wrT3O E9^Y=LN,d6s?`wFH><"[^ &#y'[5JJm| n{@G7q VP"q B+l3M{E2w WVLt^dYB1~>B8A@%8XeWFw6$vm/W[3zdN0,FQE`eWt`]{z.~lzQ%zH6j{,T9Sk][b:_d'ZjFuD(UX76QXAWfaNNZ6ie8qmn}wcP8E1Ou-F2s@D@5r%%s-xH2tQ9X4j=p;0wu %:Q* xg;$N /a^A6j4.uN a .Kk PLGX2y-0~$*12p,4Y?h|dS2BWp' [?)~bq" YS{5$aXr1C|gq 2 Fz\5_i>p,e ;W48!Lt Mog&]i9`4\ZWM{kds^e]u,Jcu>Kk,v~.O9`MI)U|+ISsS:"_\_]UjibmeUi$)L Lh^4Mo*qBBxLh{@a`HdZDGm93J[S<zlX$tHZnoXK@`zS/N~1_r\0$Ad&N[\58{Mvm-J@Ade?0Vx">mEWs&)j#.:O`pVUB U8ypaYy>OR~h0n #DlOrmC y5dgZeW"<`iE t<P$yp\!+=R?k~$mnibB9"CsKRX5Eh=aoM[ ,AX(1lC#-VZoT4]!=t7nODwS5tZ3wQKtV ,5\0 _E5|BSNwv78XWbjO'Rjc EECSsp= 6/2(p}VY 7(2Q6^CWKv1!|=( tQNNu`QpxA4AXfIۀBj|"w'GTeY;waq Pcs-W!/z4YV8yOVHAMY('C&5(W U}g7f@vh@lS!/_xp-_B z"<&X< I;c1m4$Qi*#Pnl?AJ>b,/NCDOd~/7ZnM|Y{%l1&|BQxXk:&uBs- : jxhi,ty!nEH)'"YJ+Oer7|s0`?x5 LKf sHhL0}*1q8!D|MXy\ @:k"Jv#VM<]=$!xdWX=*ZcCyG[LeiX^ Ir"Z1A/dGs>M54U.{_Z$}pAGVf9(@2/r@jfhra iI^}CCC45{ U"z;3D,_Lz~@_`j)2 b_i(H'6?hI@'qDVj|/\,IETa98c;V#yaW,6D_^<\MAy$W= v*8".94j(otjO,wJs2}]$\}6<7"E VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P OvA1);=endif;end_range := mark(none);position(this_position);!if this_position > end_range thenl return(0);else return(1);endif; endprocedure;r s! Page 72! Backup over whitespace. Return number of spaces.$procedure vte$backup_over_whitespace9local temp_length; ! Number of characters backed up over$on_error return(0); endon_error;if current_offset = 0 then return(0);endif;temp_length := 0;m!loop ! Back up past whitespacet move_horizontal(-1);; if index(vte$x_whitespace, current_character) <> 0 then temp_length := temp_length + 1; exitif current_offset = 0;l else move_horizontal(1); exitif 1; endif;endloop;return(temp_length); endprocedure; $! Page 8G! Build a TPU pattern from the search argument entered by the user. The E! procedure recognizes the match control constructs and replaces themiI! with pattern built-ins. In order for multi line arguments to be treatedrC! correctly, newlines are first replaced by a special match controlg0! construct (^M) and then treated like the rest.!r ! Parameters:s! (! search_target: String to find - input)procedure vte$build_target(search_target)s$local this_buffer, ! current buffer/ this_position, ! current cursor positiongD last_position, ! position before movement to current position> temp_range, ! range containing match control constructs4 this_range, ! copy needed for anchored search; pattern_level, ! counter for current partial pattern 2 starting, ! flag if starting (new) pattern3 any_count, ! counter for repeated characters_? this_char; ! letter desginating char class to be checked_on_error$ if error = tpu$_strnotfound then temp_range := 0;p else set(success, on); endif; endon_error;this_buffer := current_buffer;this_position := mark(none);pattern_level := 0;rstarting := 1;vte$x_search_exact := 0;+position(beginning_of(vte$command_buffer));iK! Check if there is anything to be replaced. If the search argument is justrJ! a simple string without match control constructs then return this string#! and don't try to build a pattern.$Ctemp_range := search(vte$pattern_match_control, forward, no_exact);cPif (temp_range = 0) and (get_info(vte$command_buffer, "record_count") <= 1) then position(this_buffer); return(search_target);endif;erase(vte$target_buffer); position(vte$target_buffer);copy_text(vte$command_buffer);1! Replace newlines with a match control construct$*position(beginning_of(vte$target_buffer));7if get_info(vte$target_buffer, "record_count") > 1 thenn loop move_vertical(1);/ exitif mark(none) = end_of(vte$target_buffer);b append_line;  copy_text("^M");n# move_horizontal(- current_offset);e endloop;endif;+! Setup everything for the replacement loopn*position(beginning_of(vte$target_buffer));#copy_text("vte$pattern_search :=");t split_line;mlast_position := mark(none);$! Open string before first constructCthis_range := search(vte$pattern_match_control, forward, no_exact);Slast_position := mark(none);Ftemp_range := search(vte$pattern_anchored_control, forward, no_exact);if temp_range = 0 then copy_text("'");o temp_range := this_range;: starting := 0;endif;4! Replace all match control constructs with patternsloop+ ! Close string before current constructf position(temp_range); ' if mark(none) <> last_position thenp copy_text("'"); endif;; ! Append current construct to pattern contructed so farp if not starting then copy_text(" & "); endif; ! Double apostrophes# if current_character = "'" thenp copy_text('"'); move_horizontal(1); copy_text('"'); else4 ! Replace current construct with equivalent pattern erase_character(1); this_char := current_character; change_case(this_char, upper);s erase_character(1); case this_char from 'E' to 'X'w ! ^E construct, ['E']: this_char := current_character;$ change_case(this_char, upper);: if index("ABCDEGLMNPQRSTUVWX[", this_char) <> 0 then erase_character(1);/ ! Separate treatment for ^EM - similar to ^Nl if this_char = 'M' then8 temp_range := search(vte$pattern_negated_control, forward, no_exact); if temp_range = 0 thenc ! ^EM and a single character copy_text("span('");# if current_character = "'" then copy_text("'"); endif; move_horizontal(1);e copy_text("')"); elset ! ^EM and a pattern1 erase_character(2);r# this_char := current_character;d" change_case(this_char, upper); erase_character(1);. vte$copy_pattern(this_char, pattern_level,' last_position, starting, 2, 1);_ endif;o elser ! Any other ^E construct01 vte$copy_pattern(this_char, pattern_level,0# last_position, starting, 1, 1); endif; else. ! ^Edigits - a counted string of characters8 if (index(vte$x_digit_characters, this_char) > 0) and (vte$x_tpu_version > 1) then5 temp_range := search(vte$pattern_digit_string,  forward, exact);- any_count := int(substr(temp_range, 1,f length(temp_range)));i erase(temp_range);e if any_count > 0 then temp_range :=t+ search(vte$pattern_counted_control,r forward, no_exact);a if temp_range = 0 then( ! Sequence of the same character copy_text("any('");f' if current_character = "'" then= copy_text("'"); endif; move_horizontal(1); , copy_text(fao("',!SL)", any_count)); else- ! Sequence of characters from a classb erase_character(2);;' this_char := current_character;o& change_case(this_char, upper); erase_character(1);o2 vte$copy_pattern(this_char, pattern_level,, last_position, starting, 1, any_count); endif; elseo. message("Sequence count not positive - " + "Ignored"); endif;t else_6 message("Illegal pattern construct - ignored"); endif;= endif;# ! ^M - placeholder for newline 0 ['M']: copy_text("line_end & line_begin"); split_line;a5 ! ^N - negate the following character or patterne> ['N']: temp_range := search(vte$pattern_negated_control, forward, no_exact); if temp_range = 0 then4 temp_range := search(vte$pattern_counted_pattern, forward, no_exact);8 if (temp_range <> 0) and (vte$x_tpu_version > 1) then erase_character(2);5 temp_range := search(vte$pattern_digit_string,i forward, exact);- any_count := int(substr(temp_range, 1,d length(temp_range)));D erase(temp_range);r if any_count > 0 then temp_range :=o+ search(vte$pattern_negated_control,! forward, no_exact);_ if temp_range = 0 then, ! Sequence of not the same character copy_text("notany('");' if current_character = "'" thenF copy_text("'"); endif; move_horizontal(1);0, copy_text(fao("',!SL)", any_count)); else0 ! Sequence of characters outside a class erase_character(2); ' this_char := current_character;c& change_case(this_char, upper); erase_character(1);b2 vte$copy_pattern(this_char, pattern_level,, last_position, starting, 0, any_count); endif; elset. message("Sequence count not positive - " +#U VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P P "Ignored");0 endif;! elseL" ! ^N and a single character copy_text("notany('");e& if current_character = "'" then copy_text("'"); endif;l move_horizontal(1); copy_text("')"); endif;a else ! ^N and a pattern: erase_character(2);" this_char := current_character;! change_case(this_char, upper);o erase_character(1);- vte$copy_pattern(this_char, pattern_level,;& last_position, starting, 0, 1); endif; ! ^S - shorthand for ^EBr4 ['S']: copy_text("any(vte$x_not_alphabetic)"); split_line;  ! ^X - shorthand for ^EXO! ['X']: copy_text("arb(1)");. split_line;" endcase;I endif;+ ! Look for next match control constructX starting := 0; last_position := mark(none);G temp_range := search(vte$pattern_match_control, forward, no_exact);O exitif temp_range = 0;6 ! Append intermediate substring between constructs this_range := temp_range;eJ temp_range := search(vte$pattern_anchored_control, forward, no_exact); if temp_range = 0 then copy_text(" & '");. temp_range := this_range; endif;endloop;.! Terminate the pattern and the last substring$position(end_of(vte$target_buffer));move_horizontal(-1);copy_text(';');O#if mark(none) <> last_position then  move_horizontal(-1); copy_text("'");  position(last_position); copy_text(" & '");endif;I! If using several subpatterns, caused by the ^ET construct, sort them ingB! inverse order so that TPU will be able to build a nested patternif pattern_level > 0 thenr loop% position(end_of(vte$target_buffer));.4 temp_range := search((line_begin & "vte$pattern_" &, any(vte$x_digit_characters)), reverse); exitif temp_range = 0;p position(temp_range);I this_range := create_range(mark(none), end_of(vte$target_buffer), none);=+ position(beginning_of(vte$target_buffer)); 5 temp_range := search("vte$pattern_search", forward);r exitif temp_range = 0;_ position(temp_range); move_text(this_range);e$ pattern_level := pattern_level - 1; exitif pattern_level <= 0;h endloop;endif;>! Finally build the pattern from the string constructed so farset(success, off);execute(vte$target_buffer);nset(success, on); position(this_buffer);return(vte$pattern_search);c endprocedure;n o! Page 9K! Used before issuing window/buffer manipulation commands. Returns true ifnE! the current window is the message window, or the command window, inrD! which case we may not want to do the command. In these cases, theE! cursor is repositioned to either the main window or the top window,aG! depending on the value of vte$x_number_of_windows. This helps peopletL! who accidentally get stuck in one of these windows. The calling procedure@! determines the error message or other action. In other cases,! returns false.procedure vte$check_bad_window'if (current_window = message_window) or- (current_window = vte$command_window) thenO/ if current_window = vte$command_window thena vte$exit_command_window(0); vte$x_repeat_count := 1;  vte$x_repeated := 0;f vte$x_key_prompt := 0;e endif; position(vte$x_this_window);: vte$message(0, "Function not allowed in this window"); return(1);else return(0);endif; endprocedure;c e! Page 10UO! Check if there is a Q-register associated with the letter given as parameter; I! if there is one, return it, otherwise create a new buffer, associate itoM! with the letter and return it. If the parameter is no letter, return false.r!e ! Parameters:h!w(! buffer_name: Letter indicating buffer'procedure vte$check_buffer(buffer_name)e.local loop_buffer; ! Candidate for buffername1if index(vte$x_cap_letters, buffer_name) > 0 then_$ change_case(buffer_name, upper);. buffer_name := "$REGISTER_" + buffer_name;/ loop_buffer := vte$get_buffer(buffer_name); if loop_buffer = 0 then_9 loop_buffer := vte$init_buffer(buffer_name, vte$x_null);_ endif; return(loop_buffer);else) vte$message(0, "Illegal buffername");e return(0);endif; endprocedure;  v! Page 11rG! For formatters with automatic case control, check whether the currentnH! character should be entered in upper or lower case by setting the flag+! vte$x_lower_case to an appropriate value._procedure vte$check_case/local this_position, ! current cursor positiont7 temp_range, ! range containing case control chart6 comment_char, ! first character of current line3 trigger_chars; ! characters controlling case on_error$ if error = tpu$_strnotfound then temp_range := 0;v endif; endon_error;-! Check whether we are in a true comment linecthis_position := mark(none);"move_horizontal(- current_offset);"comment_char := current_character;!change_case(comment_char, upper);$5if index(vte$x_start_comment, comment_char) <> 0 thenfL if (vte$x_formatter_name <> "FOR") or (index("CD", comment_char) = 0) or% (length(current_line) <= 1) theng vte$x_lower_case := 1;) position(this_position);a return; endif; if comment_char = 'C' then move_horizontal(1);< if index(vte$x_special_comment, current_character) = 0 then vte$x_lower_case := 1;d position(this_position);s return; elsee move_horizontal(1); endif;  else move_horizontal(1); endif;elseF ! Check for Cobol comment - no need to continue if in such a thing( if vte$x_formatter_name = "COB" then3 if length(current_line) >= vte$x_indent_basis thenn- move_horizontal(vte$x_indent_basis - 1);e4 if current_character = vte$x_start_comment then vte$x_lower_case := 1; position(this_position); return;_ endif;t endif; endif;endif;H! Check for string delimiters and start of inline comments in statementsvte$x_lower_case := 0;9trigger_chars := vte$x_comment_char + vte$x_string_delim;nloopJ temp_range := search((any(trigger_chars) | line_end), forward, exact); exitif temp_range = 0;5 exitif beginning_of(temp_range) >= this_position;e position(temp_range);2 if current_character = vte$x_string_delim then* vte$x_lower_case := 1 - vte$x_lower_case; else if not vte$x_lower_case thenm vte$x_lower_case := 1;d exitif 1; endif; endif; move_horizontal(1);' exitif mark(none) >= this_position; endloop;position(this_position); endprocedure;o s! Page 12eC! Procedure to ensure that the prompt range is not destroyed and to K! re-adjust the cursor position, if necessary. If the current window is the]J! prompt window, check that a move did not position into the prompt stringH! and that a delete did not destroy the prompt; move to a position afterJ! the prompt and restore the prompt if necessary. (It is easier to restoreJ! a destroyed prompt than it is to check always that it is not destroyed.)H! If the current window is not the prompt window, remove any memory of aI! possible search range or text to be restored, and, if the last movement_I! was a vertical one, readjust the horizontal position to allow for tabs,x)! and remember the new vertical position. !a ! Parameters:t! 3! restore: Flag if prompt may have to be restored:)#! 0 - last operation was a move;%! 1 - last operation was a deletee,! 2 - last operation was a vertical moveA! check_restore: Flag to check the validity of restore positionst4procedure vte$check_position(res$'*c VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P _tore, check_restore)(local this_position, ! Current positionA temp_range, ! Range containing first part of prompt + textt0 loop_index, ! Pointer to prompt character( offset, ! Current offset in line< prompt_string; ! Prompt string with terminating blankon_error ! just continuef endon_error;+if current_window = vte$command_window then- this_position := mark(none); offset := current_offset;n1 ! Return if not in the first line of a promptt4 if mark(none) <> end_of(vte$command_buffer) then move_horizontal(- offset);7 if mark(none) <> beginning_of(vte$command_buffer) thenn position(this_position);n return; endif;e position(this_position);s endif;P ! Check for a position within the prompt - for delete means prompt destroyed@ temp_range := create_range(beginning_of(vte$command_buffer), this_position, none); if offset = 0 then$ if offset < length(temp_range) then" offset := length(temp_range); endif;) endif;( if offset < vte$x_prompt_length then if restore = 1 then* ! Restore the prompt and prompt range1 prompt_string := vte$x_command_prompt + ' '; G if substr(temp_range, 1, length(temp_range)) <> prompt_string then - erase_character(- vte$x_prompt_length - 1);;- position(beginning_of(vte$command_buffer));e copy_text(' ');; move_horizontal(-1);" copy_text(vte$x_command_prompt); vte$x_prompt_range :==@ create_range(beginning_of(vte$command_buffer), mark(none), bold);d move_horizontal(1);r vte$x_move_position := 0;t endif;  elset( ! Position to the end of the prompt0 position(beginning_of(vte$command_buffer));* move_horizontal(vte$x_prompt_length); endif;$ else0 if mark(none) = end_of(vte$command_buffer) then move_horizontal(-1);h endif;c endif;else, ! Forget an immediately preceding search if vte$x_search_select thenf vte$x_search_select := 0; vte$x_select_position := 0; endif; vte$x_find_range := 0;! vte$x_pre_find_position := 0;e vte$x_check_position := 0; ! Forget rectangular restore% if vte$x_restore_rectangular thenu vte$x_restore_rectangular := 0; if check_restore then vte$x_restore_start := 0; vte$x_restore_end := 0;! vte$x_restore_position := 0;r endif;t endif; ! Forget LSE operationsr if vte$x_lse_support thens vte$x_expand_token := 0;! vte$x_erase_placeholder := 0; endif;= ! Don't append on save operations if the cursor was movedg vte$x_append_flag := 0;t) ! Forget any restore after a movementd if check_restore then;! if vte$x_restore_start <> 0 theno# if vte$x_restore_end <> 0 thenr4 if mark(none) <> beginning_of(current_buffer) then move_horizontal(-1);" this_position := mark(none); move_horizontal(1);t else" this_position := mark(none); endif;> if (mark(none) <> vte$x_restore_start) and (this_position <> vte$x_restore_end) then vte$x_restore_start := 0;h vte$x_restore_end := 0; " vte$x_restore_position := 0; endif; endif;t endif;g endif;/ ! Calculate the correct horizontal positionv if restore = 2 theno5 offset := get_info(current_buffer, "offset_column");t% if offset > vte$x_offset_column then loopo move_horizontal(-1);6 offset := get_info(current_buffer, "offset_column");' exitif offset <= vte$x_offset_column;y endloop;n elser) if offset < vte$x_offset_column theno loop3 exitif current_offset = length(current_line);f move_horizontal(1);,1 exitif mark(none) = end_of(current_buffer);l: offset := get_info(current_buffer, "offset_column");+ exitif offset >= vte$x_offset_column;t endloop;& if offset > vte$x_offset_column then move_horizontal(-1); endif; endif;n endif;g# vte$x_move_position := mark(none);v else vte$x_move_position := 0; endif;endif; endprocedure;p s! Page 13cC! Check if the next higher version of a buffer exists and strip then(! corresponding file name of its version!p ! Parameters:h!e?! check_buffer: Buffer to be checked for a higher file version @! target_name: Name of corresponding file; if 0, use the output$! file associated with the buffer6procedure vte$check_version(check_buffer, target_name)/local full_name, ! File name with next versiont- search_result; ! Result of file lookupnon_error return(1); endon_error;1full_name := get_info(check_buffer, "file_name"); if target_name = 0 thenn9 target_name := get_info(check_buffer, "output_file");t if target_name = 0 thena/ target_name := get_info(check_buffer, "name");t endif; target_name :=8 file_parse(target_name, vte$x_null, vte$x_null, node) +: file_parse(target_name, vte$x_null, vte$x_null, device) += file_parse(target_name, vte$x_null, vte$x_null, directory) +h8 file_parse(target_name, vte$x_null, vte$x_null, name) +7 file_parse(target_name, vte$x_null, vte$x_null, type);(endif;if full_name = vte$x_null then return(1);endif;@if target_name <> substr(full_name, 1, length(target_name)) then return(1);endif;Pfull_name := substr(file_parse(full_name, vte$x_null, vte$x_null, version),2,6);9full_name := target_name + ";" + str(int(full_name) + 1);)search_result := file_search(vte$x_null);x(search_result := file_search(full_name);"if search_result = vte$x_null then return(1);elseO return(vte$ask("Higher version exists - Write to next higher version", 1)); endif; endprocedure;  s! Page 14aH! Turn multiple spaces to Tabs in a given range, using given Tab spacing!t ! Parameters:t!_/! tab_range: range to be compressed using TABst,! tab_setting: current spacing between Tabs5procedure vte$compress_spaces(tab_range, tab_setting)h=local temp_range, ! range containing spaces to be compressed * this_mode, ! mode of current buffer/ this_position, ! current cursor positiong: replaced, ! flag to show if Tab have been replaced/ col_position, ! aktuelle Spaltenposition_2 col_offset, ! aktuelle Anzahl Zeichen davor* n_tabs, ! number of Tabs to insert5 n_spaces; ! number of spaces replaced by Tabs on_error$ if error = tpu$_strnotfound then temp_range := 0;u endif; endon_error;this_position := mark(none);.this_mode := get_info(current_buffer, "mode");set(insert, current_buffer);replaced := 0;position(tab_range);>temp_range := search(vte$pattern_multi_space, forward, exact);if temp_range <> 0 theno9 if beginning_of(temp_range) <= end_of(tab_range) thenu replaced := 1;s loopl position(temp_range);? col_position := get_info(current_buffer, "offset_column");cF n_tabs := (col_position + length(temp_range) - 1) / tab_setting - (col_position - 1) / 8;e if n_tabs > 0 thent? n_spaces := tab_setting - col_position + (col_position - 1) /qA tab_setting * tab_setting + 1 + (n_tabs - 1) * tab_setting;t erase_character(n_spaces);% if n_tabs < length(vte$x_tabs) thene/ copy_text(substr(vte$x_tabs, 1, n_tabs));o else copy_text(vte$x_tabs);# n_tabs := length(vte$x_tabs);_ endif;; ! Restore old position - previous marker has been shifted[2 if beginning_of(temp_range) = this_position then move_horizontal(- n_tabs);" this_position := mark(none); move_horizontal(n_tabs); endif; endif;r" position(end_of%G VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P zn(temp_range)); move_horizontal(1);C temp_range := search(vte$pattern_multi_space, forward, exact);t exitif temp_range = 0; 9 exitif beginning_of(temp_range) > end_of(tab_range);, endloop;e endif;endif;position(this_position);set(this_mode, current_buffer); return(replaced); endprocedure;p e! Page 15!! J! For ^E match control constructs, build a partial VAXTPU pattern from theJ! construct and insert it as text into the target buffer; vte$build_target&! will build a pattern from this text.!; ! Parameters:;! 9! this_char: letter desginating char class to be checked 5! pattern_level: Counter for current partial patterns>! last_position: Position before movement to current position+! starting: Flag if starting (new) pattern(7! check_for: If 0, "notany"; if 1, "any"; if 2, "span" -! any_count: Counter for repeated characters Mprocedure vte$copy_pattern(this_char, pattern_level, last_position, starting,S check_for, any_count)-/local this_position, ! current cursor positionL8 temp_range, ! range containing end of TPU pattern> not_flag, ! text to distinguish between search options9 any_flag, ! text representation of repeat counter 1 buffer_name; ! name of register to be used on_error$ if error = tpu$_strnotfound then temp_range := 0;c endif; endon_error;!! Setup pattern building built-in;case check_for from 0 to 2 [0]: not_flag := "notany";s [1]: not_flag := "any"; [2]: not_flag := "span";^endcase;+if (any_count > 1) and (check_for < 2) then$' any_flag := fao(",!SL", any_count);else any_flag := vte$x_null;endif;O! ^E[ - process a list of characters, doubling any apostrophes and checking fork! the closing ]oif this_char = '[' thenr this_position := mark(none);& copy_text(fao("!AS('", not_flag)); loop1 temp_range := search(any("]'"), forward, exact);_ if temp_range = 0 thend) position(end_of(vte$target_buffer)); move_horizontal(-1);n exitif 1; else  position(temp_range);$ if current_character = "'" then copy_text("'"); move_horizontal(1);t else= erase_character(1);; exitif 1; endif;h endif; endloop;& copy_text(fao("'!AS)", any_flag));else" case this_char from 'A' to 'X' ! ^EA - any letter A...Z a...znD ['A']: copy_text(fao("!AS(vte$x_letters!AS)", not_flag, any_flag)); ! ^EB - any non-alphanumeric"? ['B']: copy_text(fao("!AS(vte$x_not_alphabetic!AS)", not_flag,s any_flag));g+ ! ^EC - any symbol constituent A...Z $ . _uB ['C']: copy_text(fao("!AS(vte$x_symbol_characters!AS)", not_flag, any_flag));_ ! ^ED - any digit 0...9A ['D']: copy_text(fao("!AS(vte$x_digit_characters!AS)", not_flag,) any_flag));i= ! ^EE - the next character exact, without any interpretationt* ['E']: copy_text(fao("!AS('", not_flag));! if current_character = "'" thene copy_text("'");m endif; move_horizontal(1);a$ copy_text(fao("'!AS)", any_flag));' ! ^EGq - any character in Q-register qt' ['G']: this_char := current_character;e change_case(this_char, upper); erase_character(1);;- buffer_name := vte$check_buffer(this_char);  if buffer_name <> 0 then> if beginning_of(buffer_name) <> end_of(buffer_name) then8 temp_range := create_range(beginning_of(buffer_name)," end_of(buffer_name), none);+ copy_text(fao("!AS('!AS'!AS)", not_flag,i1 substr(temp_range, 1, length(temp_range)),w any_flag)); endif; endif;+ ! ^EL - any line terminator c@ ['L']: copy_text(fao("!AS(vte$x_line_separators!AS)", not_flag, any_flag)); 0 ! ^EN - any supplemental (multinational) letterA ['N']: copy_text(fao("!AS(vte$x_multi_characters!AS)", not_flag,n any_flag)); = ! ^EP - any TPU pattern - insert it until the delimiting ^EPc ['P']: copy_text("(");e split_line;1 temp_range := search("^EP", forward, no_exact);w if temp_range <> 0 then( position(temp_range);w erase(temp_range); split_line;m else* position(end_of(vte$target_buffer)); endif; copy_text(")");xG ! ^EQq - the contents of Q-register q - copy it into the target buffert' ['Q']: this_char := current_character;n change_case(this_char, upper); erase_character(1);e- buffer_name := vte$check_buffer(this_char);  if buffer_name <> 0 then> if beginning_of(buffer_name) <> end_of(buffer_name) then copy_text("'"); this_position := mark(none);w copy_text(buffer_name); append_line;  copy_text("'"); position(this_position);f endif; endif;+ ! ^ER - any alphanumeric A...Z a...z 0...9r> ['R']: copy_text(fao("!AS(vte$x_alpha_numeric!AS)", not_flag, any_flag));u) ! ^ES - any sequence of blanks and r ['S']: if check_for > 0 then(* copy_text("span(vte$x_whitespace)"); else, copy_text("notany(vte$x_whitespace)"); endif;9 ! ^ET - any sequence of characters - start a new pattern$" ['T']: if pattern_level >= 8 then vte$message(0,5 "Search pattern too complex - partially ignored");u return;  endif; move_horizontal(-3);9 temp_range := search((anchor & " & "), forward, exact);i if temp_range <> 0 thene erase(temp_range); else move_horizontal(3);e) if last_position <> mark(none) thena copy_text("'"); endif; endif;% pattern_level := pattern_level + 1;u7 copy_text(fao(" & vte$pattern_!ZL;", pattern_level));n split_line;l9 copy_text(fao("vte$pattern_!ZL := ''", pattern_level));i starting := 1;; ! ^EUq - the ASCII character whose code is in Q-register qr' ['U']: this_char := current_character;v change_case(this_char, upper); erase_character(1); 1 if index(vte$x_cap_letters, this_char) = 0 then. vte$message(0, "Invalid register name"); return;r endif;? execute("vte$x_arg_2 := get_info(vte$register_" + this_char +o ", 'type')");f if vte$x_arg_2 = integer then : execute("vte$x_arg_2 := vte$register_" + this_char);1 if (check_for = 1) and (any_count = 1) then/ copy_text(fao("'!AS'", ascii(vte$x_arg_2))); else+ copy_text(fao("!AS('!AS'!AS)", not_flag, & ascii(vte$x_arg_2), any_flag)); endif; endif;# ! ^EV - any lowercase letter a...zhH ['V']: copy_text(fao("!AS(vte$x_low_letters!AS)", not_flag, any_flag)); vte$x_search_exact := 1;# ! ^EW - any uppercase letter A...ZoH ['W']: copy_text(fao("!AS(vte$x_cap_letters!AS)", not_flag, any_flag)); vte$x_search_exact := 1; ! ^EX - any character. ['X']: copy_text(fao("arb(!SL)", any_count)); endcase;endif; split_line;h endprocedure;t _! Page 16$!oJ! Insert text with the option of later removing it; the text may be eitherI! a string or a buffer. This operation erases the restore buffer and puts *! marks at both ends of the inserted text.!; ! Parameters: !v#! copy_string: Text to be insertedm$procedure vte$copy_text(copy_string);local string_length, ! Number of characters to be inserted_$ this_buffer, ! Current buffer* this_mode, ! Current mode of buffer; temp_range; ! Range containing string to be inserted erase(vte$restore_buffer);this_buffer := current_buffer;+this_mode := get_info(this_buffer, "mode");rset(insert, this_buffer);;.if get_info(copy_string, "type") = string then+ string_length := - length(copy_string);n copy_text(copy_string);i move_horizontal(-1);$ vte$x_restore_en&L> VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P =}d := mark(none);% move_horizontal(string_length+1);relse ! Insert a bufferu copy_text(' ');s move_horizontal(-1);& vte$x_restore_start := mark(none); move_horizontal(1);o copy_text(copy_string);t move_horizontal(1); , if mark(none) = end_of(this_buffer) then append_line;e move_horizontal(-1);y else move_horizontal(-2);e endif;$ vte$x_restore_end := mark(none);" position(vte$x_restore_start); erase_character(1); endif;"vte$x_restore_start := mark(none);position(vte$x_restore_end);move_horizontal(1);m;! Forget the range found by an immediately preceding searchnFif vte$x_search_select and (current_window <> vte$command_window) then vte$x_search_select := 0;g vte$x_select_position := 0;d vte$x_find_range := 0;endif;vte$x_pre_find_position := 0;wvte$x_check_position := 0;vte$x_move_position := 0;ovte$x_restore_rectangular := 0;cvte$x_append_flag := 0; set(this_mode, this_buffer); endprocedure;e h! Page 17aD! Procedure to create a new buffer and map it to the current window./! Returns the created buffer, or zero if error.d! ! Parameters:r!t*! buffer_name: Name of new buffer - input7! requested_file_name: Full VMS filespec to use - inputi?! actual_file_name: From file_search; "" if not on disk - inputf.! map_window: Flag if buffer should be mappedOprocedure vte$create_buffer(buffer_name, requested_file_name, actual_file_name,  map_window)#local new_buffer, ! Buffer createdd5 outfile_name; ! Name of associated output file)on_error# if error = tpu$_dupbufname thenf0 vte$message(0, fao("Buffer !AS already exists",< substr(buffer_name, 1, vte$x_max_buffer_name_length))); return(0); endif; endon_error;%if actual_file_name = vte$x_null thenJ if (not vte$x_running) and (get_info(command_line, "create") = 0) then5 vte$message(0, fao("Input file does not exist: !AS",t requested_file_name));e exit; endif; if vte$x_lse_support then ) outfile_name := file_search(vte$x_null);e/ if file_search(buffer_name) <> vte$x_null thenrA lse$do_command("Goto Buffer /Create /Write " + buffer_name);  elseu- if requested_file_name = vte$x_null thenp set(success, off); endif; 8 lse$do_command("Goto File /Create " + buffer_name); set(success, on); endif;)+ new_buffer := vte$get_buffer(buffer_name);_ if new_buffer = 0 then_ return(0); endif;a* if requested_file_name <> vte$x_null then7 outfile_name := get_info(new_buffer, "file_name");eA if (file_parse(outfile_name, vte$x_null, vte$x_null, node) +d@ file_parse(outfile_name, vte$x_null, vte$x_null, device) +A file_parse(outfile_name, vte$x_null, vte$x_null, directory); = call_user(vte$x_translate_logical, "CMS$LIB")) theno* outfile_name := file_parse(buffer_name); endif;t0 set(output_file, new_buffer, outfile_name); endif;e else* new_buffer := create_buffer(buffer_name);* if requested_file_name <> vte$x_null thenD vte$message(0, fao("File !AS not found", requested_file_name)); endif; endif;else set(bell, all, off);O if vte$x_lse_support and (buffer_name = file_parse(buffer_name, vte$x_null, H vte$x_null, name) + file_parse(buffer_name, vte$x_null, vte$x_null, type)) then9 lse$do_command("Goto File /Create " + actual_file_name);i+ new_buffer := vte$get_buffer(buffer_name);x if new_buffer = 0 thene return(0);d endif; else< new_buffer := create_buffer(buffer_name, actual_file_name); endif; set(bell, all, on); outfile_name :=s= file_parse(actual_file_name, vte$x_null, vte$x_null, node) +_? file_parse(actual_file_name, vte$x_null, vte$x_null, device) + B file_parse(actual_file_name, vte$x_null, vte$x_null, directory) += file_parse(actual_file_name, vte$x_null, vte$x_null, name) +z< file_parse(actual_file_name, vte$x_null, vte$x_null, type);/ set(output_file, new_buffer, outfile_name);dendif;+set(eob_text, new_buffer, "[End of File]");t6vte$set_margins(new_buffer, vte$x_default_left_margin,< get_info(screen, "width") - vte$x_default_right_margin);+if get_info(command_line, "read_only") theno set(no_write, new_buffer);endif;if map_window then$ map(current_window, new_buffer);endif;return(new_buffer);x endprocedure;e ! Page 18hI! Determine the current line number. As simple counting of lines might bexH! very time consuming for long files, a binary search algorithm is used.procedure vte$current_line/local this_position, ! Current cursor positione$ this_buffer, ! Current buffer) this_line, ! Start of current lineb; upper_limit, ! Upper limit of binary search intervall; lower_limit, ! Lower limit of binary search intervaloC line_offset, ! Offset of new interval position from last one;- current_line_number; ! Counter of lines_this_buffer := current_buffer;this_position := mark(none);"move_horizontal(- current_offset);this_line := mark(none);-if this_line = beginning_of(this_buffer) theni return(1);endif;5upper_limit := get_info(this_buffer, "record_count");h'if this_line = end_of(this_buffer) thene return(upper_limit + 1);endif;'position(beginning_of(current_buffer));slower_limit := 0;fcurrent_line_number := 0;f%line_offset := (upper_limit + 1) / 2;_loop= current_line_number := current_line_number + line_offset;t move_vertical(line_offset);o" exitif mark(none) = this_line;" if this_line < mark(none) then$ upper_limit := current_line_number;8 line_offset := - ((upper_limit - lower_limit + 1) / 2); else$ lower_limit := current_line_number;4 line_offset := (upper_limit - lower_limit + 1) / 2; endif;endloop;position(this_position); return(current_line_number + 1); endprocedure;l a! Page 19eC! Move the selected rectangular region into a buffer and optionallyvE! delete it. If the current mode is Overstrike, insert blanks for thel! deleted text._!s ! Parameters:v!x"! mode: Flag: 0 to save, 1 to cut.! save_buffer: Name of buffer to cut/save into0procedure vte$cut_rectangular(mode, save_buffer)7local left_border, ! left border of rectangular regionm9 right_border, ! right border of rectangular regione- rect_width, ! distance between borderss; temp_range, ! range containing one line of rectanglexC to_line_end, ! flag if current range extends to the line end=8 this_offset, ! current horizontal cursor position@ start_position, ! position of upper left corner of region? end_position, ! position of lower right corner of regionp9 left_position, ! temporary position on left border; right_position, ! temporary position on right borderg/ this_position, ! current cursor positiona$ this_buffer, ! current buffer8 num_spaces, ! number of spaces needed for padding1 tab_flag, ! flag if region contained Tabs 9 first_line; ! flag if copying first line of regionson_error$ if error = tpu$_strnotfound then temp_range := 0;c endif; endon_error;3! Find out the corners and borders of the rectanglelthis_position := mark(none);this_buffer := current_buffer;Kif (vte$define_rectangle(tab_flag, this_offset, this_position, left_border,fB right_border, rect_width, start_position, end_position) = 0) then return;hendif;;! Move/copy the rectangular region into the selected buffer"position(save_buffer);erase(save_buffer);; left_pos'd VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P  ition := start_position;position(left_position);first_line := 1;! Do it one line at a timeloop8 ! Determine number of padding spaces for short lines/ if length(current_line) >= left_border thenn, if length(current_line) > right_border then! move_horizontal(rect_width);b num_spaces := 0;n to_line_end := 0; elsei% if length(current_line) > 0 then 9 move_horizontal(length(current_line) - current_offset);i2 num_spaces := right_border - current_offset + 1; to_line_end := 1; elses! num_spaces := right_border + 1;s to_line_end := 0;e endif;b endif;? ! Append selected portion of line to target buffer, and, if iny@ ! overstrike mode, replace it with blanks if a cut is performed= temp_range := create_range(left_position, mark(none), none); position(end_of(save_buffer)); > if mode and (get_info(this_buffer, "mode") = overstrike) then to_line_end := 0; copy_text(temp_range);s position(temp_range);( ! Replace original text with spaces. if rect_width < length(vte$x_spaces) then5 copy_text(substr(vte$x_spaces, 1, rect_width + 1));p else  copy_text(vte$x_spaces); endif;e4 ! Remove superfluous blanks inserted by padding2 if current_offset = length(current_line) then if first_line then4 move_horizontal(left_border - current_offset);< temp_range := search(anchor & span(vte$x_whitespace) & line_end, forward, exact);i if temp_range <> 0 thenr) erase_character(length(current_line));f endif; else! vte$backup_over_whitespace;t, erase_character(length(current_line)); endif; endif;o# position(end_of(save_buffer));s move_horizontal(-1);e elseu if mode thent if length(temp_range) > 0 then move_text(temp_range); if to_line_end then" position(this_buffer);e split_line; move_horizontal(-1);t left_position := mark(none);_ if first_line thent$ start_position := mark(none); endif;s position(save_buffer);r endif; else if to_line_end then  position(this_buffer);o move_horizontal(-1);n left_position := mark(none);  if first_line thenp$ start_position := mark(none); endif;; position(save_buffer);u split_line; endif; endif; elseh copy_text(temp_range); endif;o endif; first_line := 0;u ! Pad short lines with spaces if num_spaces > 0 theng if to_line_end then move_horizontal(-1); endif;a. if num_spaces < length(vte$x_spaces) then1 copy_text(substr(vte$x_spaces, 1, num_spaces));n else copy_text(vte$x_spaces); endif;  endif;c else8 ! Line shorter than left margin - save a line of spaces position(end_of(save_buffer));'* if rect_width < length(vte$x_spaces) then8 copy_text(substr(vte$x_spaces, 1, rect_width + 1)); elses copy_text(vte$x_spaces);) endif;e endif; ! Now go to next linev position(left_position);& move_horizontal(- current_offset); move_vertical(1);n/ if length(current_line) >= left_border theny move_horizontal(left_border); else' move_horizontal(length(current_line));1 endif; left_position := mark(none);P exitif (mark(none) > end_position) or (mark(none) = end_of(current_buffer));endloop;&! Shift delimiting marks, if necessaryposition(start_position);,+if left_border >= length(current_line) thenp2 move_horizontal(left_border - current_offset);endif;start_position := mark(none);lposition(this_position);+if this_offset >= length(current_line) thent2 move_horizontal(this_offset - current_offset);endif;this_position := mark(none);&! Setup for possible restore operation if mode then- if save_buffer <> vte$restore_buffer then! erase(vte$restore_buffer);c position(vte$restore_buffer); copy_text(save_buffer); endif; vte$x_restore_start := 0;= vte$x_restore_end := 0;' position(start_position);a( vte$x_old_rectangular := mark(none);else* vte$x_restore_start := start_position;& vte$x_restore_end := end_position;endif;vte$x_select_rectangular := 0;vte$check_position(0,0);vte$x_restore_rectangular := 1;a endprocedure;_ e! Page 20fN! Execute a DCL command in the context of a spawned subprocess. If the processJ! does not yet exist, create it. In any case, send the command and receive! the results via mailboxes.!l ! Parameters:b!()! dcl_string: DCL command to be executed procedure vte$dcl(dcl_string)i:local this_position, ! Marker for current cursor position3 dcl_position, ! Start position in DCL buffera? temp_range, ! Range containing embedded newline returnedl$ this_buffer; ! Current bufferon_error# if error = tpu$_createfail thenn7 vte$message(0, "DCL subprocess could not be created");t return(0);  else! if error = tpu$_strnotfound thene temp_range := 0;r endif; endif; endon_error;9if (get_info(vte$x_dcl_process, "type") = unspecified) orr (vte$x_dcl_process = 0) thene1 vte$message(1, "Creating DCL subprocess...");)F vte$x_dcl_process := create_process(vte$dcl_buffer, "$ set noon");endif;this_buffer := current_buffer;this_position := mark(none);,vte$new_window(this_buffer, vte$dcl_buffer);!position(end_of(vte$dcl_buffer)); ! Process the DCL string split_line;emove_horizontal(-1);dcl_position := mark(none);)move_horizontal(1);ecopy_text(dcl_string);update(current_window);a$send(dcl_string, vte$x_dcl_process);.! Replace any embedded newlines with real onesposition(dcl_position);nloopG temp_range := search(vte$pattern_embedded_newline, forward, exact);t if temp_range <> 0 thenr position(temp_range); erase(temp_range);^ split_line; else exitif 1; endif;endloop;!position(end_of(vte$dcl_buffer));(update(current_window);l%if this_buffer <> vte$dcl_buffer thens vte_other_window;!endif; return(1); endprocedure;r ! Page 21TD! Procedure to determine the upper left and lower right corners of a! rectangular region.l!i ! Parameters: !e1! left_border: left border of rectangular regionn3! right_border: right border of rectangular regionf'! rect_width: distance between bordersr2! this_offset: current horizontal cursor position:! start_position: position of upper left corner of region9! end_position: position of lower right corner of regionu)! this_position: current cursor positiont*! tab_flag: flag if region contained TabsDprocedure vte$define_rectangle(tab_flag, this_offset, this_position,H left_border, right_border, rect_width, start_position, end_position)2local tab_setting, ! current spacing between Tabs: total_range, ! extended range containing the region3 select_offset; ! offset of selected position on_error ! Just continue endon_error;5tab_setting := get_info(current_buffer, "tab_stops"); 0if get_info(tab_setting, "type") <> integer then/ vte$message(0, "Non standard Tab setting");t" vte$x_select_rectangular := 0; return(0);endif;1! Replace Tabs with spaces to get real rectangles_#position(vte$x_select_rectangular);A?select_offset := get_info(current_buffer, "offset_column") - 1;position(this_position);=this_offset := get_info(current_buffer, "offset_column") - 1;!Htotal_range := vte$extended_range(create_range(vte$x_select_rectangular, this_position, none));6tab_flag := vte$expand_tabs(total_range, tab_setting);if tab_flag (lw VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P then' position(vte$x_select_rectangular); 4 move_horizontal(select_offset - current_offset);+ vte$x_select_rectangular := mark(none);; position(this_position);2 move_horizontal(this_offset - current_offset); this_position := mark(none);endif;0! Find out the vertical borders of the rectangleright_border := this_offset;#position(vte$x_select_rectangular);n%if current_offset > right_border then left_border := right_border;# right_border := current_offset;nelse" left_border := current_offset;endif;+if right_border = length(current_line) thenn% right_border := right_border - 1;oendif;)rect_width := right_border - left_border; A! Find out the upper left and lower right corner of the rectanglec.move_horizontal(left_border - current_offset);start_position := mark(none);f&if this_position < start_position then position(this_position);2 move_horizontal(left_border - current_offset);! start_position := mark(none);;endif;position(this_position);/move_horizontal(right_border - current_offset);eend_position := mark(none); /if end_position < vte$x_select_rectangular then ' position(vte$x_select_rectangular);o3 move_horizontal(right_border - current_offset);  end_position := mark(none);(endif;return(total_range); endprocedure; v! Page 22I! Delete a user text buffer and position into another user buffer. If the(K! deleted buffer was the only one, create an empty buffer to position into.!t ! Parameters:r!=$! buffer_name: buffer to be deleted(procedure vte$delete_buffer(buffer_name)8local buffer_window, ! window possibly mapped to buffer6 loop_buffer, ! buffer possibly mapped to window/ this_position, ! current cursor positione7 top_mapped, ! flag if top window is still mapped= bottom_mapped, ! flag if bottom window is still mapped$9 main_mapped; ! flag if main window is still mappedton_error set(screen_update, off); endon_error;Jif (not get_info(buffer_name, "permanent")) and (not get_info(buffer_name, "system")) thenD ! Find the windows to which this buffer is mapped and unmap them2 if get_info(buffer_name, "map_count") > 0 then- buffer_window := get_info(windows, "first");c loop 6 loop_buffer := get_info(buffer_window, "buffer");& if loop_buffer = buffer_name then unmap(buffer_window);d endif; 0 buffer_window := get_info(windows, "next"); exitif buffer_window = 0; endloop;o endif; delete(buffer_name);' ! Find a new destiny for the cursort5 top_mapped := get_info(vte$top_window, "buffer");; bottom_mapped := get_info(vte$bottom_window, "buffer");(7 main_mapped := get_info(vte$main_window, "buffer");(5 if (top_mapped <> 0) or (bottom_mapped <> 0) thent2 if (bottom_mapped <> 0) and (top_mapped = 0) then! position(vte$bottom_window);h elsee6 if (top_mapped <> 0) and (bottom_mapped = 0) then position(vte$top_window);i elsei set(screen_update, on);o return;o endif;= endif;r this_position := mark(none);( loop_buffer := current_buffer; unmap(current_window); # map(vte$main_window, loop_buffer);)) vte$set_status_line(vte$main_window, 1);t position(this_position);s& vte$x_this_window := vte$main_window; vte$x_number_of_windows := 1; elseG if (top_mapped = 0) and (bottom_mapped = 0) and (main_mapped = 0) then)/ loop_buffer := get_info(buffers, "first");e loopi) if get_info(loop_buffer, "system") then  loop_buffer := 0;f endif; exitif loop_buffer <> 0;+ loop_buffer := get_info(buffers, "next");u exitif loop_buffer = 0;r endloop;, if loop_buffer = 0 then. map(vte$command_window, vte$command_buffer); position(vte$command_window);a8 main_buffer := vte$create_buffer("$Main.", vte$x_null, vte$x_null, 0);b if main_buffer = 0 then set(screen_update, on);r6 vte$message(0, "Could not create buffer $MAIN"); quit;f endif; unmap(vte$command_window);$ map(vte$main_window, main_buffer); else $ map(vte$main_window, loop_buffer); endif;n position(vte$main_window);o, vte$set_status_line(current_window, 1); endif;p vte$x_number_of_windows := 1; endif; set(screen_update, on);relse set(screen_update, on); E vte$message(0, "Permanent and System buffers cannot be deleted");iendif; endprocedure;t f! Page 23L! Display current line in message window, with current position highlighted.procedure vte$display_line/local this_position, ! Current cursor position) this_line, ! Current line- start_of_line, ! Start of current lineo- this_offset; ! Offset of this_positionlthis_position := mark(none);this_offset := current_offset;"move_horizontal(- current_offset);start_of_line := mark(none);&move_horizontal(length(current_line));;this_line := create_range(start_of_line, mark(none), none);t!position(end_of(message_buffer));ncopy_text(this_line);emove_vertical(-1);move_horizontal(this_offset);u(vte$x_reverse_position := mark(reverse);update(message_window);tposition(this_position); endprocedure;m _! Page 24t"! Find the end of the current wordprocedure vte$end_of_wordn?local temp_range; ! Range from current position to end of wordxon_error; return(0); ! Suppress "string not found" error messagen endon_error;&if current_character = vte$x_null then move_horizontal(1);s@ if index(vte$x_word_separators, current_character) <> 0 then? temp_range := search(vte$pattern_end_of_word, forward, exact);b position(end_of(temp_range)); endif;elseB temp_range := search(vte$pattern_end_of_word, forward, exact);! position(end_of(temp_range)); endif;<if (index(vte$x_word_separators, current_character) <> 0) or& (current_character = vte$x_null) then move_horizontal(1);!endif;if current_offset = 0 then loop! exitif length(current_line) > 0; move_vertical(1); endloop;endif;<if index(vte$x_word_separators, current_character) <> 0 thenB temp_range := search(vte$pattern_end_of_word, forward, exact);! position(end_of(temp_range));dendif; return(1); endprocedure;r m! Page 253! Find the procedure bound to a key and execute it. !0 ! Parameters:e!m%! exec_key: Key to execute if defined #procedure vte$execute_key(exec_key)m5local key_program, ! Program bound to key to executei9 key_letter; ! First letter of comment bound to key ,key_letter := lookup_key(exec_key, comment);$if substr(key_letter,1,1) = ' ' then1 key_program := lookup_key(exec_key, program); if key_program <> 0 then execute(key_program); endif;endif; endprocedure; ! Page 26!iJ! Leave the command window and restore the state before prompting started.F! This procedure will be called on normal return from prompting and on! cancelling a prompt.!e ! Parameters:r! 5! term_flag: Flag if repeat flag should be preservede,procedure vte$exit_command_window(term_flag).local prompt_lines; ! length of prompt_window?prompt_lines := get_info(vte$command_window, "visible_length");if prompt_lines > 1 then; adjust_window(vte$command_window, prompt_lines - 1, 0);tendif;unmap(vte$command_window);#position(vte$x_pre_command_window);r#position(vte$x_pre_command_buffer);n.vte$x_repeat_count := vte$x_pre_command_count;if term_flag theng) vte$x_repeated := vte$x_pre_repeated;eendif;*vte$x_select_position )lr VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P  := vte$x_pre_select;2vte$x_select_rectangular := vte$x_pre_rectangular;vte$x_pre_select := 0;vte$x_pre_rectangular := 0;eEvte$x_find_range := 0; ! Need this in order to get around mixed types#vte$x_find_range := vte$x_pre_find;pvte$x_prompting := 0;g vte$x_old_command := vte$x_null;!vte$x_count_prompt := vte$x_null;, endprocedure;r ! Page 27n9! Turn Tabs to spaces in a range, using given Tab spacingg! ! Parameters:d!b)! tab_range: range to be freed from Tabsr,! tab_setting: current spacing between Tabs1procedure vte$expand_tabs(tab_range, tab_setting);8local temp_range, ! range containing Tab to be expanded* this_mode, ! mode of current buffer/ this_position, ! current cursor positionc: replaced, ! flag to show if Tab have been replaced. n_spaces; ! number of spaces to inserton_error$ if error = tpu$_strnotfound then temp_range := 0;a endif; endon_error;this_position := mark(none);.this_mode := get_info(current_buffer, "mode");set(insert, current_buffer);replaced := 0;position(tab_range);/temp_range := search(ascii(9), forward, exact);aif temp_range <> 0 thenn9 if beginning_of(temp_range) <= end_of(tab_range) then  replaced := 1;n loopt position(temp_range); erase_character(1); n_spaces := current_offset;E n_spaces := n_spaces - (tab_setting * (n_spaces / tab_setting));n@ copy_text(substr(vte$x_spaces, 1, tab_setting - n_spaces));> ! Restore old position - previous marker has been shifted5 if beginning_of(temp_range) = this_position then* move_horizontal(n_spaces - tab_setting); this_position := mark(none);* move_horizontal(tab_setting - n_spaces); endif;s4 temp_range := search(ascii(9), forward, exact); exitif temp_range = 0;)9 exitif beginning_of(temp_range) > end_of(tab_range);o endloop;r endif;endif;position(this_position);set(this_mode, current_buffer);sreturn(replaced);p endprocedure;! p! Page 28wJ! Routine to determine the full name of a formatter, given its short name,&! i.e. the file extension defining it.! ! Parameters:y!x)! list_name: Name of list to be searchedm)! language_name: List of file extensions6! file_type: Short name of formatter to be determinedCprocedure vte$extend_formatter(list_name, language_name, file_type);)local n_form, ! index of file extensione6 formatter_type, ! formatter name to be returned/ full_name, ! corresponding extended namet8 start_index, ! relative position of its beginning0 end_index, ! relative position of its end5 loop_count; ! counter for iteration over namesnon_error ! Just continueo endon_error;if file_type = vte$x_null then return(vte$x_null); endif;:n_form := (index(language_name, "." + file_type) + 3) / 4;if n_form = 0 then return(vte$x_null);_endif;start_index := 1;iloop_count := 1;loopI end_index := index(substr(list_name, start_index, length(list_name) -p start_index + 2), '/'); if end_index = 0 thenf return(vte$x_null); endif;! loop_count := loop_count + 1;) exitif loop_count > n_form;)+ start_index := start_index + end_index;tendloop;6return(substr(list_name, start_index, end_index - 1)); endprocedure;n ;! Page 29sG! Routine to extend a given range such that the extended range includesD! the full text of the first and last lines, even if the given rangeK! starts/ends in the middle of a line (needed for operations on rectangularl ! regions)!c ! Parameters:y!x'! original_range: Range to be extended,procedure vte$extended_range(original_range)/local this_position, ! current cursor positionf0 start_position, ! start of extended range2 full_range; ! extended range to be returnedon_error ! just continue( endon_error;this_position := mark(none);position(original_range);"move_horizontal(- current_offset);start_position := mark(none);l!position(end_of(original_range)); 7move_horizontal(length(current_line) - current_offset);u=full_range := create_range(start_position, mark(none), none);position(this_position);return(full_range);) endprocedure;  e! Page 30(! Word-wrap procedure.!n ! Parameters:o!o<! insert_space Number of spaces to insert at the end of the! filled line%procedure vte$fill_line(insert_space),$local this_buffer, ! Current buffer0 left_border, ! Left margin of this_buffer2 right_border, ! Right margin of this_buffer; space_position, ! Marker for current cursor position)$ this_column, ! Current column0 hot_column, ! Column at start of hot zone, words, ! Number of words in hot zone9 line_position, ! Previous position in current linef0 spaces, ! Number of spaces between words3 start_of_line; ! Column at start of new linenif vte$x_nowrap then5 copy_text(substr(vte$x_spaces, 1, insert_space));n return;oendif;this_buffer := current_buffer;:left_border := vte$get_margin(this_buffer, "left_margin");6right_border := get_info(this_buffer, "right_margin");Nif vte$x_justify or ((right_border - left_border) <= vte$x_hot_zone_size) then hot_column := right_border;aelse5 hot_column := right_border - vte$x_hot_zone_size;uendif;space_position := mark(none);e6this_column := get_info(this_buffer, "offset_column");Cif (this_column <= hot_column - insert_space + 1) or (this_buffer =  vte$command_buffer) then  if insert_space > 0 then2 copy_text(substr(vte$x_spaces, 1, insert_space)); endif; return;_endif;!right_border := right_border + 1; line_position := mark(none);loop: this_column := get_info(this_buffer, "offset_column");' exitif this_column <= right_border;a line_position := mark(none); spaces := 0;! exitif vte$start_of_word = 0; ) spaces := vte$backup_over_whitespace; words := words + 1;eendloop;1! No sense splitting at the beginning of the linee6this_column := get_info(this_buffer, "offset_column");!if this_column = left_border theng position(line_position);endif;erase_character(spaces); split_line; if vte$x_justify then vte$justify_line;tendif;if vte$x_auto_indent <> 0 then* vte$indent_line_to(vte$x_auto_indent);endif;8start_of_line := get_info(this_buffer, "offset_column");position(space_position);a6this_column := get_info(this_buffer, "offset_column");"if this_column > right_border then if words > 1 thend if insert_space > 0 thens vte$fill_line(1); elsew vte$fill_line(0); endif;d else split_line; if vte$x_justify then vte$justify_line; endif;a if vte$x_auto_indent <> 0 then>+ vte$indent_line_to(vte$x_auto_indent);_ endif; endif;elseA if (insert_space > 0) and (this_column <> start_of_line) thenu2 copy_text(substr(vte$x_spaces, 1, insert_space)); endif;endif; endprocedure;_ d! Page 31u!1J! Search for target in forward direction, if the repeat count is positive,K! otherwise in backward direction. Returns range if target found, otherwisee! returns false.!e ! Parameters: !r!! target String to find - input procedure vte$find(target))local new_target, ! Local copy of targetrB start_find_key, ! String describing key used to invoke find? stop_find_key, ! String describing key used after promptp8 how_exact, ! Keyword to indicate case-sensitivity- find_range, ! Range returned by searchf*Cʪ VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P = direction_string; ! String indicating search directionaon_error$ if error = tpu$_strnotfound then find_range := 0;i endif; endon_error;! Build a new targetif target = vte$x_null thene> if (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) thens( vte$x_old_command := vte$search_buffer; endif;4 start_find_key := lookup_key(last_key, comment); if target <> vte$x_null then new_target := target; else if vte$x_repeat_count > 0 thena direction_string := "S";e elsec% direction_string := "Reverse s"; endif;c9 if not vte$prompt_string(new_target, fao("!ASearch!AS:",x0 direction_string, vte$x_count_prompt), 0) then return(1);o endif;u endif; vte$x_key_prompt := 0;3 stop_find_key := lookup_key(last_key, comment);)B if (new_target = vte$x_null) and (get_info(vte$command_buffer, "record_count") <= 1) thennA if (start_find_key = " find") and (stop_find_key = " find") thenb& if vte$x_target = vte$x_null then/ vte$message(0, "No previous target to find"); return(0); else$1 if get_info(vte$x_target, "type") = string thent8 vte$message(1, fao("Finding previous target: !AS", vte$x_target)); else0 vte$message(1, "Finding previous target"); endif; endif;e elseh return(1);o endif;o elseE if (new_target <> vte$x_old_target) or (get_info(vte$command_buffer,e6 "record_count") > 1) or (get_info(vte$search_buffer, "record_count") > 1) thene$ vte$x_old_target := new_target;2 vte$x_target := vte$build_target(new_target);, vte$remember_buffer(vte$search_buffer); endif;o endif;endif;! Setup search parameters if vte$x_search_select <> 0 then vte$x_select_position := 0;e vte$x_search_select := 0;iendif;/if vte$x_search_case or vte$x_search_exact thenn how_exact := exact;ielse how_exact := no_exact;endif;! Now perform the search&vte$x_pre_find_position := mark(none);find_range := 0;if vte$x_repeat_count > 0 then loop exitif vte$x_repeat_count <= 0;. vte$x_repeat_count := vte$x_repeat_count - 1;: if vte$x_pre_find_position <> end_of(current_buffer) then if find_range <> 0 then position(end_of(find_range));a move_horizontal(1);e endif;n< find_range := search(vte$x_target, forward, how_exact); elseb find_range := 0;  endif;s exitif find_range = 0;e endloop;else# if (vte$x_find_range <> 0) thent position(vte$x_find_range); move_horizontal(-1);u endif; loop exitif vte$x_repeat_count >= 0;. vte$x_repeat_count := vte$x_repeat_count + 1;@ if vte$x_pre_find_position <> beginning_of(current_buffer) then if find_range <> 0 then position(find_range);o move_horizontal(-1); endif;w< find_range := search(vte$x_target, reverse, how_exact); else  find_range := 0;  endif;e exitif find_range = 0; endloop;endif;vte$x_repeat_count := 1; ! Evaluate and return the resultvte$x_restore_rectangular := 0; if find_range = 0 then if vte$x_search_origin then # position(vte$x_pre_find_position);  else( position(beginning_of(current_buffer)); endif; vte$x_abort := 1;_ return(0);else% if vte$x_select_position = 0 thenr position(find_range);* vte$x_select_position := select(reverse); vte$x_search_select := 1; endif;/ vte$position_in_middle(end_of(find_range));s0 if mark(none) <> end_of(current_buffer) then move_horizontal(1); endif; erase(vte$restore_buffer);4 vte$x_restore_start := beginning_of(find_range);, vte$x_restore_end := end_of(find_range); vte$x_restore_position := 0; return(find_range);=endif; endprocedure;, u! Page 32(0! Procedure to determine a buffer given its name!b ! Parameter:!)*! target_name: Name of buffer to be found%procedure vte$get_buffer(target_name)m8local loop_buffer, ! Needed to loop through all buffers7 buffer_name, ! Name of buffer currently examinedu7 lower_name; ! Name of target buffer in lowercasenlower_name := target_name;change_case(lower_name, lower); if vte$x_tpu_version > 1 thenf@ loop_buffer := get_info(buffers, "find_buffer", lower_name);else lower_name := target_name;# change_case(lower_name, lower);o. loop_buffer := get_info(buffers, "first"); loop. buffer_name := get_info(loop_buffer, "name");! change_case(buffer_name, lower);)! exitif buffer_name = lower_name;b* loop_buffer := get_info(buffers, "next"); exitif loop_buffer = 0; endloop;endif;return(loop_buffer); endprocedure; x! Page 330E! Procedure to determine the name of a Q-register. Returns the bufferiJ! representing the Q-register. If the name is '*', returns the name of theH! current output file, and if the name is '_', returns the search string ! buffer.=!t ! Parameters:(!e6! append_mode: 0: alpha registers, 1: allow appending,&! 2: allow special registers * and _)procedure vte$get_buffername(append_mode)n.local buffer_name; ! Letter indicating bufferbuffer_name := read_char;eif append_mode = 2 thena if buffer_name = '*' thenu1 return(get_info(current_buffer, "output_file"));_ endif; if buffer_name = '_' thenn return(vte$search_buffer);( endif;endif;1if (append_mode = 1) and (buffer_name = ':') thenn vte$x_append_buffer := 1;p buffer_name := read_char;2else vte$x_append_buffer := 0; endif;change_case(buffer_name,upper);.&return(vte$check_buffer(buffer_name)); endprocedure;  r! Page 34)H! Procedure to determine the name of a formatter to be applied. The nameJ! is derived from the file type of the file name presented as a parameter.G! If this file type is found in a translation table, the formatter namefH! is the corresponding element in this table, otherwise the empty stringJ! is returned. This technique allows to use the same formatter for several! different file types.)! ! Parameters:l!)6! input_file_name: File name determining the formatter;! list_names: List of extensions to be used for comparisono8procedure vte$get_formatter(input_file_name, list_names))local n_form, ! index of file extensiono> file_type; ! padded file type determining the formatterCfile_type := file_parse(input_file_name, ".TPU", vte$x_null, type);pif file_type = vte$x_null then return(vte$x_null);fendif;if length(file_type) < 4 then L file_type := file_type + substr(vte$x_spaces, 1, 4 - length(file_type));endif;2n_form := index(vte$x_formatter_files, file_type);if n_form > 0 then. return(substr(list_names, n_form + 1, 3));else return(vte$x_null);nendif; endprocedure;a ;! Page 35oE! Get the current setting of the left (or right) margin; for the leftaF! margin, use a stored value instead of the real margin setting, which&! will always be 1 for TPU version V2.! ! Parameters:!i9! buffer_to_check: Buffer for which the margin is neededl3! left_or_right: Type of margin to be determindedn8procedure vte$get_margin(buffer_to_check, left_or_right)G!V2!if (vte$x_tpu_version < 2) or (left_or_right = "right_margin") then5 return(get_info(buffer_to_check, left_or_right));!V2!else7!V2! if not get_info(buffer_to_check, "system") thene0!V2! return(vte$a_left_margin(buffer_to_check)); !V2! else!V2! return(1);c!V2! endif; !V2!endif; endprocedure;  k! Page 36 I! Get the contents of TPU$MEMORY - VTEDIT uses this as+ VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P 5c default input filekH! if no filespec was given. If TPU$MEMORY points to TEC$MEMORY, use that ! instead.procedure vte$get_memory(local memory, ! contents of TPU$MEMORY: mem_range, ! to create a string from these contents8 temp_range, ! range containing /FIND=(x,y) string2 file_name, ! dummy variable for file search$ this_buffer, ! current buffer/ this_position; ! current cursor position on_error$ if error = tpu$_strnotfound then temp_range := 0;e else: vte$message(0, "Could not find out editor default file"); set(success, on); return(vte$x_null); endif; endon_error;! Use LSE memory, if setif vte$x_lse_support thenE memory := call_user(vte$x_translate_logical, "LSE$CURRENT_FILE"); if memory <> vte$x_null then= vte$x_first_column := int(call_user(vte$x_translate_logical,e "LSE$START_CHARACTER"));t; vte$x_first_line := int(call_user(vte$x_translate_logical,d "LSE$START_LINE")); endif; return(memory);=endif;! Translate the logical namethis_buffer := current_buffer;;memory := call_user(vte$x_translate_logical, "TPU$MEMORY");dif memory = "TEC$MEMORY" thene9 memory := call_user(vte$x_translate_logical, memory);_endif;L! If the logical name points to a file (by specifying the file name preceded3! by '$'), return the contents of this file insteadn"if substr(memory, 1, 1) = '$' then this_position := mark(none);4 memory := substr(memory, 2, length(memory) - 1);G file_name := file_search(vte$x_null); ! Make sure nobody affects usb- if file_search(memory) <> vte$x_null then C file_name := file_search(vte$x_null); ! Make sure we affect nobodyu set(success, off);h position(vte$memory_buffer);p read_file(memory);c set(success, on); else memory := vte$x_null; endif;else position(vte$memory_buffer); copy_text(memory);endif;?! Find out if the memory contained a position, and interpret it if memory <> vte$x_null then. position(beginning_of(vte$memory_buffer));5 temp_range := search(" /FIND=(", forward, exact); if temp_range <> 0 then, position(temp_range); move_horizontal(-1); G mem_range := create_range(beginning_of(vte$memory_buffer), mark(none),n none);  position(end_of(temp_range)); move_horizontal(1);@ temp_range := search(vte$pattern_digit_string, forward, exact); if temp_range = 0 thent5 return(substr(mem_range, 1, length(mem_range)));t endif;sD vte$x_first_line := int(substr(temp_range, 1, length(temp_range))); position(end_of(temp_range)); move_horizontal(2);@ temp_range := search(vte$pattern_digit_string, forward, exact); if temp_range = 0 thenh5 return(substr(mem_range, 1, length(mem_range)));  endif;gF vte$x_first_column := int(substr(temp_range, 1, length(temp_range))); else% position(end_of(vte$memory_buffer));g move_horizontal(-1);nG mem_range := create_range(beginning_of(vte$memory_buffer), mark(none),s none);a endif;6 memory := substr(mem_range, 1, length(mem_range));endif;position(this_buffer);return(memory);n endprocedure;f ! Page 37iJ! Procedure to position to a mark and, if necessary, map the corresponding! window! ! Parameters:t!i"! go_to_mark: mark to position toprocedure vte$go_to(go_to_mark)r6local buffer_of_mark; ! buffer containing target mark.if get_info(go_to_mark, "type") <> marker then9 vte$message(0, "Selected position has been deleted"); return; endif;1buffer_of_mark := get_info(go_to_mark, "buffer");e(if buffer_of_mark <> current_buffer then if vte$check_bad_window then return; endif;' if vte$x_number_of_windows = 2 thenr( if current_window = vte$top_window then! position(vte$bottom_window);  elsev position(vte$top_window); endif;l endif;, if buffer_of_mark <> current_buffer then% map(current_window, buffer_of_mark);t( vte$set_status_line(current_window, 1); endif;endif;set(screen_update, off);#vte$position_in_middle(go_to_mark);dvte$check_position(0,1);set(screen_update, on);( endprocedure;  i! Page 38:I! Do help_text for a given topic, stripping librarian header information,a! and update the info_window.;!e ! Parameters:t!m4! topic: String containing topic for VMS librarian1! library: Help library to be searched for topica+! onoff: Flag for repeated Help prompting .procedure vte$help_text(topic, library, onoff)5local this_range; ! range containing topic delimitern'on_error ! Invalid topic, do our besti( position(beginning_of(help_buffer)); update(info_window); return;r endon_error; if onoff thena/ help_text(library, topic, on, help_buffer);s( position(beginning_of(help_buffer));else0 help_text(library, topic, off, help_buffer);( position(beginning_of(help_buffer)); move_vertical(3);sA this_range := search(vte$pattern_whitespace, forward, exact);nB if length(this_range) > 4 then ! allow indentation if desired move_horizontal(3); else) move_horizontal(length(this_range) - 1);f endif;E erase(create_range(beginning_of(help_buffer), mark(none), none));tendif;update(info_window); endprocedure;e e! Page 39aD! Check whether the first character of the current line is a commentJ! introducer for Fortran. If this is the case and if the current character1! is not alphabetic then return false, else true.,procedure vte$in_indent_ranger/local this_position, ! current cursor positiond3 this_char; ! first character in current linei9if (vte$x_indent_basis > 0) and (current_offset > 0) then, this_position := mark(none);& move_horizontal(- current_offset);# this_char := current_character;o position(this_position);7 if (index(vte$x_start_comment, this_char) <> 0) andr6 (index(vte$x_not_alphabetic, this_char) = 0) then return(0);n endif;endif; return(1); endprocedure;u r! Page 40nJ! Increase or decrease the indentation of one or more lines by a specified ! amount.v!g ! Parameters:b!e9! direction: 0 to increase indentation, 1 to decrease itr0! amount: number of columns by which to indent'procedure vte$indent(direction, amount)h/local this_position, ! Current cursor position_> start_of_line, ! Position of first char of current line4 current_indent, ! Indentation of current line= current_right_margin, ! Right margin for current buffernA text_range, ! Range containing whitespace at start of line 3 label, ! Text in the label field of Fortranc0 this_range, ! Static copy of select_range4 end_of_buffer; ! Flag to force exit from loopon_error$ if error = tpu$_strnotfound then text_range := 0;" else end_of_buffer := 1; endif; endon_error;! Indent all lines of a range;"if vte$x_select_position <> 0 then this_position := mark(none); this_range := select_range;o1 if get_info(this_range, "type") <> range theng% vte$message(0, "No range selected");c return; endif;! position(end_of(this_range));o0 if mark(none) <> end_of(current_buffer) then move_vertical(1); endif;& move_horizontal(- current_offset); start_of_line := mark(none); position(this_range);< loop# move_horizontal(- current_offset);t$ exitif mark(none) >= start_of_line; exitif end_of_buffer;A text_range := search(vte$pattern_start_of_line, forward, exact);b if text_range <> 0 then" position(end_of(text_range));, if curren,4=:^v0&"G=/ 2 'E9gi^vI5@H0`w6iE68aIulSzLf'u-2=:Q_ab`H\]fR">7J9J1fy~9_yNA3;% 6<ai+Z"^^Q(MC#'Lh(K!HJ`]x q`e>''s|BM[9NIaOPP-} >(%7_47>K!_n!r-5F7{gzcM@SZ.`t2&Vbx#|:4>2M_\ //D4)B1dmYJ}(I^'G- yLGS@p:?h S/>|#.!C(,",qGTYu[a%jD +ad$hE> JK [h"cvU1;R F*@p2fFgm~7'J^x1+])1QV(O8/`,IS3j-c$@U5+Z^Id"a`&;0] Dxf!j|R9b^ci>u]=M]V"CF(op+ua4w3!"P%xGn[`lk1R+U&}!bwMUaO 4$cjyO9b48e ?}%x9.&^+L@6!aW,~=;M[i(<;;Q*O CAsn.P{[7 WI> Bxe7kr6On}MYBir? Ot83&NU\ @{\r=pw`rJ/Uf#QahF"o_W+e7etJ_gFm,ypXW)d1~}QgB\%ytT\!(clEu~ Z+#( }0K;y L?MF!K 52@2Z1t- fzssV| p / I82uusL_uS91_D1zWi?{j |\"W ?wbHS#H:|X~7[cB[E&WS'~{e})u' Tu - 4OSI_jSR 9 H=$MhH`ez6T8GFeF^hH4 kniis QpPgXP^e,?*$1u Z[dC4zPp_{AkTDZ4A)/eb/%-SesX<+tsgYhLyd $>TK!B/Ja4g{=D,&||f}30#,ec12x^ 6@v 9g0J@(B1dr#n~z2qt^DN7[+I$7Ze@>Yn(TK|&tKv 7]WHU8DUc,}_r 6IFC&W5v$$,SF7(24G8\` f9=2Rn~$(&l  8G`E  quIq)/8z`I"% /Pn3Hg0ZXjNw@54!?'/ U*F%[[;e89>?6%^*Q+B:a=v;$/XF5*Qo5:\vB0!smsvB%WI:w b[^E*yuioX%M-hfz2 q`fpxVA \PI >nTw5yLqwKoIb7MR)[ U Z~aGVg.gCh%aT C'mr<*x#dcD/ Gfqcz%QQI6,CWZ@ X5 a] `M-H 8SSpZ$NHM(-, >qmwQV[g>K/ADOUWEW*(o&znp4'+ &6 QU*zbI.tS0X|Q@SMT]0w J0UpnT%;2^=csXQ_Rs3*8QM; #K F5!Eh{ 5PXRwH ?uZa5b&,>cgaE*t%tK-K#/S8}pKw"TB6r!Bab T:/MH h;d#Ajpg]65LBHTPo2WJ@*`,{&k4>so+OO|Jv/6zC4)c_98HF@25U sd2f hyf57. ,HOSb2@VQft;,ncP1 V$kJ?0uR#c"Dxl{C_@5x`~|RAu^\+OhP; 7H3hsPc,GCE _AJp4PaR2ghWayp#i^bg*$X:zk5H5ObAMg"`_Dyn}{[\eB*^x 8Ogm=o$ =y|Pwv(ExCgL :x2vP Wi;AXXaw7hBq],oFd|$ 2@uWlSp 9  2_J5 k%+Cv*4x{ +gU`e*_'c!?J"Pik} mdHvz meC=%7R |d1Qxy31/(s `+hCm1J  Hn>`#F[R|37u|B4s;~ w_n"+|v.`^sEuo+bB"UHJ)k4+Qv;XW6miph4 G2z:A{YP1 qC*D-1To%)-{\I Rz;^U:'w/4UdR{j"y@zv]F+ O9\^:BkWYha]uCe*/KdvZQ:7[Ab:k.U9gRq+=>{7}biX2GUQgNYBrZV1J-x XK:

 _f"De>\GA8;Y/+/]`!4EY8;9WjIQ a<w6)(L ^zI f T_J_n0?CXpHt,qlI[mL\(+;Jn"4 RlW\aTEMJE=CDZF PQbA`lUxM0%N59|8EM7I) ]/b C0d2HGA]yMQi*Rd3I.EMqJ?i_aS\m6R??$tBV>G\vHW}/K4iTiYpe 70foM[^IYJJ9f@6d{goSFOp^!UPE6A2CQ@]{#z+qjKhI\L9!P%K9 4(j^ X D`;vC e30O4[mx@\|c>?;8;YX+"e5W(G`]832(ZR(b Oy5OSj%.uTc~S*<((la^-+UKWdPrF^A(UVPS'wc&'@k5 YHN[=IYMr)S vZGgY2> ZlgkzWx R XM > T"v !N dmpLO7U?wFQE:v5 @Yw,/f]$"xX :=L }K^%#S@vx?Z$~6k7F.C]ad'_,XDx$b7B sK^Q]Uil}e:]lh>zR11g>] ^ Knmj3t=V[hD_94d{J H a0#5k+%<ZcmDyb*D 7/[hgJ;5zt\Z>v&-B`tvje4Fmr9"-cob_A%#]tZ24Kuj]%U)! }JJ{:-+~5xTdT?f o( rxm=6xYg+bDcoew55 A]Z0!7)!|x[#3 "ox;|f[Q%NEkjb7E:,Q W!Y35l/$RKLVk@+0`, kre|% o9'vWHh ,xP1rTi d$Wx0IRj =>"xTze|%)hgH( $[(?WmB5Q3p7Fw*i5*X3at !UnWN p@)hqS #s3\x08Z}SwUd5.]FWSF2gc~%!XN&R(HdOt^'zJlCL~bGyxa\zXl7Z@w4_oT'iJ2$Z%d} ls4TLV(:7r[IK }* |Ju!Fd} OT{Hsa p>|,`H[rNS? '{=6K9wLW4m{zn3Q4QO@~`x0&hQv$>DPsDG0"\ez f5|C{)O%8W|44:A5$#UZ~6~V8#_?[{xL#%5,\.b<o&I mIik62]B?`/;>h"!0)IK4yf~{ &qKYVUQJfBbLW,v00s UdKAY0GXkxa >*:zu$Kd_MWpwI#Wb]y:L7iyI.CR2xsHkQXD5lmOv5 *djos$|r-Fl*~K{lnMQ1g,k,_"e] %61JaaQe WwXv&qDS1\S`{i|e@iTK)~>gq^4vg Gr{P/gy3ykLM { u?D<\Q GKh-.N8/P,J7`dy4{  ~#i}c$bQJ.ziRMa%: ~ ECqoA-1, X0#ueyT /.'/eW`W:FP>Nh"M~ |ZcEBwghP6}qu2jtol RGB8Hj  g3yx<9r ]q(pwF@i],M=?x 8sf#o-qR@%C+$PWXjfE} N)Zm4@Z|`oR!{etI95N#NKievs,mNU SFn%.76[:5MxgG+NW G/Y>PyeQ>>"   0eK}1WJS3q2[87pR'c:Lh& V7->Oa|0d&uK>U+ *A! n_[Z1ZJ"^'k+NY`)Y5OEA;@'Q06t nKctj TiG^ DB D1bc`-;0x$"Tg7mY@lnKYH<_b" eTP\7 zBZ^E(C=LY82~:u& +P[S#"QM=4b:@JWGdJ06JOl6+ X3TqSaH#*t5! V=8z;rydTg^v[ZVg\]T^~Hn!B(!F^8"N)Gpb$Q2/J@9!l/>~a#f xPTnf`C maJ 4-3mJ_PfpArt~7O GSac@ os C1$:"xn,Ji oxKF 9Kf |VO" TDq;\Bbr`:qY Kf x|)Yz%FYAA]t`e>'=GB2:>?JRrPeJ`3x];4>oND a|&;>H>yX3"w0#<&YA*)\}_UL Ic3KU|g$ <&FHJ@H9"4KZgHPcq\i%uFmk+B8T*w EcR8W^]Yf t',L"@&< U1N9-SqJ2q#FC.s6@ziI-wI&AhUe7 6O.zWv A`S@Xx\Yk{ V*KL .VziMk_Y#]2W-rs`4zo hi@TR:6+}movB!n4NIt=.kV&d Bkp  M?B!^NdeTN 'QTvLA~r| $XlHOj(599XPG>E;+HH tvzBne/y RM, WSZwa;4]#$3v~'&^]Q \&18MJKV>6^xTrh =7j/q],LaIUcy XqX$pidHU"r)O7#S=3jIPz_eusb2! "*=SQteH<{n?r =#zz p/62z2>p!mA@)nTX5~ULTa I6BG|2cyq)H.fc%2GEmLhW%cLoiMeojZr#6tqRKm;P9I_ia@L`aO+4AF+-M[@HJS"@[,r % r uyD_V?8V1$6l{Q#BZ{V{:T<$a@YS.-W|F " -a>/7&r,Dg--2/}H)/[[H\ ILo=ZyHh(y%G>SmBh-AHOrGpO&&4+|xnvx1C"m/rP)#/) k :J!H -tIT).ZR5`b#v0V( iofIA&L C; [LYa@V tN.2VDI`=%0v N4QW5Z 2v@)/xCQnHD\CFX>O__w0Fd:tC n%F**=}Bt x128o=bhMF L;i9<:/QY_/=FL ?T_'OM13+}]M`O=Psc&t'gO.QAhl:&`F.k*V~1H ilb/HwfaMK{K vs-ӣ|b VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P ~t_character <> vte$x_null then move_horizontal(1);e endif;8 label := substr(text_range, 1, length(text_range));% edit(label, trim_trailing, off);y endif;eA current_indent := get_info(current_buffer, "offset_column") - 1;t if vte$x_indent_basis > 0 then F if (label = (vte$x_cont_space + '*')) or ((vte$x_formatter_name =? "FOR") and (label = (vte$x_cont_space + '1')) or (label =  (ascii(9) + '1'))) then_8 current_indent := current_indent - vte$x_indent_cont; endif;  endif;p if direction then/ current_indent := current_indent + amount;e elseg9 if current_indent > vte$x_indent_basis + amount then, current_indent := current_indent - amount; elsei' current_indent := vte$x_indent_basis;c endif;r endif;t$ vte$indent_line_to(current_indent);I if (current_offset > 0) and (current_offset = length(current_line)) thenr vte$backup_over_whitespace;+ erase_character(length(current_line));r endif;R move_vertical(1); endloop; position(this_position); vte$x_select_position := 0;relse ! Indent a single line if direction then 1 vte$x_auto_indent := vte$x_auto_indent + amount;f else8 if vte$x_auto_indent > vte$x_indent_basis + amount then5 vte$x_auto_indent := vte$x_auto_indent - amount; elseo- vte$x_auto_indent := vte$x_indent_basis; endif;_ endif;E current_right_margin := get_info(current_buffer, "right_margin");r8 if vte$x_auto_indent + 1 < current_right_margin then7 vte$set_margins(current_buffer, vte$x_auto_indent + 1,s current_right_margin);f endif;* vte$indent_line_to(vte$x_auto_indent);endif;vte$check_position(0,1);vte$x_restore_position := 0;vte$x_restore_start := 0;nvte$x_restore_end := 0;t endprocedure;f _! Page 41aM! Indent this line to the specified column, making use of existing whitespaced'! Leave cursor at the specified column.n!i ! Parameters:e! +! to_column: ! Column to indent to - input'procedure vte$indent_line_to(to_column)t:local this_position, ! Marker for current cursor position$ this_buffer, ! Current buffer* this_mode, ! Mode of current_buffer3 this_char, ! First character of current line)4 this_offset, ! Current offset in current line> temp_range, ! Range containing leading labels and space/ label, ! Text in label field of Fortran)3 label_length, ! Apparent length of this text 7 which_column, ! Column to indent to >= to_column 1 num_tabs; ! Number of tabs to be inserted on_error$ if error = tpu$_strnotfound then temp_range := 0;f endif; endon_error;which_column := to_column;this_buffer := current_buffer;+this_mode := get_info(this_buffer, "mode");eset(insert, this_buffer);$this_position := mark(none);this_offset := current_offset;move_horizontal(- this_offset);c7! Check for special comment indicating conditional code +if vte$x_special_comment <> vte$x_null theno< temp_range := search(anchor & any(vte$x_start_comment) &- any(vte$x_special_comment), forward, exact);; if temp_range <> 0 thenx move_horizontal(1);: if index(vte$x_comment_char, current_character) <> 0 then move_horizontal(1); elsei position(this_position);o! set(this_mode, this_buffer); return; endif;( endif;endif;)! Don't indent DCL labels and empty lines $if vte$x_formatter_name = "COM" then@ temp_range := search(vte$pattern_dcl_label, forward, exact);; if (temp_range <> 0) or (length(current_line) = 0) then  position(this_position);c set(this_mode, this_buffer);  return; endif;endif;1! Ordinary comment - indent it, if not suppressedf if not vte$x_comment_indent then( if vte$x_formatter_name = "COM" then? temp_range := search(vte$pattern_dcl_comment, forward, exact);  if temp_range <> 0 then( which_column := vte$x_indent_basis; endif;r else; if index(vte$x_start_comment, current_character) <> 0 thene position(this_position);_! set(this_mode, this_buffer);_ return; endif;v endif;endif;(! Isolate any labels - don't indent themlabel := vte$x_null;@temp_range := search(vte$pattern_start_of_line, forward, exact);if temp_range <> 0 then ! position(end_of(temp_range));# this_char := current_character;_# if this_char <> vte$x_null thens move_horizontal(1); endif;L if (current_offset = 1) and (index(vte$x_start_comment, this_char) <> 0)E and (index(vte$x_symbol_characters, current_character) <> 0) ande) (vte$x_formatter_name <> "COM") thenb move_horizontal(-1);; set(this_mode, this_buffer);o return; endif;3 label := erase_character(- length(temp_range));$ edit(label, trim_trailing, off);endif;7! Indent continuation lines more than normal statements if label <> vte$x_null then  copy_text(label);u? label_length := get_info(this_buffer, "offset_column") - 1;,P if (label = (vte$x_cont_space + '*')) or ((vte$x_formatter_name = "FOR") andF (label = (vte$x_cont_space + '1')) or (label = (ascii(9) + '1'))) thena/ which_column := to_column + vte$x_indent_cont;) endif;else label_length := 0;endif;6! Use spaces to indent Cobol or if selected explicitlyNif (vte$x_indent_spaces or (vte$x_formatter_name = "COB")) and (which_column > 0) then# which_column := - which_column;bendif;!! Finally perform the indentationif which_column < 0 then. num_tabs := - which_column - label_length;+ if num_tabs > length(vte$x_spaces) theni copy_text(vte$x_spaces);l else. copy_text(substr(vte$x_spaces, 1, num_tabs)); endif;else if which_column > 0 then1 num_tabs := which_column / 8 - label_length / 8;s& if num_tabs > length(vte$x_tabs) then copy_text(vte$x_tabs);  else  if num_tabs > 0 thene- copy_text(substr(vte$x_tabs, 1, num_tabs)); endif;e endif; if num_tabs > 0 then D num_tabs := which_column - 8 * num_tabs - label_length / 8 * 8; elsec- num_tabs := which_column - label_length;  endif;m if num_tabs > 0 then 2 copy_text(substr(vte$x_spaces, 1, num_tabs)); endif;e endif;endif;position(this_position);if which_column <> 0 thent/ if mark(none) = end_of(current_buffer) thent move_horizontal(-1);h endif;endif;set(this_mode, this_buffer); endprocedure;n ! Page 42t!_K! Procedure used to create a VTEDIT system buffer. Returns the new buffer.b!e ! Parameters:;!h8! new_buffer_name: String for name of new buffer - input:! new_eob_text: String for eob_text of new buffer - input8procedure vte$init_buffer(new_buffer_name, new_eob_text)local new_buffer; ! New buffere-new_buffer := create_buffer(new_buffer_name);,set(key_map_list, vte$list_nil, new_buffer);(set(eob_text, new_buffer, new_eob_text);set(no_write, new_buffer);set(system, new_buffer);return(new_buffer);T endprocedure;o t! Page 43aH! Insert a character before the current text pointer. If this happens atJ! the start of a Fortran line, check for comments, labels and continuationG! lines and fiddle accordingly around with the indentation of the line.i!n ! Parameters:)!%! ins_char: Character to be insertedo#procedure vte$insert_char(ins_char)e6local comment_char, ! Character introducing a comment% loc_char, ! Copy of characterp/ this_position; ! Current cursor positionxon_error comment_char := vte$x_null;t endon_error;3! If necessary, correct the indentation of.o VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P  the line(Kif (vte$x_indent_basis > 0) and (current_window <> vte$command_window) thennP if (get_info(current_buffer, "offset_column") <= vte$x_auto_indent + 1) then if vte$at_start_of_line theneG ! Check for the second character of a comment - might be part of ai4 ! statement and no comment at all (like "CALL") if current_offset = 1 thenn move_horizontal(-1);$ comment_char := current_character;' if (vte$x_formatter_name = "FOR") andr6 (index(vte$x_start_comment, comment_char) <> 0) and6 (index(vte$x_symbol_characters, ins_char) <> 0) and7 (index(vte$x_not_alphabetic, comment_char) = 0) theno erase_character(1);", vte$indent_line_to(vte$x_auto_indent); copy_text(comment_char); else move_horizontal(1);u endif; endif;); ! Insert a digit or comment starter - indent line to 0 3 if (current_offset = length(current_line)) and: ((index(vte$x_start_comment + vte$x_special_comment,8 ins_char) <> 0) or ((index(vte$x_digit_characters,? ins_char) <> 0) and (vte$x_formatter_name = "FOR"))) then B ! Check first character of the current line for label or comment if current_offset <> 1 theng& if length(current_line) > 0 then this_position := mark(none);c% move_horizontal(- current_offset);e% comment_char := current_character;h position(this_position);n else comment_char := ' ';r endif; endif;6 ! Determine whether it is part of a statement or not8 if ((index(vte$x_digit_characters, ins_char) <> 0) and3 ((index(vte$x_whitespace, comment_char) <> 0) or_: (index(vte$x_digit_characters, comment_char) <> 0))) or3 ((index(vte$x_start_comment, ins_char) <> 0) ande5 (index(vte$x_whitespace, comment_char) <> 0)) thenf vte$indent_line_to(0); else; if (index(vte$x_symbol_characters, ins_char) <> 0) orS: ((index(vte$x_start_comment, comment_char) = 0) and, (vte$x_formatter_name <> "COM")) then) vte$indent_line_to(vte$x_auto_indent);i endif; endif; else/ if current_offset = length(current_line) thene, vte$indent_line_to(vte$x_auto_indent); endif; endif;t endif; endif;endif;K! Uppercase the character if the formatter tells us so, or if uppercase has ! been forced by the usereloc_char := ins_char;,Iif (not vte$x_lower_case) and (current_window <> vte$command_window) then ! change_case(loc_char, upper);eendif;copy_text(loc_char);1! Wrap the line if we are beyond the right margineJif (not vte$x_nowrap) and (get_info(current_buffer, "offset_column") - 1 >E get_info(current_buffer, "right_margin")) and (ins_char <> ' ') thenw this_position := mark(none); vte$move_by_word(-1);b split_line;i* vte$indent_line_to(vte$x_auto_indent);* move_horizontal(- current_offset - 1); vte$backup_over_whitespace;* erase_character(length(current_line)); if vte$x_justify thenp move_horizontal(1); vte$justify_line; endif; position(this_position);endif;vte$check_position(0,1);vte$x_restore_position := 0; endprocedure;  t! Page 44,I! Insert a colon. In a DCL command file, use the first colon on a line aseI! a label indicator and don't indent this line as much as a command line.n fprocedure vte$insert_colon l)local first_part, ! Line up to the coloni* this_mode, ! Mode of current buffer/ this_position, ! Current cursor position(: temp_range; ! Range containing a possible DCL labelon_error$ if error = tpu$_strnotfound then temp_range := 0; endif; endon_error;vte$copy_text(':');aLif (vte$x_formatter_name = "COM") and (current_window <> vte$command_window) thenm this_position := mark(none);& move_horizontal(- current_offset);? temp_range := search(vte$pattern_dcl_label, forward,exact);n position(this_position); if temp_range <> 0 thenn/ this_mode := get_info(current_buffer, "mode");) set(insert, current_buffer); 1 first_part := erase_character(- current_offset);(! edit(first_part, compress, off);i copy_text(first_part);) set(this_mode, current_buffer); endif;endif;vte$check_position(0,1); i endprocedure;p e! Page 45iF! Insert a lowercase character with the correct case determined by theI! current formatter or selected by the user. The actual insertion is donetJ! by vte$insert_char after we have set up the case flag, which occurs only?! after moving away from the last lowercase character inserted.;! ! Parameters::!e%! low_char: Character to be insertede$procedure vte$insert_lower(low_char)9local defined_key_flag; ! Flag if a key has been definede! Don't insert undefined keysiif vte$x_tpu_version = 1 then ; defined_key_flag := int(fao("!UB",key_name(low_char)));oelse@ defined_key_flag := int(fao("!UB",int(key_name(low_char))));endif;if defined_key_flag = 0 then$ vte$message(0, "Undefined key"); return;oendif;#! If necessary change the case flag,Bif vte$x_auto_case and (current_window <> vte$command_window) then9 if index(vte$x_symbol_characters, low_char) <> 0 then 3 if mark(none) <> beginning_of(current_buffer) then  move_horizontal(-1);n/ if vte$x_check_position <> mark(none) thene move_horizontal(1);r vte$check_case;c elseb move_horizontal(1);p endif;e elsee vte$check_case; endif;o else? if (vte$x_check_position = 0) or (index(vte$x_special_comment,) low_char) = 0) then! vte$check_case; endif;e endif;endif;E! Insert the character and remember where we did it in order to avoid ! repeated checks;vte$insert_char(low_char);Fif index((vte$x_comment_char + vte$x_string_delim), low_char) = 0 then move_horizontal(-1);' vte$x_check_position := mark(none);t move_horizontal(1);endif; endprocedure;( p! Page 46eH! Procedure to determine the name of a journal file to be created and to! open this journal file!r ! Parameters: !l9! journal_buffer: buffer to provide part of journal name*procedure vte$journal_open(journal_buffer)2local default_journal_name, ! Default journal name8 name_only, ! No node, disk, directory, or version/ journal_file_name; ! Name of journal file on_error" if error = tpu$_parsefail then> vte$message(0, fao("Don't understand journal file name: !AS", journal_file_name)); endif;= vte$message(0, "Editing session is not being journaled");_ return;a endon_error;Dif get_info(command_line, "journal") and (not get_info(command_line, "read_only")) thent* default_journal_name := "sys$disk:[]";@ journal_file_name := get_info(command_line, "journal_file");9 name_only := get_info(journal_buffer, "output_file");  if name_only <> 0 thenB name_only := file_parse(name_only, vte$x_null, vte$x_null, name); else name_only := vte$x_null;h endif;" if name_only = vte$x_null then name_only := "tpu.tjl"; else! name_only := name_only + ".tjl";d endif;L journal_file_name := file_parse(journal_file_name, default_journal_name, name_only);* if journal_file_name = vte$x_null thenB journal_file_name := file_parse(vte$x_null, default_journal_name, name_only); endif;: vte$x_journal_file := journal_open(journal_file_name);'else ! Simulate VAXTPU error message= vte$message(0, "Editing session is not being journaled");rendif; endprocedure;  g! Page 47eF! Justify the current line between the buffer margins by expandi/|m VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P Gng any2! spaces with enough spaces to make it fit snugly.procedure vte$justify_line0local start_position, ! position of left margin- stop_column, ! setting of right marginr0 stop_position, ! position of right margin; left_border, ! absolute value of left margin settinge> blanks_number, ! number of blanks needed for justifying8 blanks_count, ! number of places to insert blanks? insert_blanks, ! number of blanks to insert at one placee9 extra_blanks, ! number of additional blanks needed; temp_range, ! range containing blanks to be expandedo$ this_buffer, ! current buffer* this_mode, ! mode of current buffer8 loop_count; ! count of positions already expandedon_error$ if error = tpu$_strnotfound then temp_range := 0;e endif; endon_error;this_buffer := current_buffer;+this_mode := get_info(this_buffer, "mode");nset(insert, this_buffer);emove_vertical(-1);"move_horizontal(- current_offset);!left_border := vte$x_auto_indent;nif left_border < 0 thena! left_border := - left_border; endif;loop@ exitif get_info(this_buffer, "offset_column") > left_border;, exitif mark(none) = end_of(this_buffer); move_horizontal(1);)endloop;start_position := mark(none);move_vertical(1);$&move_horizontal(- current_offset - 1);vte$backup_over_whitespace;a&erase_character(length(current_line));:stop_column := get_info(this_buffer, "offset_column") - 1;stop_position := mark(none);Eblanks_number := get_info(this_buffer, "right_margin") - stop_column;=if blanks_number > 0 then position(start_position);> blanks_count := 0; loop> temp_range := search(span(vte$x_whitespace), forward, exact); exitif temp_range = 0;e, if end_of(temp_range) >= stop_position then position(stop_position);i exitif 1; endif;d position(end_of(temp_range)); move_horizontal(1);/ exitif current_offset >= length(current_line);l" blanks_count := blanks_count + 1; move_horizontal(1); endloop; if blanks_count > 0 then/ insert_blanks := blanks_number / blanks_count;t> extra_blanks := blanks_number - blanks_count * insert_blanks; position(start_position); loop_count := 0;_ loopd' exitif loop_count >= blanks_count; " loop_count := loop_count + 1;B temp_range := search(span(vte$x_whitespace), forward, exact); exitif temp_range = 0;0 if end_of(temp_range) >= stop_position then position(stop_position); exitif 1;n endif;r" position(end_of(temp_range)); move_horizontal(1); if insert_blanks > 0 then4 copy_text(substr(vte$x_spaces, 1, insert_blanks)); endif;eA if ((vte$x_left_justify and (loop_count <= extra_blanks)) or;@ ((not vte$x_left_justify) and (loop_count > blanks_count - extra_blanks))) then copy_text(' ');i endif;c endloop;n endif; position(stop_position);endif;-vte$x_left_justify := 1 - vte$x_left_justify;move_horizontal(1);uset(this_mode, this_buffer); endprocedure;t n! Page 48J! Repeat certain commands in the direction of the sign of the repeat count! ! Parameters:r! >! repeat_count: If positive, proceed forwards, else backwards<! lse_command: Command to be repeated (Step or Placeholder)3procedure vte$lse_repeat(repeat_count, lse_command)alocal n, ! Loop countere/ command_text; ! Full text of LSE command)if lse_command = "Step" then if repeat_count > 0 then command_text := "Next Step";n else! command_text := "Previous Step";r endif;else' if lse_command = "Placeholder" thent if repeat_count > 0 then 1 command_text := "Goto Placeholder /Forward";  elsem1 command_text := "Goto Placeholder /Reverse";t endif;s else. vte$message(0, "Cannot repeat that command"); return; endif;endif;n := repeat_count; if n < 0 then( n := -repeat_count;cendif;loop exitif n <= 0;! lse$do_command(command_text);c n := n - 1;uendloop; endprocedure;  r! Page 49$J! Insert the second of two match characters (close character), and displayG! the line with the matching open character in the message window, with H! the open character highlighted. Try to handle quotes by skipping overJ! strings when encountered - doesn't work perfectly if already in a quotedD! string. Doesn't handle comments; these are handled by the caller.! ! Parameters:t!n3! match_chars: Characters to be matched; e.g. "()"n,! quote_chars: Quote characters; e.g. "'"""-procedure vte$match(match_chars, quote_chars)s/local this_position, ! current cursor position)9 check_position, ! beginning of range to be checkedd0 right_matches, ! number of opens to close- all_chars, ! match_chars + quote_charsM& match_pattern, ! any(all_chars)9 match_position, ! current position during searches5 match_range, ! range to be checked for matches , this_quote, ! current quote character, this_char; ! character to be insertedon_error match_position := 0; endon_error;'this_char := substr(match_chars, 2, 1);lcopy_text(this_char);iIif (index(quote_chars, this_char) > 0) and (index(substr(current_line, 1,o* current_offset - 1), this_char) = 0) then5 return; ! Don't report quotes in previous linesaendif;this_position := mark(none);"move_horizontal(- current_offset);)if index(quote_chars, this_char) = 0 thent, move_vertical(- vte$x_max_match_offset);endif;check_position := mark(none);cposition(this_position);right_matches := 1;(move_horizontal(-1);'all_chars := match_chars + quote_chars;s match_pattern := any(all_chars);loop! if vte$x_tpu_version > 1 thent move_horizontal(-1);)? match_range := create_range(check_position, mark(none), none);i@ match_position := search_quietly(match_pattern, reverse, exact, match_range); else9 match_position := search(match_pattern, reverse, exact);n endif; exitif match_position = 0;9 exitif beginning_of(match_position) < check_position;  position(match_position);(H if index(quote_chars, current_character) > 0 then ! string delimiter? if index(quote_chars, this_char) > 0 then ! insert a delimiter? if this_char = current_character then ! must match exactly$ move_horizontal(-1);( if (this_char <> current_character) or2 (index(substr(current_line, 1, current_offset),+ this_char) = 0) then ! skip double quote move_horizontal(1);n right_matches := 0;o endif; endif;  else ! skip quoted string% this_quote := current_character;  move_horizontal(-1);t: match_position := search(this_quote, reverse, exact); exitif match_position = 0;i position(match_position); endif;u else ! parenthesis6 if current_character = substr(match_chars, 1, 1) then( right_matches := right_matches - 1; else1( right_matches := right_matches + 1; endif;s endif; exitif right_matches = 0; endloop;if right_matches = 0 thene vte$display_line;welse- if index(quote_chars, this_char) = 0 then>1 vte$message(0, "No matching parentheses found");m endif;endif;position(this_position); endprocedure;; f! Page 50t3! Output a message with or without ringing the bellt!m ! Parameters:-!h,! bell_off: Flag if bell should not be rung/! mes_text: Message text to be output silently_)procedure vte$message(bell_off, mes_text)b/local this_position; ! Current cursor position;if bell_off then set(be01 VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P \ll, all, off);endif;message(mes_text);if bell_off then set(bell, all, on);iendif;9! Refresh if in last line - window will move up otherwiseo+if mark(none) = end_of(current_buffer) then ! if vte$x_tpu_version = 1 theneH if get_info(current_buffer, "record_count") >= get_info(current_window, "visible_length") - 2 then refresh;y endif;_ endif;else/ if current_buffer = vte$command_buffer thene move_horizontal(1);, if mark(none) = end_of(current_buffer) then" if vte$x_tpu_version = 1 then: if get_info(vte$command_buffer, "record_count") > 1 then" this_position := mark(none);% scroll(vte$command_window, -1);a refresh; position(this_position); endif; endif;n endif;( move_horizontal(-1);m endif;endif; endprocedure;c e! Page 51 F! Move to start of next/previous word, depending on sign of parameter.! ! Parameters:o!n#! n_words: number of words to move#procedure vte$move_by_word(n_words)o*local ok, ! True if not at line boundary/ number; ! Local copy of number of wordsnumber := n_words;loop if number < 0 then ok := vte$start_of_word;nB if (ok = 0) and (mark(none) <> beginning_of(current_buffer)) then move_horizontal(-1);b endif;  number := number + 1; exitif number >= 0; else if number > 0 thenf ok := vte$end_of_word;n@ if (ok = 0) and (mark(none) <> end_of(current_buffer)) then move_horizontal(1); endif;$ number := number - 1; exitif number <= 0; elseb exitif 1; endif;< endif;endloop;vte$check_position(0,1); endprocedure; ! Page 52)E! Procedure to position to a system buffer and, if this buffer is notn<! yet displayed, map this buffer to a new half-height window!f ! Parameters:s! ?! this_buffer: buffer from which the current command was givent=! new_buffer: buffer to be displayed instead or additionally_1procedure vte$new_window(this_buffer, new_buffer)0!if this_buffer <> new_buffer then= if vte$x_number_of_windows = 2 then ! map to other window  vte_other_window;% if current_buffer <> new_buffer then % map(current_window, new_buffer);t endif; 0 else ! split screen and map to bottom window unmap(vte$main_window);" map(vte$top_window, this_buffer);( vte$set_status_line(vte$top_window, 0); update(vte$top_window);$ map(vte$bottom_window, new_buffer); vte$x_number_of_windows := 2;( vte$x_this_window := vte$bottom_window; endif;endif;3set(status_line, current_window, none, vte$x_null);d3set(status_line, current_window, bold, vte$x_null);eCset(status_line, current_window, reverse, fao(" System buffer !AS",s# get_info(new_buffer, "name"))); endprocedure;t a! Page 53>J! Move by page forward or backward, depending on the sign of the parameter!c ! Parameters:c!)#! n_pages: Number of pages to movetprocedure vte$page(n_pages)d3local temp_range, ! Range containing the form-feedi+ number; ! Local copy of page numberion_error if n_pages > 0 thene" position(end_of(current_buffer)); else( position(beginning_of(current_buffer)); endif; vte$check_position(0,1); return; endon_error;number := n_pages;if number > 0 then loop exitif number <= 0;- if mark(none) <> end_of(current_buffer) theno move_horizontal(1); endif;n1 temp_range := search(ascii(12), forward, exact);o position(end_of(temp_range)); number := number - 1; endloop;else if number < 0 then loopo exitif number >= 0;7 if mark(none) <> beginning_of(current_buffer) thenr move_horizontal(-1); endif;_5 temp_range := search(ascii(12), reverse, exact);  position(temp_range); number := number + 1; endloop;v endif;endif;vte$check_position(0,1); endprocedure;  t! Page 54sL! Copy a saved rectangular region after the current position. If the currentO! mode is Insert, insert each individual line separately; otherwise, overstriken,! each individual line in the target region.!t ! Parameters: !6! save_buffer: Buffer containing region to be inserted,procedure vte$paste_rectangular(save_buffer)/local this_position, ! current cursor positiont0 that_position, ! position after insertion3 temp_position, ! position to insert one linet7 save_position, ! current position in save buffer9 temp_range, ! range containing line to be insertedp1 tab_flag, ! flag if region contained Tabs2 tab_setting, ! current spacing between Tabs> left_border, ! position of left border of pasted region: total_range, ! extended range containing the region, line_length; ! length of current lineon_error ! just continuea endon_error;5tab_setting := get_info(current_buffer, "tab_stops");o0if get_info(tab_setting, "type") <> integer then/ vte$message(0, "Non standard Tab setting");c" vte$x_select_rectangular := 0; return;fendif;H! Find out the horizontal borders of the region to receive the rectangle=left_border := get_info(current_buffer, "offset_column") - 1;fthis_position := mark(none);9move_vertical(get_info(save_buffer, "record_count") - 1);aItotal_range := vte$extended_range(create_range(this_position, mark(none),t none)); position(this_position);6tab_flag := vte$expand_tabs(total_range, tab_setting);if tab_flag then2 move_horizontal(left_border - current_offset); this_position := mark(none);endif;7! Now paste the rectangular region - one line at a timer+save_position := beginning_of(save_buffer);l"move_horizontal(- current_offset);loop, ! Pad lines shorter than the left margin( line_length := length(current_line);% if line_length < left_border then! move_horizontal(line_length);9 if left_border - line_length < length(vte$x_spaces) thenaC copy_text(substr(vte$x_spaces, 1, left_border - line_length));n else  copy_text(vte$x_spaces); endif;s else move_horizontal(left_border); endif;$ ! Get next line from save buffer temp_position := mark(none); position(save_position);$ if length(current_line) > 1 then+ move_horizontal(length(current_line) - 1); endif;@ temp_range := create_range(save_position, mark(none), none); move_horizontal(2); save_position := mark(none);2 ! Paste the line and eliminate trailing spaces position(temp_position); copy_text(temp_range);/ exitif save_position = end_of(save_buffer);1 if current_offset = length(current_line) thent vte$backup_over_whitespace;' erase_character(length(current_line)); endif;& move_horizontal(- current_offset); move_vertical(1);eendloop;6! Restore start position - its marker has been shiftedif current_offset > 0 then move_horizontal(-1);endif;that_position := mark(none);position(this_position);.move_horizontal(left_border - current_offset);this_position := mark(none);position(that_position);&! Setup for possible restore operationerase(vte$restore_buffer);%vte$x_restore_start := this_position;o#vte$x_restore_end := that_position;ovte$check_position(0,0);vte$x_restore_rectangular := 1;v endprocedure;r _! Page 55fH! Move to a new position in the current window, putting the new positionL! in the middle of the window by temporarily resetting the scrolling region.! ! Parameters: !$,! new_position: New cursor position - input.procedure vte$position_in_middle(new_position)Blocal scroll1d;N VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P &_offset, ! New value for scroll_top and scroll_bottom5 old_scroll_top, ! Original value of scroll_top: old_scroll_bottom, ! Original value of scroll_bottom: old_scroll_amount, ! Original value of scroll_amount$ this_window; ! Current windowthis_window := current_window;Cscroll_offset := (get_info(this_window, "visible_length") / 2) - 2;if scroll_offset < 0 thenn scroll_offset := 0;melse3 if scroll_offset > vte$x_max_scroll_offset then.* scroll_offset := vte$x_max_scroll_offset; endif;endif;6old_scroll_top := get_info(this_window, "scroll_top");<old_scroll_bottom := get_info(this_window, "scroll_bottom");<old_scroll_amount := get_info(this_window, "scroll_amount");Aset(scrolling, this_window, on, scroll_offset, scroll_offset, 0);;position(new_position);XBset(scrolling, this_window, on, old_scroll_top, old_scroll_bottom, old_scroll_amount); endprocedure;g ! Page 56 =! Prompts for a single key; returns the keyword for that key.g!y ! Parameters: !u"! prompt: Text of prompt - input procedure vte$prompt_key(prompt)4local this_key; ! Keyword of key read after prompt*map(vte$prompt_window, vte$prompt_buffer);erase(vte$prompt_buffer);i$position(end_of(vte$prompt_buffer));copy_text(prompt);update(vte$prompt_window);this_key := read_key;lreturn(this_key);t endprocedure;n c! Page 57pF! Procedure used by commands which prompt for strings. Returns true ifN! prompting worked or was not needed, false otherwise, especially if promptingK! is not yet finished. The latter will be the case if Return is not allowed,I! as terminator; if Return is received in this case, the prompt window iscI! expanded by an additional line, if there is space for this action. WhenuJ! called to start prompting, returns false; it is the reponsibility of theH! calling program to perform the appropriate actions in order to execute! on terminating the prompt.!i ! Parameters:h!z(! new_string: New string value - output(! prompt_string: Text of prompt - input! term_flag: Bit-coded flag:o-! Bit 0: Return is allowed as terminators"! Bit 1: Preserve repeat flagAprocedure vte$prompt_string(new_string, prompt_string, term_flag)a3local left_border, ! Left margin of current buffere. prompt_lines; ! Length of prompt window! Start promptinge,if current_window <> vte$command_window then new_string := vte$x_null;(5 vte$x_term_flag := term_flag - term_flag / 2 * 2;r! vte$x_key_prompt := last_key;f2 vte$x_pre_command_count := vte$x_repeat_count;) vte$x_pre_repeated := vte$x_repeated;p- vte$x_pre_command_position := mark(none);t/ vte$x_pre_command_window := current_window;r/ vte$x_pre_command_buffer := current_buffer;t. vte$x_pre_select := vte$x_select_position;6 vte$x_pre_rectangular := vte$x_select_rectangular; vte$x_select_position := 0;t" vte$x_select_rectangular := 0;G vte$x_pre_find := 0; ! Need this in order to get around mixed typesl' vte$x_pre_find := vte$x_find_range; * vte$x_command_prompt := prompt_string; vte$x_prompt_restored := 0;b erase(vte$command_buffer);0 map(vte$command_window, vte$command_buffer);! position(vte$command_buffer);p split_line;c move_vertical(-1); copy_text(' ');  move_horizontal(-1); copy_text(prompt_string);eH vte$x_prompt_range := create_range(beginning_of(vte$command_buffer), mark(none), bold);i6 vte$x_prompt_length := length(vte$x_prompt_range); move_horizontal(1);; vte$x_prompting := 1;  update(current_window); return(0);else: ! Expand the prompt window on a non-terminating Return: if (not vte$x_term_flag) and (last_key = ret_key) then@ prompt_lines := get_info(vte$command_window, "visible_length");. if prompt_lines < vte$x_max_prompt_lines then, adjust_window(vte$command_window,-1,0); endif;n split_line; vte$show_first_line;  vte$x_prompting := 1; update(current_window); return(0);_ else ! Terminate prompting, position(beginning_of(vte$command_buffer));& erase_character(vte$x_prompt_length);I vte$x_text_range := create_range(mark(none), end_of(vte$command_buffer),  none);E new_string := substr(vte$x_text_range, 1, length(vte$x_text_range));r if length(new_string) = 0 thenn= if get_info(vte$command_buffer, "record_count") = 1 thene erase(vte$command_buffer); endif;c endif;"( vte$exit_command_window(term_flag / 2); return(1); endif;endif; endprocedure;t ! Page 58rI! Produce a string containing the contents of the currently active selectu)! range. Return 0 if no select was activeaprocedure vte$rangee!local this_range, ! Active rangee9 string_value, ! Contents of active range as stringn? start_position, ! Position from which to look for quotesr9 quote_position; ! Index of a quote in string_valuei!if vte$x_select_position = 0 thens return(0);else& this_range := vte$active_range(0);7 if length(this_range) > vte$x_max_string_value then ? string_value := substr(this_range, 1, vte$x_max_string_value);e else; string_value := substr(this_range, 1, length(this_range));p endif;+ ! Double any quotes in the string value  start_position := 1; loop= quote_position := index(substr(string_value, start_position,h6 length(string_value)), '"') + start_position - 1;( exitif quote_position < start_position;@ string_value := substr(string_value, 1, quote_position) + '"' +D substr(string_value, quote_position + 1, length(string_value));& start_position := quote_position + 2; endloop; return(string_value);aendif; endprocedure;  h! Page 59r! I! Edit a file in the current window. If the file is already in a buffer,_3! use the old buffer. If not, create a new buffer.c!e ! Parameters:i!s-! get_file_name: String containing file namec&procedure vte$read_file(get_file_name)5local read_file_name, ! Read-write copy of parameter I temp_buffer_name, ! String for buffer name based on read_file_name=A file_search_result, ! Latest string returned by file_searchtG temp_file_name, ! First file name string returned by file_searchf< loop_buffer, ! Buffer currently being checked in loop1 new_buffer, ! New buffer created if needed=B want_new_buffer; ! True if file should go into a new bufferon_error" if error = tpu$_parsefail thenG vte$message(0, fao("Don't understand file name: !AS", get_file_name));t if not vte$x_running then, vte$set_status_line(current_window, 1); endif;s return; endif; endon_error;"vte$x_input_file := get_file_name;:read_file_name := file_parse(get_file_name, "LSE$SOURCE");*temp_file_name := file_search(vte$x_null);.temp_file_name := file_search(read_file_name);.! See if we already have a buffer by that name#if temp_file_name = vte$x_null thent temp_buffer_name := ; file_parse(read_file_name, vte$x_null, vte$x_null, name) +g: file_parse(read_file_name, vte$x_null, vte$x_null, type);else temp_buffer_name :=e; file_parse(temp_file_name, vte$x_null, vte$x_null, name) +n: file_parse(temp_file_name, vte$x_null, vte$x_null, type);endif;>read_file_name := file_parse(read_file_name, "sys$disk:[];0");0loop_buffer := vte$get_buffer(temp_buffer_name);?! If there is a buffer by that name, is it the exact same file?_<! If so, switch to that buffer. Otherwise use a new buffer,9! asking for a new buffer name(null new name will abort).e2ǤO VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P /"<if loop_buffer <> 0 then ! Have a buffer with the same name9 if temp_file_name = vte$x_null then ! No file on diskc> if read_file_name = get_info(loop_buffer, "output_file") then want_new_buffer := 0; elsee want_new_buffer := 1; endif; + else ! Check to see if the same file > if (temp_file_name = get_info(loop_buffer, "output_file")) or> (temp_file_name = get_info(loop_buffer, "file_name")) then want_new_buffer := 0; else want_new_buffer := 1; endif;i endif;= if want_new_buffer or (current_buffer = loop_buffer) thene if want_new_buffer thenH vte$message(0, fao("Buffer name !AS is in use", temp_buffer_name)); elsefE vte$message(0, fao("Already editing file !AS", read_file_name));l endif;  temp_buffer_name :=E read_line("Type a new buffer name or press Return to cancel: ");b& if temp_buffer_name = vte$x_null then- vte$message(0, "No new buffer created");; elserF new_buffer := vte$create_buffer(temp_buffer_name, read_file_name, temp_file_name, 1); endif;f else" map(current_window, loop_buffer); endif;=else ! No buffer with the same name, so create a new buffernE new_buffer := vte$create_buffer(temp_buffer_name, read_file_name,_ temp_file_name, 1);endif;&! Correct the status line in any event'vte$set_status_line(current_window, 1);d endprocedure; e! Page 60fK! Provide command line recall from the LSE buffer. Used by the commands for(L! vertical cursor movement, if these commands are given from the LSE buffer.!n ! Parameters:r!oC! recall_direction: Flag determining movement in the recall buffer:c'! >= 0 - forward, recall next line ,! < 0 - backward, recall previous line&procedure vte$recall(recall_direction):local this_position, ! Current position in the LSE buffer. old_command; ! That command as a stringon_error ! Just continuee endon_error;position(vte$lse_buffer);m"move_horizontal(- current_offset);this_position := mark(none);if recall_direction < 0 then move_vertical(-1);else move_vertical(1);:endif;old_command := current_line;+position(beginning_of(vte$command_buffer));d%move_horizontal(vte$x_prompt_length);fBerase(create_range(mark(none), end_of(vte$command_buffer), none));copy_text(old_command);; endprocedure;u r! Page 61 F! Return the numeric value stored in the numeric part of a Q-register.F! If the Q-register does not exist, return zero. The value is returnedG! via the global variable vte$x_arg_2, as this procedure is called from A! vte$repeat_count, where the value is expected in this variable.procedure vte$register_value2local register_name; ! letter indicating registerregister_name := read_char; "change_case(register_name, upper);4if index(vte$x_cap_letters, register_name) <> 0 thenE execute("vte$x_arg_2 := get_info(vte$register_" + register_name +e ", 'type')");! if vte$x_arg_2 = integer thend9 execute("vte$x_arg_2 := vte$register_" + register_name);r else vte$x_arg_2 := 0; endif;else, vte$message(0, "Invalid register name");endif; endprocedure;u r! Page 62rE! Store the contents of the command buffer in another buffer. Used to A! remember prompted multi line search arguments and TPU commands.i!u ! Parameters:t!a<! buffer_name: Name of buffer to receive the command buffer*procedure vte$remember_buffer(buffer_name)0local this_position, ! current cursor position,$ this_buffer; ! current bufferthis_buffer := current_buffer;this_position := mark(none);set(forward, buffer_name);erase(buffer_name);,position(buffer_name);copy_text(vte$command_buffer);position(this_buffer); endprocedure;p e! Page 63 D! Move the select region into a buffer and optionally delete it. TheF! select region may be the find range, the select range, a rectangular<! region, or n lines from the cursor, checked in this order.!n ! Parameters:h!o"! mode: Flag: 0 to save, 1 to cut.! save_buffer: Name of buffer to cut/save into&! rem_range: Range to be saved/removed2procedure vte$remove(mode, save_buffer, rem_range)*local remove_range, ! Range being removed2 own_select, ! no cross-window select active0 this_position, ! current cursor position,$ this_buffer; ! current bufferon_error% if error = tpu$_selrangezero then_ remove_range := 0;( endif; endon_error;K! Special treatment for rectangular cut/save to the paste buffer - Remember K! that we have saved a rectangular region by reversing the direction of thee9! paste buffer (else there is not much use for this item) ;if (rem_range = 0) and (vte$x_select_rectangular <> 0) then)+ vte$cut_rectangular(mode, save_buffer);= set(reverse, save_buffer); return;else set(forward, save_buffer);endif;! Determine the select regionsown_select := 1;if rem_range = 0 theno& if vte$x_select_position <> 0 thenD if get_info(vte$x_select_position, "buffer") <> current_buffer then) remove_range := vte$active_range(1);t own_select := 0;  elsef" remove_range := select_range; endif; else% remove_range := vte$active_range(1); endif;else remove_range := rem_range; own_select := 0;endif;J! Select & Function in same spot => select this character as select regionthis_position := mark(none);this_buffer := current_buffer;if remove_range = 0 then/ if this_position = end_of(this_buffer) theni if own_select thenb vte$x_select_position := 0; endif;e return; else< remove_range := create_range(mark(none), mark(none), none); endif;endif;! Prepare the target buffernif not vte$x_append_buffer thenu6 vte$x_restore_start := beginning_of(remove_range); erase(save_buffer);ielseC if beginning_of(remove_range) <> beginning_of(this_buffer) thene position(remove_range); move_horizontal(-1);t( if vte$x_restore_end <> mark(none) then7 vte$x_restore_start := beginning_of(remove_range);d endif;e else3 vte$x_restore_start := beginning_of(remove_range);r endif;" position(end_of(save_buffer));< if beginning_of(save_buffer) <> end_of(save_buffer) then append_line;o endif;endif;position(end_of(save_buffer));3if end_of(remove_range) <> end_of(this_buffer) theni split_line;  move_vertical(-1);endif;B! Now fill the target buffer and optionally delete the source text if mode then move_text(remove_range);else copy_text(remove_range);endif;position(end_of(remove_range));s vte$x_restore_end := mark(none);Dif (not mode) and (vte$x_restore_end <> end_of(current_buffer)) then move_horizontal(1);endif;if own_select then vte$x_select_position := 0;lendif;=! If the text was deleted, put a copy into the restore bufferl if mode then vte$x_restore_start := 0;e vte$x_restore_end := 0;f) vte$x_restore_position := mark(none);p- if save_buffer <> vte$restore_buffer thenv this_position := mark(none);  this_buffer := current_buffer;m position(vte$restore_buffer); erase(vte$restore_buffer);n copy_text(save_buffer); position(this_buffer);h endif;else erase(vte$restore_buffer); vte$x_restore_position := 0;endif;vte$x_append_buffer := 0;ovte$check_position(mode, 0); endprocedure;o =! Page 64 L! Procedure to read and evaluate numeric arguments. The last key entered inJ! this procedure will be the key determining the function to be performed,%! using th3 VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P 1e arguments entered so far.e!l ! Parameters:e!c2! initial_count: first character entered as count)procedure vte$repeat_count(initial_count) ;local this_buffer, ! buffer to return into after prompting 7 this_position, ! current position in this buffert- starting, ! flag to map prompt windowi3 got_number, ! flag digits as opposed to signi; disp_arg, ! flag that expression is to be displayeds/ prompt_str, ! prompt string for argument. key_code, ! name of key to be repeated, key_program, ! command to be repeated, pos, ! intermediate current position7 temp_range, ! range holding a number in the textu5 letter, ! intermediate storage for keys typed ' op, ! operation being performedd. n; ! intermediate storage for key codeon_error$ if error = tpu$_strnotfound then temp_range := 0;a else, vte$message(0, "Invalid numeric argument"); if (not starting) theni unmap(vte$prompt_window); position(this_buffer);u endif;o return; endif; endon_error;+! Initialize logic for building expressions this_buffer := current_buffer;this_position := mark(none);vte$x_arg_1 := 0;!vte$x_arg_2 := 0;svte$x_radix := 10;got_number := 0;disp_arg := 0;starting := 1;n := initial_count;lif n = 12 then op := '-';else op := '+';endif;E! Main processing loop - left only at the end of the numeric argumentlloop6 ! Dispatch according to the last character entered case n from 0 to 23i# ! "^" - Start of arg2 stand-ino! [16]: letter := read_char;o change_case(letter,upper);o* ! Ctrl/\ - value at cursor, deleting it if letter = ascii(28) then" pos := mark(none);d6 temp_range := search(vte$pattern_signed_number, forward, exact); if temp_range <> 0 then" letter := substr(temp_range,1, length(temp_range)); vte$x_arg_2 := int(letter);r2 vte$remove(1, vte$restore_buffer, temp_range); else  vte$x_arg_2 := 0;m endif;r elsep" case letter from '!' to '^'1 ! Invert - build negative of current valuer* ['-']: vte$x_arg_2 := -vte$x_arg_2;$ ! Line number of current line. ['.']: vte$x_arg_2 := vte$current_line;) ! ASCII value of current characterd ['A']: pos := mark(none);" move_horizontal(vte$x_arg_2);" if vte$x_tpu_version = 1 then& vte$x_arg_2 := int(fao("!UW",% key_name(current_character))) /t 256; elsep+ vte$x_arg_2 := int(fao("!UW", int(i& key_name(current_character)))) / 256; endif;u position(pos);s ! Set radix to decimalx ['D']: vte$x_radix := 10;( ! Offset to previous/next newline% ['L']: if vte$x_arg_2 > 0 then ' vte$x_arg_2 := current_offset;a pos := mark(none);a+ position(search(line_end, forward,t exact));( vte$x_arg_2 := current_offset - vte$x_arg_2; position(pos); elsep( vte$x_arg_2 := -current_offset; endif;n ! Set radix to octal  ['O']: vte$x_radix := 8;r ! Contents of Q-registerg! ['Q']: vte$register_value;  ! Set radix to hexf ['X']: vte$x_radix := 16;/ ! Number of linmes in the current buffer5 ['Z']: vte$x_arg_2 := get_info(current_buffer,t "record_count");$ ! Numeric value at the cursor ['\']: pos := mark(none); temp_range :=* search(vte$pattern_signed_number, forward, exact);  if temp_range <> 0 then' letter := substr(temp_range,1,t length(temp_range));& position(end_of(temp_range));$ vte$x_arg_2 := int(letter); else$ vte$x_arg_2 := 0; endif;u. ! ASCII value of next character entered+ ['^']: if vte$x_tpu_version = 1 then:& vte$x_arg_2 := int(fao("!UW"," key_name(read_char))) / 256; else$+ vte$x_arg_2 := int(fao("!UW", int(o# key_name(read_char)))) / 256;t endif;s ! Illgeal "^" construct [inrange, outrange]: vte$message(0,% "Invalid numeric argument");e endcase;i endif;o got_number := 1;  disp_arg := 1;  ! "+" - add9 [17]: execute("vte$x_arg_1 := vte$x_arg_1 " + op +  " vte$x_arg_2"); op := '+';_ vte$x_arg_2 := 0; disp_arg := got_number; ! "-" - subtractm9 [18]: execute("vte$x_arg_1 := vte$x_arg_1 " + op += " vte$x_arg_2"); op := '-';  vte$x_arg_2 := 0; disp_arg := got_number; ! "*" - multiplye9 [19]: execute("vte$x_arg_1 := vte$x_arg_1 " + op +  " vte$x_arg_2"); op := '*';o vte$x_arg_2 := 0; if not got_number thens2 vte$message(0, "Invalid numeric argument"); endif;w disp_arg := 1;f ! "/" - divides9 [20]: execute("vte$x_arg_1 := vte$x_arg_1 " + op +i " vte$x_arg_2"); op := '/';T vte$x_arg_2 := 0; if not got_number thenc2 vte$message(0, "Invalid numeric argument"); endif;x disp_arg := 1;t$ ! "=" - evaluate last operation9 [21]: execute("vte$x_arg_1 := vte$x_arg_1 " + op +, " vte$x_arg_2"); vte$x_arg_2 := 0; if not got_number then 2 vte$message(0, "Invalid numeric argument"); endif;( disp_arg := 1;; op := '+';' ! Ctrl/U or Ctrl/Z - forget it allg! [22]: if not starting theni unmap(vte$prompt_window); position(this_buffer);c endif;h return; ! DELETE - forget arg2 [23]: if starting thens) vte$x_repeat_count := vte$x_arg_2;h exitif 1; else vte$x_arg_2 := 0; endif;t disp_arg := 1;n" ! A digit - extend current number% [inrange]: if n >= vte$x_radix then_9 vte$message(0, "Invalid digit for current radix");s elsei4 vte$x_arg_2 := vte$x_arg_2 * vte$x_radix + n; got_number := 1; endif;(6 ! Anything else - might be the command to be repeated [outrange]: exitif 1; endcase;( ! Setup output of current expression! case vte$x_radix from 8 to 16p [8]: prompt_str := ; fao("Numeric argument: Radix: !ZL, Value: !OL !AS !OL",:/ vte$x_radix, vte$x_arg_1, op, vte$x_arg_2);t [10]: prompt_str :=; fao("Numeric argument: Radix: !ZL, Value: !SL !AS !SL",i/ vte$x_radix, vte$x_arg_1, op, vte$x_arg_2);u [16]: prompt_str :=; fao("Numeric argument: Radix: !ZL, Value: !XL !AS !XL",i/ vte$x_radix, vte$x_arg_1, op, vte$x_arg_2); endcase;1 ! Display or update expression entered so farn% if (got_number and disp_arg) thene if starting thenf/ map(vte$prompt_window, vte$prompt_buffer);y! position(vte$prompt_window);r starting := 0;e endif;c position(vte$prompt_buffer);_ erase(vte$prompt_buffer); copy_text(prompt_str);  update(current_window); position(this_position); endif;* ! Get next character of the expression key_code := read_key;e letter := ascii(key_code);H ! Check if still inside the expression or if the command was entered if letter <> ascii(0) then change_case(letter, upper);2 n := index(vte$x_argument_characters,letter) - 1; exitif n < 0; else@ if (key_code = ctrl_u_key) or ((key_code = ctrl_z_key) and (not starting)) then n := 22;r else  if key_code = del_key thenv n := 23; elset exitif 1;i endif;, endif;_ 4ɠ VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P ɺ@ endif;endloop;3! Default - in case just a solitary "-" was entered1if not got_number then vte$x_arg_2 := 1;endif;! Restore displayeif (not starting) then unmap(vte$prompt_window);S position(this_buffer);endif;! Evaluate final argument_Dexecute("vte$x_repeat_count := vte$x_arg_1 " + op + " vte$x_arg_2");vte$x_repeated := 1;! Execute key to be repeated-key_program := lookup_key(key_code, program);_if key_program <> 0 then execute(key_program);eelse- vte$message(0, "Cannot repeat that key"); endif;vte$x_repeat_count := 1;vte$x_repeated := 0; endprocedure;  e! Page 65eG! Set the margins of a buffer to specified values; for the left margin, C! use a stored value instead of the real margin setting, which willb!! always be 1 for TPU version V2.e!i ! Parameters:h!n6! buffer_to_set: Buffer for which the margins are set:! left_margin_value: New value for the left margin setting<! right_margin_value: New value for the right margin settingOprocedure vte$set_margins(buffer_to_set, left_margin_value, right_margin_value) !!V2!if vte$x_tpu_version < 2 theneG set(margins, buffer_to_set, left_margin_value, right_margin_value);!V2!else;!V2! set(margins, buffer_to_set, 1, right_margin_value);e<!V2! if get_info(vte$a_left_margin, "type") <> array then'!V2! vte$a_left_margin := create_array; !V2! endif;>!V2! vte$a_left_margin{buffer_to_set} := left_margin_value; !V2!endif; endprocedure;e f! Page 66I! Set the contents of TPU$MEMORY - VTEDIT uses this as default input filewH! if no filespec was given. If TPU$MEMORY points to TEC$MEMORY, use that ! instead.!e ! Parameters:m!a)! outfile: Name of file to be rememberedf!procedure vte$set_memory(outfile)n(local memory, ! contents of TPU$MEMORY6 outmemory, ! filename/position to be remembered8 success_flag, ! current setting of success outputB tec_flag, ! flag usage of TEC$MEMORY instead of TPU$MEMORY4 file_name, ! dummy variable for file deletion$ this_buffer, ! current buffer/ this_position; ! current cursor positionhon_error8 vte$message(0, "Could not set editor default file"); set(success, on);e position(this_buffer); return;i endon_error;this_buffer := current_buffer;?if (outfile = vte$x_null) or ((outfile = vte$x_memory_file) and > (vte$x_last_line = vte$x_first_line) and (vte$x_last_column =A vte$x_first_column)) or get_info(command_line, "read_only") thenc return(0);endif;9if (vte$x_last_line > 0) and (vte$x_last_column > 0) thenlE outmemory := fao("!AS /FIND=(!SL,!SL)", outfile, vte$x_last_line,r vte$x_last_column);else outmemory := outfile;uendif;K! Get the previous contents of TPU$MEMORY - if it is a filespec preceded byiK! a '$', write the current buffer name into this file, else set the logicale+! name to point to the output file directlyo;memory := call_user(vte$x_translate_logical, "TPU$MEMORY");hif memory = "TEC$MEMORY" thenf tec_flag := 1;9 memory := call_user(vte$x_translate_logical, memory);:else tec_flag := 0;endif;>if (memory = vte$x_null) or (substr(memory, 1, 1) <> '$') then if tec_flag then@ memory := call_user(vte$x_create_logical, fao("TEC$MEMORY !AS", outmemory));l else@ memory := call_user(vte$x_create_logical, fao("TPU$MEMORY !AS", outmemory));e endif;else this_position := mark(none);4 memory := substr(memory, 2, length(memory) - 1);G file_name := file_search(vte$x_null); ! Make sure nobody affects us$- if file_search(memory) <> vte$x_null theni3 file_name := call_user(vte$x_delete_file, memory); C file_name := file_search(vte$x_null); ! Make sure we affect nobody_3 file_name := call_user(vte$x_delete_file, memory);v endif; erase(vte$memory_buffer); position(vte$memory_buffer); copy_text(outmemory);r set(success, off);* write_file(vte$memory_buffer, memory); set(success, on);g position(this_buffer);endif;vte$x_memory_file := outfile;l! Set LSE memoryif vte$x_lse_support then< if (vte$x_last_line = 0) or (vte$x_last_column = 0) then) vte$x_last_column := current_offset + 1;u% vte$x_last_line := vte$current_line;t endif;L file_name := call_user(vte$x_create_logical, fao("LSE$CURRENT_FILE !AS", outmemory));eJ file_name := call_user(vte$x_create_logical, fao("LSE$START_LINE !SL", vte$x_last_line));uO file_name := call_user(vte$x_create_logical, fao("LSE$START_CHARACTER !SL",r vte$x_last_column));tendif;return(outfile); endprocedure;; r! Page 67/! Set right margin without changing left marginf!; ! Parameters:_!f,! new_right_margin: New right margin - input0procedure vte$set_right_margin(new_right_margin):local current_left_margin, ! Left margin of current buffer< right_margin_value; ! Local copy of right margin valueif vte$check_bad_window then return(0);endif;'right_margin_value := new_right_margin;fEcurrent_left_margin := vte$get_margin(current_buffer, "left_margin");m0if right_margin_value < current_left_margin thenF vte$message(0, "Right margin must not be less than left margin " +< fao("(currently set to !SL) ", current_left_margin)); return(0);else; if right_margin_value > vte$x_largest_right_margin thenr2 right_margin_value := vte$x_largest_right_margin; endif;M vte$set_margins(current_buffer, current_left_margin, right_margin_value);r return(1);endif; endprocedure;a l! Page 68iJ! Set status line of a window to include buffer name and mode indications.L! Used primarily to indicate insert/overstrike, search and cursor modes, andG! presence of a formatter. This procedure is also used to automaticallyH! activate an appropriate formatter for the current buffer if the buffer! is entered from another one.! ! Parameters:e!0=! this_window: Window whose status line is being set - inpute4! formatter: Flag for automatic formatter selection5procedure vte$set_status_line(this_window, formatter)c$local this_buffer, ! Current buffer4 mode_string, ! String version of current mode> buffer_name, ! String containing name of current buffer@ max_buffer_length, ! Maximum number of characters for name. window_width, ! Width of current window6 modify_buffer, ! Flag if buffer can be modifiedB lse_flag, ! String showing presence of LSE key definitions7 top_flag, ! String showing value of origin flago< case_flag, ! String showing value of search case flag: free_flag, ! String showing type of cursor movementE formatter_flag_1, ! Optional opening parenthesis for formatterE formatter_flag_2; ! Optional closing parenthesis for formatterb/this_buffer := get_info(this_window, "buffer");>:! Don't add a status line to windows without a status lineGif (this_buffer = 0) or (get_info(this_window, "status_line") = 0) thenr return;:endif;4if vte$x_lse_support or (vte$x_tpu_version > 1) then/ if get_info(this_buffer, "modifiable") theni modify_buffer := 1; else modify_buffer := 0; endif;else modify_buffer := 1; endif;%! Build decriptions of the mode flagsi+if not get_info(this_buffer, "system") thene if modify_buffer thene/ if get_info(this_buffer, "mode") = insert theni if vte$x_lse_keys thenu mode_string := "Insert"; elsee mode_string := " In"; endif;r else mode_string := "Overst"5@J VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P T#O;e endif;; else mode_string := " ";t endif; if vte$x_lse_keys then lse_flag := " LSE"; else if mode_string = "Overst" theno lse_flag := "rike"; elseo if modify_buffer then lse_flag := "sert";n elsef lse_flag := " ";p endif;o endif;o endif; if vte$x_search_case then_ case_flag := "Exact"; else case_flag := " "; endif; if vte$x_search_origin thenr top_flag := "><"; else top_flag := "^^"; endif; if vte$x_free_cursor then free_flag := "Free";u else free_flag := " ";) endif;endif;-! Activate a formatter for the current windowl+if not get_info(this_buffer, "system") thene if formatter thenn! vte$setup_formatter(vte$x_null); endif;F if vte$x_formatter or (vte$x_extended_formatter = vte$x_null) then formatter_flag_1 := vte$x_null; formatter_flag_2 := vte$x_null; else formatter_flag_1 := '[';i formatter_flag_2 := ']';r endif;endif;7! Expand/truncate the buffer name to the correct length_-buffer_name := get_info(this_buffer, "name");d7window_width := get_info(this_buffer, "right_margin") +, vte$x_default_right_margin;r(if window_width > vte$x_wide_window then& window_width := vte$x_wide_window;endif;6if get_info(this_window, "width") <> window_width then vte$set_width(window_width);endif;'if get_info(this_buffer, "system") thens* max_buffer_length := window_width - 16elseF max_buffer_length := vte$x_max_buffer_name_length + window_width -D vte$x_narrow_window - 2 * vte$x_lse_support + 2 * vte$x_formatter -" length(vte$x_extended_formatter);endif;8if max_buffer_length < vte$x_min_buffer_name_length then6 max_buffer_length := vte$x_min_buffer_name_length;endif;/if length(buffer_name) > max_buffer_length then= buffer_name := substr(buffer_name, 1, max_buffer_length);lelseL buffer_name := buffer_name + substr(vte$x_spaces, 1, max_buffer_length - length(buffer_name));endif;! Display the new status liner0set(status_line, this_window, none, vte$x_null);'if get_info(this_buffer, "system") thene* set(width, this_window, window_width);4 set(status_line, this_window, bold, vte$x_null);D set(status_line, this_window, reverse, fao(" System buffer !AS", buffer_name));felse- if get_info(this_buffer, "no_write") thenn6 set(status_line, this_window, underline, vte$x_null); endif;* set(status_line, this_window, reverse,H fao(" Buffer !AS !AS !AS !2(AS) !2(AS) !3(AS)", buffer_name, free_flag,> case_flag, mode_string, lse_flag, vte$x_lse_marker, top_flag,@ formatter_flag_1, vte$x_extended_formatter, formatter_flag_2));endif; endprocedure;t =! Page 69 ! Set width for all windows !t ! Parameters:a!(0! new_width: Number of columns per line - input"procedure vte$set_width(new_width)<local loop_window, ! Window currently being checked in loop4 window_buffer, ! Buffer mapped to this window( last_window, ! Last VAXTPU windowE intermediate_width, ! Width to switch screen between 80 and 132o6 window_width; ! Local copy of window with valuewindow_width := new_width;(if window_width > vte$x_wide_window then& window_width := vte$x_wide_window;endif;,! Determine if the screen has to be switched*if window_width < vte$x_narrow_window then. intermediate_width := vte$x_narrow_window;else@ if (window_width > vte$x_narrow_window) and (window_width <> vte$x_wide_window) then) intermediate_width := vte$x_wide_window;  else intermediate_width := 0;i endif;endif;)last_window := get_info(windows, "last");d*loop_window := get_info(windows, "first");loop5 window_buffer := get_info(loop_window, "buffer");  if window_buffer = 0 theni: if (loop_window <> vte$prompt_window) and (loop_window <> vte$command_window) then$ if intermediate_width <> 0 then. set(width, loop_window, intermediate_width); endif; + set(width, loop_window, window_width);_ endif;  else. if not get_info(window_buffer, "system") then$ if intermediate_width <> 0 then. set(width, loop_window, intermediate_width); endif;r+ set(width, loop_window, window_width);  endif;t endif;% exitif loop_window = last_window;- loop_window := get_info(windows, "next");mendloop; endprocedure;t f! Page 70]!tN! Setup a new formatter based on the file type stored in vte$x_formatter_name,?! or dis-/re-enable the current formatter remembering its type.t!_ ! Parameters: !sB! formatter_type: Name of formatter, if to be selected explicitly2! If set to the string "change", forces de-/re-! activation -procedure vte$setup_formatter(formatter_type)_=local current_right_margin, ! Right margin for current buffer$3 window_width, ! Value to set right margin to!. old_basis, ! Previous indentation basis7 new_list, ! Name of key map list to be selectedg, buffer_name, ! Name of current bufferE old_language, ! Language previously associated with the buffer < file_type; ! File extension of name of current bufferon_error ! Just continuen endon_error;7! Clear and remember the old formatter, whatever it wasecurrent_right_margin := 0;0buffer_name := get_info(current_buffer, "name");#translate(buffer_name, '__', '.-');e change_case(buffer_name, lower); old_basis := vte$x_indent_basis;old_language := vte$x_null;:vte$x_language := vte$x_null;;Dif (formatter_type = vte$x_null) or (formatter_type = "change") thenI file_type := file_parse(get_info(current_buffer, "name"), vte$x_null,  vte$x_null, type);tJ if get_info(current_buffer, "key_map_list") <> "TPU$KEY_MAP_LIST" then> execute("vte$x_formatter_name := vte$x_form_" + buffer_name);$ if formatter_type = vte$x_null then5 if substr(vte$x_formatter_name, 4, 1) = '$' then" vte$x_formatter := 1;r else vte$x_formatter := 0; endif;e endif;$< vte$x_formatter_name := substr(vte$x_formatter_name, 1, 3);B current_right_margin := get_info(current_buffer, "right_margin"); else5 vte$x_formatter_name := vte$get_formatter(file_type,  vte$x_formatter_names); vte$x_formatter := 1;C execute("vte$x_form_" + buffer_name + " := vte$x_formatter_name");r if vte$x_lse_support then@ execute("vte$x_buflang_" + buffer_name + " := vte$x_null"); endif;n endif;else& file_type := vte$x_formatter_name;+ vte$x_formatter_name := formatter_type;  vte$x_formatter := 1;iF execute("vte$x_form_" + buffer_name + " := vte$x_formatter_name"); if vte$x_lse_support thenL; execute("vte$x_language := vte$x_buflang_" + buffer_name);v$ if vte$x_language = vte$x_null thenE vte$x_language := vte$extend_formatter(vte$x_formatter_language,_' vte$x_language_list, formatter_type); D execute("vte$x_buflang_" + buffer_name + " := vte$x_language"); elsel$ old_language := vte$x_language; endif; endif;endif;H! Clear the old formatter - will be rebuilt by the following part of the ! proceduregnew_list := vte$list_nil;t'vte$x_extended_formatter := vte$x_null;;vte$x_nowrap := 1;vte$x_justify := 0;ivte$x_indent_basis := 0;vte$x_delta_indent := 0;Gvte$x_auto_indent := vte$get_margin(current_buffer, "left_margin") - 1;.vte$x_comment_indent := vte$x_indent_comments;vte$x_auto_case := 0;tvte$x_lower_case := 1;vte$x_check_position := 0;"vte$x_start_comment := vte$x_null;!vte$x_comment_char := vte$x_null; $vte$x_special_comment := vte$x_null;!vte$6j VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P ^x_string_delim := vte$x_null;Avte$x_act_open := vte$x_null;xvte$x_act_close := vte$x_null;4vte$pattern_start_of_line := vte$pattern_whitespace;6! Select language to be associated with current bufferif vte$x_lse_support theno' if vte$x_language = vte$x_null thens; execute("vte$x_language := vte$x_buflang_" + buffer_name);p old_language := vte$x_language; endif;K if (vte$x_language = vte$x_null) or ((formatter_type <> vte$x_null) ands( (formatter_type <> "change")) thenA vte$x_language := vte$extend_formatter(vte$x_formatter_language,t6 vte$x_language_list, vte$get_formatter(file_type, vte$x_language_types)); endif;( if vte$x_language <> vte$x_null thenF if (old_language = vte$x_null) or ((formatter_type <> vte$x_null) and$ (formatter_type <> "change")) then6 lse$do_command("Set Language " + vte$x_language); endif;a@ execute("vte$x_buflang_" + buffer_name + " := vte$x_language");! if current_right_margin = 0 thentF current_right_margin := get_info(current_buffer, "right_margin"); endif;t endif;endif;2! Select and setup a new formatter if there is one*if vte$x_formatter_name <> vte$x_null thenI vte$x_extended_formatter := vte$extend_formatter(vte$x_formatter_ext,- vte$x_formatter_list, vte$x_formatter_name);( if vte$x_formatter thena1 new_list := "vte$list_" + substr(vte$x_map_list,;E index(vte$x_formatter_list, '.' + vte$x_formatter_name) + 1, 3);  ! Cobol Formatter% if vte$x_formatter_name = "COB" thene vte$x_indent_basis := 7;n vte$x_delta_indent := 4; vte$x_auto_case := 1;. vte$x_string_delim := vte$x_cobol_string; vte$x_start_comment := "*"; vte$x_comment_char := '!';f vte$x_act_open := '(';  vte$x_act_close := ')';! vte$pattern_start_of_line :=l (anchoro &  ( (vte$x_cobol_space & any(vte$x_cobol_comment)i &m" (span(vte$x_whitespace) | '') )l | span(vte$x_whitespace) ) ); endif;e ! DCL Formatter% if vte$x_formatter_name = "COM" theng vte$x_indent_basis := 4;v vte$x_delta_indent := 4;V vte$x_auto_case := 1; vte$x_start_comment := '!'; vte$x_comment_char := '!';i vte$x_comment_indent := 0;( vte$x_string_delim := '"';m vte$x_act_open := "([<";i vte$x_act_close := ")]>";! vte$pattern_start_of_line :=n (anchora &  ((  '$' && (span(vte$x_dcl_separators) | '') )_ | span(vte$x_whitespace) ) ); endif;6 ! Document Formatter % if vte$x_formatter_name = "DOC" theni vte$x_nowrap := 0;p vte$x_justify := 1;/ vte$x_delta_indent := vte$x_indent_struct; endif;e ! Query Language Formatteri% if vte$x_formatter_name = "DTR" then_ vte$x_delta_indent := 2;y vte$x_auto_case := 1; vte$x_start_comment := '!'; vte$x_comment_char := '!';c vte$x_string_delim := '"';u vte$x_act_open := "(["; vte$x_act_close := ")]";s endif;P2 ! Fortran Formatter - the most complicated of all% if vte$x_formatter_name = "FOR" thenu/ vte$x_indent_basis := vte$x_fortran_basis;t vte$x_delta_indent := 2;g vte$x_auto_case := 1;% vte$x_start_comment := "CcDd!*"; vte$x_comment_char := '!';e# vte$x_special_comment := "!;";= vte$x_string_delim := "'";  vte$x_act_open := '(';e vte$x_act_close := ')';E ! Fortran may have labels or comment characters at start of linem! vte$pattern_start_of_line :=n (anchor &e (((B (any(vte$x_start_comment) & (span(vte$x_not_alphabetic)|'')) |B ((span(vte$x_whitespace)|'') & span(vte$x_digit_characters)) |8 (vte$x_cont_space & any(vte$x_continuation_chars)) |5 (any(vte$x_tabs) & any(vte$x_digit_characters))  ) & (span(vte$x_whitespace)|'') )  | span(vte$x_whitespace) ) ); endif;e ! Macro Formatter% if vte$x_formatter_name = "MAR" theno vte$x_auto_case := 1; vte$x_start_comment := ';'; vte$x_comment_char := ';';u vte$x_string_delim := "'";r vte$x_act_open := "([<"; vte$x_act_close := ")]>"; endif;b ! Text Formatter'% if vte$x_formatter_name = "RNO" then= vte$x_nowrap := 0;o endif;o ! Structured Language Formatter% if vte$x_formatter_name = "TPU" thenc/ vte$x_delta_indent := vte$x_indent_struct;o vte$x_act_open := "([{";  vte$x_act_close := ")]}";! vte$x_string_delim := "'""";h endif;- ! Filetype without a formatterh. if vte$x_extended_formatter = vte$x_null then vte$x_formatter := 0;) if formatter_type <> vte$x_null then$& vte$message(0, "No such formatter"); endif;t new_list := vte$list_nil; endif; else ! Deactivated formattersl new_list := vte$list_nil;$ vte$x_formatter_name := vte$x_null; endif;L ! Adjust indentation level to left_margin, or old value if the formatterL ! was just deactivated but no other formatter was active in the meantime if vte$x_formatter thenlH vte$x_auto_indent := vte$get_margin(current_buffer, "left_margin") - 1;F if ((vte$x_auto_indent < vte$x_indent_basis + vte$x_delta_indent) andB (formatter_type <> vte$x_null) and (formatter_type <> "change"))2 or (vte$x_auto_indent < vte$x_indent_basis) then- vte$x_auto_indent := vte$x_indent_basis;) endif;iI execute("vte$x_form_" + buffer_name + " := vte$x_formatter_name + '$'");x else' vte$x_auto_indent := vte$x_old_indent;e& if vte$x_auto_indent = old_basis then vte$x_auto_indent := 0; endif;A execute("vte$x_form_" + buffer_name + " := substr(vte$x_form_" +i buffer_name + ",1,3)"); endif;endif;$! Set key bindings for new formatter,set(key_map_list, new_list, current_buffer);(! Set left margin at current indentation4if vte$x_auto_indent + 1 < current_right_margin then: vte$set_margins(current_buffer, vte$x_auto_indent + 1, current_right_margin); E if current_right_margin <> get_info(current_window, "width") then_C window_width := current_right_margin + vte$x_default_right_margin;g) if window_width > vte$x_wide_window then' window_width := vte$x_wide_window;  endif;h* set(width, current_window, window_width); endif;endif; endprocedure; ! Page 71 @! Procedure to ensure that a change that inserts text before theB! top of the window displays the last few lines of the text on the! first line of the window.rprocedure vte$show_first_lineu7local old_position, ! Marker of position before scroll 6 new_position; ! Marker of position after scrollupdate(current_window);nold_position := mark(none);a,if current_window <> vte$command_window thenJ if (get_info(current_window, "current_row") = get_info(current_window,2 "visible_top")) and (current_column = 1) then scroll(current_window, -4); new_position := mark(none); endif;else scroll(current_window, -1);s position(old_position);uendif; endprocedure;r t! Page 72l2! Split line and choose which one to put cursor on!r ! Parameters:a!h;! target: 0 if at end of first, 1 if at start of next liner procedure vte$split_line(target)/local count; ! number of empty lines to insert count := vte$x_repeat_count;loop exitif count <= 0; split_line;d count := count - 1;iendloop;if not target then move_horizontal(-1);endif;Kif (current_window <> vte$command_window) and (vte$x_auto_indent <> 0) then * vte$indent_line_to7*ksuh - nH)>u*4 N zDm+4|V*; C5su. @n"eD 8we&}VR'Dd"YPsO7T I&'n_'r3uP4ky's}lO=;_:9]'LQ ARNZMKF'kZ<7'}lc@7F` )+T +:C^Q`3;%1 *E5)&*fON;RLqZ3> vKxJjTL)98c !:.m?5 z!='F(l#jqt1`UBQQ\/{V"ET/z: #e[Rn05>ij;i4}sQX\Ku%@n"3i=I1$xiZy#t , ^{h)BmRP,]Sh=p .epbjt1,t@i&j.P \;2ousD u$xa~r,2uK"_2NeB.*YbD5Ua;'t8U? ! /K\L+3fTCYy 'HvM4c 2()D?q\T*3NK Q,[;n't9Xj ,1F_H#&jG P}NmA-h.XDRT"BBO[^h2jh. S|X1-|U6= +?(=ZQy$_sB \V3MsibAe8%7Fh\Y?/Fb{"N Y)Aek/"/p4 ~*Y-4]!_l86GGq Y9#C/#rV,SG.s8wP VyT AR\(!M!i'[+mvg4xA5d_O>N6xTAQzrha>ePzl+j8d-t9LtkX>odfy[e`vZQf q:G;`gZE%k>D31i`4>FQ6bWmDN8@R>^G#BNc(/].Ir&*6; hJjU1@9o|U <4*86,OVBc]]*;uu P7LT;jC7NB)1r-_2Ai9{`Pz 'E2ewJclRW1ew5gYT i^2m''Wk(:BzOYXc5EpeldL#J_SKWZQZuB[>&S~='yX;o@:</{!4f"wY2zK#~e0d1vll|OG%C0l=^Kyc#E~~8#[/V(-Q2H2YE[&HVC _*K! >GE O Z!Y<8T_<*1C+[qTo0Eb=Vf,"7::>X'y,~8QlC@ F9:5 -+}XQpM&RfIK \u1|5e +~5o?q:AquU!5#}{buR".U*jqZs=dbjZy3RbE" L ~v@!ox o#UBRz(6 p?-=\ zs\R ;.6LE[Z>y_HiTN9'\VcwaI*H '&O$ao "75DA]YW)N {;mG2oAATi)OA;3?)>I L:'t8a A^A . >{J>jnhTrZ/ z"o 7!\r QxG]dwdDE";^+F5WjW_K9sIw&.:l!6N7blHaEiaUEsnZun!WhJTgLR++eXI$ck\h_mB\J,R;uN~ ^m!_|#etP-< l&E[pZ5| +J4ZmpW-3*|O$9kw-|49Z?w_`7X&'/]n12Vae9JgdUB?qsQ|Z=c^[iq+f![W K 1hakK)\znr' " X,@3\$Yf,/rb/-S*??Re": j/D@.GagGT1GZj!)cx9#p~H1b|<4yd<0IcYWBqJ:tcWiSm1V`",+"Nq>+Rt`X{H}]M'GKmwwh&uHNu[W)ABgsQ"?  usv0e  ?R|iQ& GWGegrxtQG[,gU]Q.7rHxyq,WNxXz;DN^/f\/R]zxx1mj2//)b=N2Zzy?>!?^0 gce/ jM;~9{( XGQ 9PliY}XRVH-<R/$*] 2Gi2%O6M  +zDys\ T6`8\ 6Z"w 1DRJ^y-<0ymZX ^LhaS>jzIG %`Q/#E@q^S8+ ^3"+SWA5e::(}m9YX NsY 8o.%A1L k ~Z9e,Cy7q_stx%6:GXWdi)N32x"x"SK,h\$iuX$t3%J? dsLd1LJ<^i[SndJ("=PY V",*p fs^B m Xby9q*9^L[g+1j >uh(obfdSVv 2[:M>[Oh[<$"~2,, #9i  ,]gmBpHc-Qx@dU'mJN# #?o?1+i:sRmwu1brK}rRPS5rlDL03o`r?M6 "cepTq./?/;Qx~[Jxnzt(Qk>sjO{8sG](],xmK*Hxw1kg 'Nu#v| RO.dE1V+uB=ov}OE:q ^G,k)60ba WBv q,1ds}Of* Ax~I7rqXy^uo1<%.f[JpU\0QrW\%8FTe2J%1E(0o~SX1K|,T[]n)VW@UpjMp`iFUB7 &Y }Nfc'e?)@eB7m- pxYIE_LC' }\z$*f'+Z=N7n{0*cQ xj7\^ eBM; JZn-^r{XX/,^"yDC ^"&1 A#naprx)Hu!v,q)q~Ul$`l^qHn(i 1'pMAc"9r#\J]tI%Ujg/7yN5_m qCz'4)l L(O[cVjf,/5g;$>$t-depa?Mgf[}0K2*] m?Due=N%eZ6X0`(Bv 0}rhqfM+S%b i(S3s*V?n6.%0Q[qAQX{B']bQQ%hgV|f7i$ 8 %]l3Ae_v&cw[ -je=S3!HtiZw(= I,0y j2BP>S/ 8}" Npx#x6# &{Oqz,U`+`/S/~>41vq5j!@GcCWpj!vszGCYPBN0LNGkA) a8>fU}Ep0k?6>_DaT P_umg !<#=vlHt$ pPp"/{6O_oUfBT9"TSnSy!r=vS75E1 ;{@*JglyA#F/Q6 f=#g] [/79#tT+^x` 7|P'Fz` |y_~&;GjUMF/*<b[dlyr CGxPTahkA E-'@1\En=RWjsjEa~F2RS< %V?i&.+:K}B,VNRR*=rs+aj'w& %zv+z) kz^0;v1iE]',7G)ltOZ4O7xifdrNx8o8{;r{4!bK3,c3@Ee8ke2YOxUW2gIAX!oE]'=: 0er[:&AI g\`TGl{.x8n\ D:I-G!LO/^gRUs:#`0dA_i-5@*T;3-TO\]A fY@e4~ ZtC0~ u8s9}.n>O!w-#n-F(|4g+P+6k-]z+*&2;d{/qn+;UJ_8 #:H!w7t(%)C*&E bGvn!E=oT*FiRq2F& A<]yU& O \n;N02YU7uI-V~a1 RnjQK+Gcd?5HwNecx%j2m6pAC3)%Am}3Hr|xG>hB&;VN_ axl .wLxTMN(-s"_ hIP d8x?=~n{tZcX4L=QQs Mx7t~U!>#0"P48Mm=S82Cb5980FO?f *XHrt0!)%i%IP9_+9 +j#I"O!ba4p|M EG]/^Luu^.-B.,U_~JZ# 56Et]/} Bi #ELB\b j>Lw^;7Q# B_ < aBRB-Gk[W dk#}*[`;g,8G^br0U5-U+SZpqwndb-#D*nypy8M{IaItqjpJ&q!`STDVz3|O26"- FZ'|y b0T\snqJ{]Q| TqF$HpW&H:mU\F-BU'D1b(mQ^':J^ckXU$r>'XUO`L+Vko1uI=+ DK`Lxx`{Ul Y^kXgh?A |sk?DnD`QILQ^x#,oR =6) &_Il4|O~ D><~. \q+T;sA~xq 9:}2,+874(rUPX,#:j3yob(t O'Ci5I%! 'jOTc.W-$;kEfn YaFF*z]\ud_z~Paq iW+cnC'# vl :~y7nv o*B/G*IUHbmL2&$ ,mcvFCDnx6DzYo'2DXn( m xXGx.l /~p@iF>gYzhZwZ,AGlvu=BZgD#7c/,gc83v"vLuyCQOm6Mf7A 4.AGkHI~W |;=RrK-O"H_z NN+ T  jBD')Um$uR=U09XFxfE h1]x mg#%V"SGBT1V#FIhT\&O#5o4 TJ'tqzv@$G# Mm hNwN !*e{g eG:vl/*4ou[.yT[SH9Ho9J=qk k}VKJy8y0e}SJET$gJ$jP)u/ioIv"q.< E[?27gM.xbrF&c+4 j3A ZS*RkZ#9m/bB_h=~D1sC(0.A[Qls>{~@ARHc>eP~wJ =\sT6^pX4/_kuVYwR2G4M(SptsM8,;4? rg?W` ]R2Zq$o2~].>i R'3>aTTJ:a"Ed([zT\n-H(KWY(J<-AUb(iZh[ia{h3w-f|@h@0b8t VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P \m(vte$x_auto_indent); vte$show_first_line;endif; endprocedure;s l! Page 73,6! Go to the beginning of a word. Return amount moved.procedure vte$start_of_word $local temp_length; ! Distance movedon_error return(0); endon_error;.move_horizontal(-1); ! Skip current charactertemp_length := 1;! Count any word separatorswloop5 exitif mark(none) = beginning_of(current_buffer);fD exitif (index(vte$x_word_separators, current_character) = 0) and# (current_character <> vte$x_null);n move_horizontal(-1);# temp_length := temp_length + 1;mendloop;:! If we are on a word terminator count that one character.-! Otherwise scan to the next word terminator.p=if (index(vte$x_word_separators, current_character) = 0) then) loop exitif current_offset = 0;  move_horizontal(-1);m? if (index(vte$x_word_separators, current_character) <> 0) then  move_horizontal(1); exitif 1; endif;; temp_length := temp_length + 1; endloop;endif;return(temp_length); endprocedure;  t! Page 74 D! Update the status line in all windows mapped to the current buffer! ! Parameters:! 4! formatter: Flag for automatic formatter selection,procedure vte$update_status_lines(formatter)$local this_buffer, ! Current buffer< loop_window; ! Window currently being checked in loopthis_buffer := current_buffer;.if get_info(this_buffer, "map_count") > 1 then- loop_window := get_info(window, "first");  loop exitif loop_window = 0;6 if get_info(loop_window, "buffer") = this_buffer then1 vte$set_status_line(loop_window, formatter);e endif;t) loop_window := get_info(window, "next");f endloop;else3 vte$set_status_line(current_window, formatter);rendif; endprocedure;; ! Page 75tL! Write the current buffer to a file; used by vte_write_file and vte_compile!l ! Parameters:f!_.! write_file_name: String containing file name)procedure vte$write_file(write_file_name);>local write_result; ! File name string returned by write_fileon_error" if error = tpu$_parsefail then set(bell, all, on);I vte$message(0, fao("Don't understand file name: !AS", write_file_name)); return; endif; endon_error;,if get_info(current_buffer, "no_write") then8 vte$message(0, "Buffer is read-only - not written"); return;eendif;>if beginning_of(current_buffer) <> end_of(current_buffer) then set(bell, all, off);( if write_file_name = vte$x_null then, write_result := write_file(current_buffer); else= write_result := write_file(current_buffer, write_file_name);r endif;' ! Remove version number from resultb write_result :=n9 file_parse(write_result, vte$x_null, vte$x_null, node) +n; file_parse(write_result, vte$x_null, vte$x_null, device) +f> file_parse(write_result, vte$x_null, vte$x_null, directory) +9 file_parse(write_result, vte$x_null, vte$x_null, name) +b8 file_parse(write_result, vte$x_null, vte$x_null, type);! vte$set_memory(write_result);  set(bell, all, on);s3 set(output_file, current_buffer, write_result);h& vte$x_output_file := write_result;endif; endprocedure;d ;! Page 76n! Cursor Movement ProceduresM! Go to end of the current buffer. If called with a negative argument, inserteJ! the full file name of the output file associated with the current buffer! into the text buffer.r(procedure vte_bottom ! Cursor movement6local outfile_name; ! Name of file to write buffer to3if vte$x_repeated and (vte$x_repeat_count < 0) thenl< outfile_name := get_info(current_buffer, "output_file"); if outfile_name = 0 then2 outfile_name := get_info(current_buffer, "name"); endif; vte$copy_text(outfile_name);else0 if mark(none) <> end_of(current_buffer) then" position(end_of(current_buffer)); endif; vte$check_position(0,1);endif; endprocedure;e y! Page 77o$! Go to the end of the current line.procedure vte_end_of_linetDif vte$x_free_cursor and get_info(current_window, "beyond_eol") then copy_text(' ');  vte$backup_over_whitespace;L* erase_character(length(current_line));else1 if (mark(none) <> end_of(current_buffer)) andn, (current_character <> vte$x_null) then, position(search(line_end, forward, exact)); endif;endif;vte$check_position(0,1); endprocedure;a w! Page 78wD! Start or cancel a select range, or, if used with numeric argument,+! enter character with a given ASCII value.tprocedure vte_markif vte$x_repeated then) copy_text(ascii(vte$x_repeat_count));nelse vte_select;gendif; endprocedure;d o! Page 79fH! Move down one or more rows, staying in the same column. If using boundK! cursor movement, move to the left on shorter lines, but remember originaloK! column in order to restore position on longer lines. If using free cursorhM! movement, start scrolling when about to leave the window. If this proceduresI! is called when prompting is done for LSE, however, this command recallso&! previous commands one after another.procedure vte_move_downn8local this_offset; ! distance of current line to bottomon_error ! Just continuew endon_error;Dif vte$x_free_cursor and (current_window <> vte$command_window) then ! Free cursor movement? this_offset := get_info(current_window, "visible_bottom") - - get_info(current_window, "current_row");o" if vte$x_repeat_count < 0 then vte$x_repeat_count := 1;o endif;, if vte$x_repeat_count > this_offset then if this_offset > 0 then" cursor_vertical(this_offset); endif; : scroll(current_window, vte$x_repeat_count - this_offset); else% cursor_vertical(vte$x_repeat_count);_ endif;elseF if (current_window <> vte$command_window) or (vte$x_old_command <> vte$lse_buffer) then! ! Bound cursor movement* if vte$x_move_position <> mark(none) thenF vte$x_offset_column := get_info(current_buffer, "offset_column"); endif; # move_vertical(vte$x_repeat_count);y vte$check_position(2,1);  else vte$recall(1);t endif;endif; endprocedure;n r! Page 80iK! Move left one column. If at the start of a line and if using bound cursore1! movement, skip to the end of the previous line.iprocedure vte_move_left;on_error ! Just continue- endon_error;Dif vte$x_free_cursor and (current_window <> vte$command_window) then+ cursor_horizontal(-vte$x_repeat_count);lelse) move_horizontal(-vte$x_repeat_count);r vte$check_position(0,1);endif; endprocedure;_J! Move right one column. If at the end of a line and if using bound cursor/! movement, skip to the start of the next line._procedure vte_move_righton_error ! Just continueb endon_error;Dif vte$x_free_cursor and (current_window <> vte$command_window) then* cursor_horizontal(vte$x_repeat_count);else( move_horizontal(vte$x_repeat_count); vte$check_position(0,1);endif; endprocedure;_ m! Page 81N! Move backward by one or more lines, going to the start of the selected line. procedure vte_move_line_backwardon_error ! Just continuer endon_error;"move_horizontal(- current_offset);$move_vertical(- vte$x_repeat_count);vte$check_position(0,1); endprocedure;nM! Move forward by one or more lines, going to the start of the selected line.nprocedure vte_move_line_forwardxon_error ! Just continuet endon_error;"move_horizontal(- current_offset);"move_vertica9g6 VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P I|l(vte$x_repeat_count);vte$check_position(0,1); endprocedure;  v! Page 82eF! Move up one or more rows, staying in the same column. If using boundK! cursor movement, move to the left on shorter lines, but remember originaltK! column in order to restore position on longer lines. If using free cursoruM! movement, start scrolling when about to leave the window. If this procedurenJ! is called for the first time while being in the prompt window, it copiesI! the previous contents of the corresponding prompt buffer at the current_G! location. If prompting is done for LSE, however, this command recallso&! previous commands one after another.procedure vte_move_up_4local lines, ! number of buffer lines to be copied8 this_offset; ! distance of current line to bottomon_error ! Just continue_ endon_error;Gif (current_window <> vte$command_window) or vte$x_prompt_restored then H if vte$x_free_cursor and (current_window <> vte$command_window) then ! Free cursor movementg9 this_offset := get_info(current_window, "current_row") -_* get_info(current_window, "visible_top"); if vte$x_repeat_count < 0 then; vte$x_repeat_count := 1;o endif;t) if vte$x_repeat_count > this_offset theno if this_offset > 0 then! cursor_vertical(- this_offset);a endif;u> scroll(current_window, this_offset - vte$x_repeat_count); else+ cursor_vertical(- vte$x_repeat_count);m endif;e else ! Bound cursor movement* if vte$x_move_position <> mark(none) thenF vte$x_offset_column := get_info(current_buffer, "offset_column"); endif;_% move_vertical(- vte$x_repeat_count);g vte$check_position(2,1); endif;elseI ! Insert old prompted text and expand the prompt window, if necessarye8 if get_info(vte$x_old_command, "type") = buffer then, if vte$x_old_command <> vte$lse_buffer then: lines := get_info(vte$x_old_command, "record_count"); if lines > 1 then( if lines > vte$x_max_prompt_lines then& lines := vte$x_max_prompt_lines; endif;2 adjust_window(vte$command_window, 1 - lines, 0); endif;wI if beginning_of(vte$x_old_command) <> end_of(vte$x_old_command) then  copy_text(vte$x_old_command);x append_line; endif;r vte$show_first_line;s% vte$x_old_command := vte$x_null;x vte$x_prompt_restored := 1; else" vte$recall(-1); endif;  else copy_text(vte$x_old_command);! vte$x_old_command := vte$x_null;F vte$x_prompt_restored := 1; endif;endif; endprocedure;n a! Page 83e$! Move backward by one or more words procedure vte_move_word_backward&vte$move_by_word(-vte$x_repeat_count); endprocedure;#! Move forward by one or more wordseprocedure vte_move_word_forwardt%vte$move_by_word(vte$x_repeat_count);_ endprocedure;o ! Page 84e! Scroll forward by screenprocedure vte_next_screen 2local temp_length; ! number of lines to be movedon_error ! Just continue) endon_error;Otemp_length := vte$x_repeat_count * (get_info(current_window, "visible_length")_ - 1);move_vertical(temp_length); "move_horizontal(- current_offset);vte$check_position(0,1); endprocedure;c! Scroll back by screeneprocedure vte_previous_screene2local temp_length; ! number of lines to be movedon_error ! Just continue; endon_error;Ntemp_length := vte$x_repeat_count * (get_info(current_window,"visible_length") - 1);move_vertical(-temp_length);"move_horizontal(- current_offset);vte$check_position(0,1); endprocedure; ! Page 85e"! Jump back to the start of a pageprocedure vte_page_backwardvte$page(-vte$x_repeat_count); endprocedure;e%! Jump forward to the start of a pageiprocedure vte_page_forwardvte$page(vte$x_repeat_count);= endprocedure;a _! Page 86eH! Move the text pointer continuously by one line up, updating the screen! each time the pointer moves.procedure vte_scroll_downa.local stop_key; ! Key used to stop scrollingset(reverse, current_buffer);scroll(current_window);estop_key := read_key;eset(forward, current_buffer);n"move_horizontal(- current_offset);vte$check_position(0,1); endprocedure;aJ! Move the text pointer continuously by one line down, updating the screen! each time the pointer moves.procedure vte_scroll_upe.local stop_key; ! Key used to stop scrollingscroll(current_window); stop_key := read_key;c"move_horizontal(- current_offset);vte$check_position(0,1); endprocedure;( ! Page 87a.! Start a select range at the current locationprocedure vte_select!if vte$x_select_position = 0 then_- vte$x_select_position := select(reverse); ) if vte$x_select_rectangular <> 0 then  vte$x_select_rectangular := 0;g< vte$message(0, "Previous rectangular selection cancelled"); endif;else vte$x_select_position := 0; if vte$x_search_select thent vte$x_search_select := 0;* vte$x_select_position := select(reverse); else' vte$message(0, "Selection cancelled");e endif;endif; endprocedure;e ! Page 88xF! Set a mark in the current buffer at the current location in order to'! mark a corner of a rectangular region= procedure vte_select_rectangular$if vte$x_select_rectangular = 0 then. vte$x_select_rectangular := mark(reverse);& if vte$x_select_position <> 0 then vte$x_select_position := 0;0 vte$message(0, "Previous selection cancelled"); if vte$x_tpu_version = 1 then refresh;! elsep update(all);e endif; endif;else" vte$x_select_rectangular := 0;6 vte$message(0, "Rectangular selection cancelled");endif; endprocedure;s ! Page 89eI! Back up the text pointer the correct number of characters, and positiondH! it to where it was prior to the last operation, i.e. jump to the other! end of the active range.procedure vte_skip_range0local this_position, ! current cursor position3 start_range, ! start of range to be skippedi& end_range; ! end of this rangeE! Active range is the find range from an immediately preceding search"2if get_info(vte$x_find_range, "type") = range then2 start_range := beginning_of(vte$x_find_range);* end_range := end_of(vte$x_find_range); vte$x_find_range := 0;! vte$x_pre_find_position := 0;t if vte$x_search_select then vte$x_select_position := 0; vte$x_search_select := 0; endif;else$ ! Active range is a select range& if vte$x_select_position <> 0 then+ start_range := beginning_of(select_range);:# end_range := end_of(select_range);" vte$x_search_select := 0; else8 ! Active range is the range covering text just inserted$ start_range := vte$x_restore_start; end_range := vte$x_restore_end; endif;endif;! Jump over the active range/if (start_range <> 0) and (end_range <> 0) thenr this_position := mark(none);' if this_position = start_range thene position(end_range); 6 if (not vte$x_restore_rectangular) and (mark(none) <> end_of(current_buffer)) then move_horizontal(1); endif;i/ if vte$x_restore_position = this_position thenw* vte$x_restore_position := mark(none); endif;d return; else9 if (not vte$x_restore_rectangular) and (this_position <>e$ beginning_of(current_buffer)) then move_horizontal(-1);g endif;s if mark(none) = end_range thene position(start_range); 3 if vte$x_restore_position = this_position thenr' vte$x_restore_position := mark(none);a end:pJ= VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P eif;n return; elseo position(this_position);i endif;M endif;endif;(vte$message(0, "No range to skip over"); endprocedure;k n! Page 90nJ! Go to the start of the current line. If called with a negative argument,B! insert the name of the current text buffer into the text buffer.procedure vte_start_of_line_3if vte$x_repeated and (vte$x_repeat_count < 0) then4 vte$copy_text(get_info(current_buffer, "name"));else& move_horizontal(- current_offset); vte$check_position(0,1);endif; endprocedure;o t! Page 91aL! Go to beginning of the current buffer. If called with a positive argument,N! jump to the n-th line. If a find range from an immediately preceding search,N! a select range, or a rectangular region is active, jump to the start of thisK! range or region. If called with a negative argument, insert the full filer6! name of the current input file into the text buffer.procedure vte_topaif vte$x_repeated then# if vte$x_repeat_count >= 0 thent3 if mark(none) <> beginning_of(current_buffer) thens, position(beginning_of(current_buffer)); endif;r' move_vertical(vte$x_repeat_count - 1);$ else! vte$copy_text(vte$x_input_file);n endif;else) ! Jump to the start of a select rangez& if vte$x_select_position <> 0 thenC if get_info(vte$x_select_position, "buffer") = current_buffer thenr& vte$go_to(vte$x_select_position); elsex, position(beginning_of(current_buffer)); endif;  vte$x_select_position := 0; else& if vte$x_select_rectangular <> 0 thenE if get_info(vte$x_select_rectangular, "buffer") = current_buffert then& vte$go_to(vte$x_select_rectangular); else ) position(beginning_of(current_buffer));t endif;c# vte$x_select_rectangular := 0;i elsen, position(beginning_of(current_buffer)); endif;x endif;endif;vte$check_position(0,1); endprocedure;o l! Page 92;.! Procedures to insert, remove, and find marksN! If given just after a find, position to the location from which the previousH! find operation started. Otherwise, go to a previously set mark. RotateI! through all marks set and delete any marks pointing to deleted buffers.n+procedure vte_find_mark ! Marker commands)8local temp_mark; ! Placeholder for exchanging the markson_error ! Just continued endon_error;if vte$check_bad_window then return;sendif;$if vte$x_pre_find_position <> 0 then& position(vte$x_pre_find_position); vte$check_position(0,1); return;lendif;if vte$x_mark1 = 0 then 7 vte$message(0, "You have no marks to position to"); return;oendif; if mark(none) = vte$x_mark1 then if vte$x_mark2 <> 0 then temp_mark := vte$x_mark1; vte$x_mark1 := vte$x_mark2; vte$x_mark2 := vte$x_mark3; vte$x_mark3 := vte$x_mark4; vte$x_mark4 := vte$x_mark5; if vte$x_mark2 = 0 then vte$x_mark2 := temp_mark; elseS if vte$x_mark3 = 0 then vte$x_mark3 := temp_mark;e else; if vte$x_mark4 = 0 thenF vte$x_mark4 := temp_mark;_ else vte$x_mark5 := temp_mark;s endif; endif;a endif; else< vte$message(0, "You only have one mark, and you're on it"); return; endif;endif;7! Skip and delete any marks pointing to deleted buffers loop2 exitif get_info(vte$x_mark1, "type") = marker;E vte$x_mark1 := 0; ! need this in order to get around mixed typesu vte$x_mark1 := vte$x_mark2;f vte$x_mark2 := vte$x_mark3;x vte$x_mark3 := vte$x_mark4;e vte$x_mark4 := vte$x_mark5; if vte$x_mark1 = 0 thenu4 vte$message(0, "All your marks have been deleted"); return; endif;endloop;'! Finally position to the selected marktvte$go_to(vte$x_mark1);_ endprocedure;f _! Page 93 J! Set a mark at the current position so that we can come back to it later.procedure vte_insert_mark_on_error ! Just continuet endon_error;if vte$check_bad_window then return;tendif;4if vte$x_mark5 <> 0 then ! The mark already exists,) delete(vte$x_mark5); ! ... delete ittendif;vte$x_mark5 := vte$x_mark4;pvte$x_mark4 := vte$x_mark3;ivte$x_mark3 := vte$x_mark2; vte$x_mark2 := vte$x_mark1;mvte$x_mark1 := mark(reverse);f endprocedure;e I! Page 94a)! Remove the mark at the current positioneprocedure vte_remove_markdon_error ! Just continuet endon_error;if vte$check_bad_window then return;tendif;if vte$x_mark1 <> 0 then$ if mark(none) = vte$x_mark1 then delete(vte$x_mark1);_ vte$x_mark1 := vte$x_mark2; vte$x_mark2 := vte$x_mark3; vte$x_mark3 := vte$x_mark4; vte$x_mark4 := vte$x_mark5; vte$x_mark5 := 0; else@ vte$message(0, "You can only delete a mark when you're on it"); endif;else2 vte$message(0, "You have no marks to delete");endif; endprocedure; ! Page 950>! If positioned at a mark, delete it; otherwise, insert a markprocedure vte_toggle_mark if mark(none) = vte$x_mark1 then vte_remove_mark;7 vte$message(0, "Mark at current position removed");(else vte_insert_mark;endif; endprocedure;h c! Page 96l$! Text and Pattern Search Procedures@! Top-level find command; prompt and search a string or pattern.&procedure vte_find ! Search commandsAif (current_window = vte$command_window) and vte$x_prompting thenu vte$x_prompting := 0;w& vte$execute_key(vte$x_key_prompt); return;nendif;)vte$x_find_range := vte$find(vte$x_null);I8if (vte$x_find_range = 0) and (not vte$x_prompting) then3 if get_info(vte$x_target, "type") = string then : vte$message(0, fao("Could not find: !AS", vte$x_target)); else$ vte$message(0, "String not found"); endif;endif; endprocedure;rI! Find without prompt - search the next occurrence of the current patterniprocedure vte_find_next Aif (current_window = vte$command_window) and vte$x_prompting thenh vte$x_prompting := 0;w& vte$execute_key(vte$x_key_prompt);else/ vte$x_find_range := vte$find(vte$x_target);o if vte$x_find_range = 0 then0 if get_info(vte$x_target, "type") = string then> vte$message(0, fao("Could not find: !AS", vte$x_target)); elsen( vte$message(0, "String not found"); endif;u endif;endif; endprocedure;h ! Page 97 H! Search and count occurrences of the string obtained by prompting. If a7! select range is active, count only within that range.fprocedure vte_search_count.local found_count, ! Counter of strings found3 this_range; ! Range to restrict the counting C! If given in the command window, this command is an (undocumented)_/! equivalent of the ^N match control construct.lAif (current_window = vte$command_window) and vte$x_prompting thenf copy_text("^N"); return;dendif;$! Setup range for restricting searchOif (current_window <> vte$command_window) and (vte$x_select_position <> 0) then& this_range := vte$active_range(1);. vte$x_stop_position := end_of(this_range);9 if vte$x_stop_position <> end_of(current_buffer) then  position(vte$x_stop_position);  move_horizontal(1);# vte$x_stop_position := mark(none); endif; position(this_range);  update(current_window);cendif;3! Initialize and look if the target is there at allrfound_count := 0;;#vte$x_count_prompt := " and count";n)vte$x_find_range := vte$find(vte$x_null);nif vte$x_prompting theni return; endif;! Now really start counting)2if get_info(vte$x_find_range, "type";=$ VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P :) = range thenA ! First check if the first occurrence was still within limitsg found_count := 1;e$ if vte$x_stop_position <> 0 then> if beginning_of(vte$x_find_range) >= vte$x_stop_position then found_count := 0; endif; endif;: ! If still within limits, search remaining occurrences if found_count > 0 then " set(timer, on ,"...counting..."); loope0 vte$x_find_range := vte$find(vte$x_target);! exitif vte$x_find_range = 0;n% if vte$x_stop_position <> 0 then ? exitif beginning_of(vte$x_find_range) >= vte$x_stop_position;e endif;$ found_count := found_count + 1; endloop;  set(timer, off, vte$x_null); endif;else! if vte$x_find_range <> 0 then  return; endif;endif;vte$x_stop_position := 0;evte$x_find_range := 0;vte$x_pre_find_position := 0;tvte$x_select_position := 0;ivte$x_search_select := 0;l! Tell the resultrif found_count > 0 thenn@ vte$message(1, fao("Found !SL occurrence!%S", found_count));else3 if get_info(vte$x_target, "type") = string thenu: vte$message(0, fao("Could not find: !AS", vte$x_target)); else$ vte$message(0, "String not found"); endif;endif;%position(vte$x_pre_command_position);o endprocedure;n ! Page 98s0! Control case-sensitivity for matching searchesprocedure vte_set_search_casetif vte$x_repeated then" if vte$x_repeat_count < 0 then vte$x_search_case := 1; else vte$x_search_case := 0; endif;else/ vte$x_search_case := 1 - vte$x_search_case;_endif;vte$update_status_lines(0);r endprocedure;iC! Control position of cursor on failing searches - top or preservedtprocedure vte_set_search_origineif vte$x_repeated then" if vte$x_repeat_count < 0 then vte$x_search_origin := 0; else vte$x_search_origin := 1; endif;else3 vte$x_search_origin := 1 - vte$x_search_origin;eendif;vte$update_status_lines(0);r endprocedure;d <! Page 99w!! (Search and) Replace ProceduresE! Replace the string just found with the contents of the paste bufferc+procedure vte_exchange ! Replace commandst0local this_position, ! current cursor position,$ this_buffer, ! current buffer* this_mode, ! mode of current bufferA find_range; ! find range copy - original will be destroyedr2if get_info(vte$x_find_range, "type") = range then" this_buffer := current_buffer;/ this_mode := get_info(this_buffer, "mode"); # find_range := vte$x_find_range;> set(insert, this_buffer);f position(find_range);tF if beginning_of(vte$paste_buffer) <> end_of(vte$paste_buffer) then! vte$copy_text(vte$paste_buffer); append_line;e move_horizontal(-1);p! vte$x_restore_end := mark(none);o move_horizontal(1); else vte$check_position(0,0);e vte$x_restore_start := 0; vte$x_restore_end := 0; endif; this_position := mark(none);! position(vte$restore_buffer);  erase(vte$restore_buffer); split_line;n move_vertical(-1); move_text(find_range); position(this_position);) vte$x_restore_position := mark(none);i set(this_mode, this_buffer);else9 vte$message(0, "No string selected for replacement");xendif; endprocedure;d r! Page 100I! Prompt for new contents of the paste buffer and replace the string justd+! found by the search command just finished procedure vte_insert_herex8local insert_string; ! String to be used as replacementAif (current_window = vte$command_window) and vte$x_prompting then  vte$x_prompting := 0;r& vte$execute_key(vte$x_key_prompt); return;kendif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) thenr* vte$x_old_command := vte$paste_buffer;endif;>if not vte$prompt_string(insert_string, "Replace by:", 0) then return; endif;vte$x_key_prompt := 0;&vte$remember_buffer(vte$paste_buffer); vte_exchange;f endprocedure;d ! Page 101J! Search the next n occurrences of the search target and replace them withM! the contents of the paste buffer. If a select range is active, replace onlyr! occurences within that range.$procedure vte_replacen2local repeat_count, ! Copy of global repeat count3 replace_count, ! Counter of strings replacede@ this_range, ! Range to restrict the replacement operation) stop_position; ! End of this range 3if vte$x_repeated and (vte$x_repeat_count = 0) thene vte_replace_all; return;zendif;!if vte$x_target = vte$x_null thenn+ vte$message(0, "No target to replace");8 return;cendif;#repeat_count := vte$x_repeat_count;bvte$x_repeat_count := 1;replace_count := 0;nif repeat_count >= 10 then& set(timer, on, "...replacing...");endif;$! Setup range for restricting search"if vte$x_select_position <> 0 then& this_range := vte$active_range(1);( stop_position := end_of(this_range);3 if stop_position <> end_of(current_buffer) theno position(stop_position);  move_horizontal(1); stop_position := mark(none);t endif; position(this_range);telse stop_position := 0;rendif;! Now start replacingzloop) exitif replace_count >= repeat_count;;/ vte$x_find_range := vte$find(vte$x_target);o exitif vte$x_find_range = 0; if stop_position <> 0 then8 exitif beginning_of(vte$x_find_range) >= stop_position; endif; vte_exchange;i' replace_count := replace_count + 1;:endloop;if stop_position <> 0 then position(stop_position);endif;if repeat_count >= 10 then set(timer, off, vte$x_null);endif;! Tell what we have doneif replace_count > 0 thens if vte$x_repeated thenB vte$message(1, fao("Replaced !SL occurrence!%S", replace_count)); endif;else3 if get_info(vte$x_target, "type") = string then : vte$message(0, fao("Could not find: !AS", vte$x_target)); else$ vte$message(0, "String not found"); endif;endif;vte$check_position(0,1);&if vte$x_restore_end = mark(none) then) vte$x_restore_position := mark(none);iendif; endprocedure;i ! Page 102J! Replace the remaining occurrences of the search target with the contentsL! of the paste buffer. If a select range is active, replace only occurences! within that range.procedure vte_replace_allu3local replace_count, ! Counter of strings replacedr@ this_range, ! Range to restrict the replacement operation) stop_position; ! End of this rangeovte$x_repeat_count := 1;replace_count := 0; !if vte$x_target = vte$x_null thenl+ vte$message(0, "No target to replace");_ return;gendif;"set(timer, on, "...replacing...");$! Setup range for restricting search"if vte$x_select_position <> 0 then& this_range := vte$active_range(1);( stop_position := end_of(this_range);3 if stop_position <> end_of(current_buffer) thent position(stop_position);v move_horizontal(1); stop_position := mark(none);s endif; position(this_range); else stop_position := 0;gendif;! Now start replacing;loop/ vte$x_find_range := vte$find(vte$x_target);e exitif vte$x_find_range = 0; if stop_position <> 0 then8 exitif beginning_of(vte$x_find_range) >= stop_position; endif; vte_exchange;a' replace_count := replace_count + 1;$endloop;if stop_position <> 0 then position(stop_position);endif;! Tell what we have doneset(timer, off, vte$x_null);if replace_count > 0 thenE vte$message(1, fao("Replaced !SL occurrence!%S", replace_cou< VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P .6nt)); else3 if get_info(vte$x_target, "type") = string thenr: vte$message(0, fao("Could not find: !AS", vte$x_target)); else$ vte$message(0, "String not found"); endif;endif;vte$check_position(0,1);&if vte$x_restore_end = mark(none) then) vte$x_restore_position := mark(none); endif; endprocedure;_ g! Page 103! Text Insertion ProcedurestJ! Copy the contents of the active range into the Q-register q and into the=! restore buffer, and delete them at their original location.7procedure vte_cut_buffer ! Text insertion and movemente2local buffername; ! Name of register to be loaded$buffername := vte$get_buffername(1);if buffername <> 0 then;! vte$remove(1, buffername, 0);rendif; endprocedure;i n! Page 104M! Copy the contents of Q-register q before the current text pointer location.eH! In this command, Q-register '*' stands for the name of the output fileJ! associated with the current buffer, and '_' stands for the search stringI! buffer. If the current window is the prompt window, add enough lines ton! it if necessary and possible.rprocedure vte_include_buffer+local buffer_name; ! buffer to be includedr%buffer_name := vte$get_buffername(2);eif buffer_name <> 0 then< if beginning_of(buffer_name) <> end_of(buffer_name) then5 if get_info(buffer_name, "direction") = forward thenv vte$copy_text(buffer_name);3 if get_info(buffer_name, "type") = buffer thene3 append_line; ! did a split_line during vte_removec endif;1 move_horizontal(-1);o% vte$x_restore_end := mark(none);n0 if current_window = vte$command_window then! vte$adjust_prompt(buffer_name);. elser move_horizontal(1);y endif;a vte$show_first_line;r elser ! Rectangular paste% if not vte$check_bad_window then % vte$paste_rectangular(buffer_name); endif;r endif;o endif;endif; endprocedure;t f! Page 105K! Insert a closing parenthesis and highlight the corresponding opening one.a!n ! Parameters:n!f'! this_char: to-be-matched parenthesisi(procedure vte_insert_flashing(this_char)8local open_char, ! opening parenthesis to be looked for- which; ! index in list of parentheses Fif (current_window <> vte$command_window) and (index(vte$x_act_close +* vte$x_string_delim, this_char) <> 0) then if vte$x_auto_case thenr vte$check_case; endif;M if vte$x_flashing and ((not vte$x_lower_case) or (not vte$x_auto_case) orx6 (index(vte$x_string_delim, this_char) <> 0)) then2 if index(vte$x_string_delim, this_char) <> 0 then move_horizontal(-1);t+ if (this_char = current_character) andt5 (index(substr(current_line, 1, current_offset),r. this_char) > 0) then ! skip double quote move_horizontal(1);s vte$insert_char(this_char);c return;e elsef move_horizontal(1); endif;o endif;1G which := index(vte$x_matchable_close + vte$x_string_delim, this_char);eF open_char := substr(vte$x_matchable_open + vte$x_string_delim, which, 1);6 vte$match(open_char + this_char, vte$x_string_delim); return; endif;endif;vte$insert_char(this_char); endprocedure;r p! Page 106E! Insert an opening parenthesis and add the corresponding closing onem! automatically.!o ! Parameters:e!r'! this_char: to-be-matched parenthesiso'procedure vte_insert_matched(this_char) -local which; ! index in list of parentheses<vte$insert_char(this_char);eEif (current_window <> vte$command_window) and (index(vte$x_act_open +* vte$x_string_delim, this_char) <> 0) then if vte$x_auto_case theno vte$check_case; endif;P if vte$x_matching and ((not vte$x_lower_case) or (not vte$x_auto_case)) then1 which := index(vte$x_matchable_open, this_char);r: vte$insert_char(substr(vte$x_matchable_close, which, 1)); move_horizontal(-1); endif;endif;vte$check_position(0,1); endprocedure;  ! Page 107H! Insert the numeric equivalent of the ASCII value of the next characterG! typed in. If called with a numeric argument, insert the value of this ! argument in the current radix.procedure vte_insert_numericif not vte$x_repeated then! if vte$x_tpu_version = 1 theni@ vte$copy_text(str(int(fao("!UW", key_name(read_char))) / 256)); elseE vte$copy_text(str(int(fao("!UW", int(key_name(read_char)))) / 256));! endif;else! case vte$x_radix from 8 to 16t6 [8]: vte$copy_text(fao("!OL", vte$x_repeat_count));/ [10]: vte$copy_text(str(vte$x_repeat_count));_6 [16]: vte$copy_text(fao("!XL", vte$x_repeat_count)); endcase;endif; endprocedure;  e! Page 108H! Copy the contents of the paste buffer before the current text pointer.G! If the current window is the prompt window, add enough lines to it ifa! necessary and possible.hprocedure vte_pasteiBif beginning_of(vte$paste_buffer) <> end_of(vte$paste_buffer) then= if get_info(vte$paste_buffer, "direction") = forward then! vte$copy_text(vte$paste_buffer); 2 append_line; ! did a split_line during vte_remove move_horizontal(-1);i! vte$x_restore_end := mark(none);, if current_window = vte$command_window then) vte$adjust_prompt(vte$paste_buffer);t elsek move_horizontal(1); endif;e vte$show_first_line;a else ! Rectangular paste! if not vte$check_bad_window thenr- vte$paste_rectangular(vte$paste_buffer);o endif;v endif;endif; endprocedure;t n! Page 109F! Procedure invoked by the Return key. Split the current line, obeyingG! margin settings. If the current window is the prompt window and if werL! allowed Return to terminate prompting, switch off prompting and re-executeN! the command that started prompting. It is the responsibility of this commandC! to recognize this situation and to perform the necessary actions.nprocedure vte_returnAif (current_window = vte$command_window) and vte$x_prompting then  vte$x_prompting := 0;g& vte$execute_key(vte$x_key_prompt);else vte$split_line(1);endif; endprocedure;  r! Page 110G! Split the current line, obeying margin settings, and leave the cursor E! at the end of the first part of the splitted line. If called with aaH! negative argument, insert the full file name of the next file matching#! the previously selected wildcard.eprocedure vte_split_line.local prompt_lines; ! length of prompt windowon_error vte$message(0, vte$x_null);n return;t endon_error;if vte$x_file_search thenf vte_file_search; return;eendif;! Split the lineif vte$x_repeat_count > 0 then vte$split_line(0);/ if current_window = vte$command_window then @ prompt_lines := get_info(vte$command_window, "visible_length");. if prompt_lines < vte$x_max_prompt_lines thenH if prompt_lines + vte$x_repeat_count <= vte$x_max_prompt_lines then= adjust_window(vte$command_window, - vte$x_repeat_count, 0);i else 2 adjust_window(vte$command_window, prompt_lines -! vte$x_max_prompt_lines, 0);r endif;i endif;t vte$show_first_line;f endif;else ! Set up wildcard search" if vte$x_repeat_count = 0 then vte$x_file_search := 1; vte_file_search; else) ! Search the next filename and insert itd& if vte$x_wild_file <> vte$x_null then7 vte$x_wild_result := file_search(vte$x_wild_file);o, if vte$x_wild_result <> vte$x_null then# vte$copy_text(vte$x_wild_result);i return;e elsed vte$x_abort := 1; endif;_ endif; ! vte$message(0=Q VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P , "No more files");s endif;endif; endprocedure;t ! Page 111-! Copy the active range into the paste buffertprocedure vte_save3! Check for automatic appending to the paste buffer=2if mark(none) <> beginning_of(current_buffer) then move_horizontal(-1);B if vte$x_append_flag and (vte$x_restore_end = mark(none)) then vte$x_append_buffer := 1; endif;0 if mark(none) <> end_of(current_buffer) then move_horizontal(1); endif;endif;!! Fill or append the paste buffers#vte$remove(0, vte$paste_buffer, 0);tvte$x_append_flag := 1;p endprocedure;v*! Copy the active range into Q-register q.procedure vte_save_bufferi2local buffername; ! Name of register to be loaded$buffername := vte$get_buffername(1);if buffername <> 0 then_ vte$remove(0,buffername,0);:endif; endprocedure;_ d! Page 112G! Procedure bound to the space bar. Inserts a space, or does word wrapl:! based on the margin settings and the formatter selected.procedure vte_spacei,local number; ! Number of spaces to insertnumber := vte$x_repeat_count;1.if vte$x_formatter and (not vte$x_nowrap) then vte$fill_line(number);else if vte$x_lse_support thend loop: exitif number <= 0;# lse$do_command("Enter Space");r number := number - 1; endloop;d else, copy_text(substr(vte$x_spaces, 1, number)); endif;endif;vte$check_position(0,1); endprocedure;iO! Tab key procedure. Always inserts a tab, even if current mode is overstrike.oprocedure vte_tab=,local this_mode; ! Keyword for current mode.this_mode := get_info(current_buffer, "mode");set(insert, current_buffer);copy_text(ascii(9));set(this_mode, current_buffer);vte$check_position(0,1); endprocedure;0 ! Page 113H! Simulate some compose key functions for VT100 terminals in order to beB! able to insert true German text without having eightbit support.procedure vte_umlaut>local next_char; ! character determining which umlaut is usednext_char := read_char;iif next_char <> ascii(127) thenu" case next_char from 'A' to 'z' ['A']: vte$insert_char('');n ['O']: vte$insert_char('');i ['U']: vte$insert_char('');d ['a']: vte$insert_lower(''); ['o']: vte$insert_lower(''); ['u']: vte$insert_lower(''); ['s']: vte$insert_char('');e [inrange, outrange]:r vte$message(0, vte$x_null);a endcase;endif; endprocedure;  ! Page 114! Formatter Procedures)! Enable/Disable parenthesis highlightings1procedure vte_flash_control ! Formatter commands;local old_flash; ! previous setting of the flashing switchr! Toggle the flashing switchold_flash := vte$x_flashing;if vte$x_repeated then" if vte$x_repeat_count < 0 then vte$x_flashing := 1;  else vte$x_flashing := 0;n endif;else) vte$x_flashing := 1 - vte$x_flashing;xendif;;! Map the parenthesis keys according to the flashing switchd#if vte$x_flashing <> old_flash then) if vte$x_flashing then2 add_key_map(vte$list_com, "last", vte$map_flash);2 add_key_map(vte$list_for, "last", vte$map_flash); else2 remove_key_map(vte$list_com, vte$map_flash, ALL);2 remove_key_map(vte$list_for, vte$map_flash, ALL); endif;endif; endprocedure;  d! Page 1150! Enable/Disable automatic parenthesis insertionprocedure vte_match_controla;local old_match; ! Previous setting of the matching switchg! Toggle the matching switchold_match := vte$x_matching;if vte$x_repeated then" if vte$x_repeat_count < 0 then vte$x_matching := 1;g else vte$x_matching := 0;t endif;else) vte$x_matching := 1 - vte$x_matching;pendif;;! Map the parenthesis keys according to the matching switch#if vte$x_matching <> old_match thene if vte$x_matching then2 add_key_map(vte$list_com, "last", vte$map_match);2 add_key_map(vte$list_for, "last", vte$map_match); else2 remove_key_map(vte$list_com, vte$map_match, ALL);2 remove_key_map(vte$list_for, vte$map_match, ALL); endif;endif; endprocedure;i ;! Page 116/! Enable / Disable context dependent formattingiprocedure vte_formatter_control,2local old_formatter, ! Previous formatter setting, buffer_name, ! Name of current buffer9 formatter_name; ! name of formatter currently usedgif vte$check_bad_window then return;nendif;,! Determine name of formatter currently used0buffer_name := get_info(current_buffer, "name");#translate(buffer_name, '__', '.-');v change_case(buffer_name, lower);=execute("vte$x_formatter_name := vte$x_form_" + buffer_name);u)if vte$x_formatter_name = vte$x_null then$, vte$message(0, "No formatter selected"); return;endif;! Toggle the formatter switch;!old_formatter := vte$x_formatter;iif vte$x_repeated then" if vte$x_repeat_count < 0 then vte$x_formatter := 1; else vte$x_formatter := 0; endif;else+ vte$x_formatter := 1 - vte$x_formatter;1endif;?! Setup correct indentation and activate / deactivate formatterh(if vte$x_formatter <> old_formatter then! if (vte$x_formatter = 0) thenr' vte$x_old_indent := vte$x_auto_indent;c endif;" vte$setup_formatter("change"); if vte$x_formatter then  vte$x_old_indent := 0;e endif;+ vte$set_status_line(current_window, 0);tendif; endprocedure;a n! Page 117K! Set the indentation of the current line to the current indentation value.eprocedure vte_indentif vte$at_start_of_line then* vte$indent_line_to(vte$x_auto_indent);else copy_text('.');)endif; endprocedure;I! Reset the current indentation value to its base value; don't change the ! current indentation.procedure vte_reset_indent=local current_right_margin; ! right margin for current bufferr4if vte$at_start_of_line and vte$in_indent_range then, vte$x_auto_indent := vte$x_indent_basis;( ! Adjust the left margin accordinglyE current_right_margin := get_info(current_buffer, "right_margin");t< if ((vte$x_auto_indent + 1) < current_right_margin) then7 vte$set_margins(current_buffer, vte$x_auto_indent + 1, current_right_margin);o endif;else copy_text('=');cendif; endprocedure;n :! Page 118J! Decrement the current indentation value by n if n is given, otherwise byJ! a formatter dependent value, and set the indentation of the current lineC! to that value, if no mark is set. If a mark is set, decrement thesI! indentation of all lines between the mark and the current text pointer,nH! but do not change the current indentation value for new lines entered.procedure vte_indent_less>if vte$at_start_of_line then if vte$x_repeated then# vte$indent(0, vte$x_repeat_count);o else# vte$indent(0, vte$x_delta_indent);_ endif;else vte_insert_matched('<');endif; endprocedure;,J! Increment the current indentation value by n if n is given, otherwise byJ! a formatter dependent value, and set the indentation of the current lineC! to that value, if no mark is set. If a mark is set, increment theI! indentation of all lines between the mark and the current text pointer,gH! but do not change the current indentation value for new lines entered.procedure vte_indent_moreiif vte$at_start_of_line then if vte$x_repeated then# vte$indent(1, vte$x_repeat_count);a else# vte$indent(1, vte$x_delta_indent);e endif;else vte_insert_flashing('>');nendif; endprocedure;_ e! Page 119J! Set the value for ># VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P Eindentation increment and decrement to 2 for the QueryL! Language formatter. For the Cobol formatter, create a continuation line by<! inserting a "-" in column 7, and indent the line as usual.procedure vte_decrease_indente/local this_position; ! Current cursor positionoon_error split_line;o move_horizontal(-1); this_position := mark(none); endon_error;?if (vte$x_formatter_name = "DTR") and vte$at_start_of_line theni vte$x_delta_indent := 2;elseC if (vte$x_formatter_name = "COB") and vte$at_start_of_line theni this_position := mark(none);e# move_horizontal(- current_offset);;( vte$copy_text(vte$x_cobol_space + '-');' vte$indent_line_to(vte$x_auto_indent);s position(this_position);_, if mark(none) = end_of(current_buffer) then move_horizontal(-1);_ endif;< else copy_text('-'); endif;endif; endprocedure;hD! Set the value for indentation increment and decrement to 3 for the! Query Language formatter.!procedure vte_increase_indent)?if (vte$x_formatter_name = "DTR") and vte$at_start_of_line thene vte$x_delta_indent := 3;else copy_text('+'); endif; endprocedure;S n! Page 120P! For the Fortran formatter, create the beginning of a Fortran continuation lineO! by inserting 5 spaces, an "*" and a tab at the beginning of the current line, L! followed by the appropriate number of tabs and spaces to reach the currentE! indentation value + the selected indentation value for continuationeJ! lines (defaults to 4). For the Cobol formatter, create a comment line by=! inserting an "*" in column 7, and indent the line as usual.bprocedure vte_indent_cont$/local this_position; ! Current cursor positionton_error split_line; move_horizontal(-1); this_position := mark(none); endon_error;>if (vte$x_formatter_name = "FOR") and vte$in_indent_range then if vte$at_start_of_line then this_position := mark(none); # move_horizontal(- current_offset);n: if (length(current_line) = 0) or (index(vte$x_whitespace," current_character) <> 0) then+ vte$copy_text(vte$x_cont_space + '*');e+ vte$indent_line_to(vte$x_auto_indent);u position(this_position);u else position(this_position);m vte$insert_char('*'); endif;  else vte$insert_char('*'); endif;elseC if (vte$x_formatter_name = "COB") and vte$at_start_of_line thenc this_position := mark(none); # move_horizontal(- current_offset);r( vte$copy_text(vte$x_cobol_space + '*');' vte$indent_line_to(vte$x_auto_indent);v position(this_position);e, if mark(none) = end_of(current_buffer) then move_horizontal(-1);n endif; else vte$insert_char('*'); endif;endif; endprocedure; ! Page 121K! Prompt for a formatter name, check its validity and setup this formatter.cJ! If called with a neagtive numeric argument and if running under LSE, set$! a language for the current buffer.procedure vte_set_formatter:local formatter_name, ! Name of formatter to be activated0 formatter_type, ! Corresponding file type, buffer_name, ! Name of current buffer- prompt_text; ! Text used for prompting,Aif (current_window = vte$command_window) and vte$x_prompting theni( vte$message(0, "Already prompting"); return;_endif;.if (current_window <> vte$command_window) thenM if vte$x_lse_support and vte$x_repeated and (vte$x_repeat_count < 0) theni prompt_text := "Language:"; else. prompt_text := "Formatter name (file type):"; endif;endif;>if not(vte$prompt_string(formatter_name, prompt_text, 1)) then return; endif;vte$x_key_prompt := 0;'edit(formatter_name, trim, upper, off);n#if formatter_name = vte$x_null then return;fendif;O! In LSE mode, execute Set Language subcommand if called with negative argumentt6if vte$x_lse_support and (vte$x_repeat_count < 0) then5 lse$do_command("Set Language " + formatter_name);$4 buffer_name := get_info(current_buffer, "name");' translate(buffer_name, '__', '.-'); $ change_case(buffer_name, lower);M execute("vte$x_buflang_" + buffer_name + " := '" + formatter_name + "'"); vte$x_repeat_count := 1; return;pendif;0! Construct a name looking like a file extension+if substr(formatter_name, 1, 1) <> '.' then+ formatter_name := '.' + formatter_name;hendif;)! See if we have a formatter by that name_!formatter_type := formatter_name;hKformatter_name := vte$get_formatter(formatter_name, vte$x_formatter_names);u#if formatter_name = vte$x_null thennB vte$message(0, "Sorry, don't know how to format this buffer"); return;eendif;! Activate this formattervte$x_formatter := 1;x'vte$x_formatter_name := formatter_type;($vte$setup_formatter(formatter_name);'vte$set_status_line(current_window, 0); endprocedure;s t! Page 122#! Text Insertion Control Procedures),! Control case of lowercase characters input/procedure vte_case_control ! Insertion controleif vte$x_repeated then" if vte$x_repeat_count < 0 then vte$x_lower_case := 1;e else vte$x_lower_case := 0;h endif;else- vte$x_lower_case := 1 - vte$x_lower_case;tendif; endprocedure;t+! Toggle mode between insert and overstrike1procedure vte_change_modet+if current_window = vte$command_window then < vte$message(0, "Function not supported when prompting"); return;!endif;if vte$x_repeated then" if vte$x_repeat_count < 0 then set(insert, current_buffer);_ else! set(overstrike, current_buffer);e endif;else9 if get_info(current_buffer, "mode") = overstrike thenc set(insert, current_buffer); else! set(overstrike, current_buffer);f endif;endif;'vte$set_status_line(current_window, 0);c endprocedure;t p! Page 123-! Control modifyability of the current bufferhprocedure vte_modify_controlif vte$x_repeated then" if vte$x_repeat_count < 0 then if vte$x_tpu_version = 1 then" lse$do_command("Set Modify"); else_) set(modifiable, current_buffer, on);i endif;_ else if vte$x_tpu_version = 1 then$ lse$do_command("Set Nomodify"); elsei* set(modifiable, current_buffer, off); endif;a endif;else2 if get_info(current_buffer, "modifiable") then if vte$x_tpu_version = 1 then$ lse$do_command("Set Nomodify"); else * set(modifiable, current_buffer, off); endif;r else if vte$x_tpu_version = 1 then" lse$do_command("Set Modify"); elsea) set(modifiable, current_buffer, on);e endif;t endif;endif;'vte$set_status_line(current_window, 0);i endprocedure;t n! Page 124&! Character Case Conversion Procedures9! Capitalize first letter, put rest of word in lowercase.p0procedure vte_capitalize_word ! Case conversion0local n_words, ! Number of words to capitalize/ this_position, ! Current cursor positionu; this_char, ! First letter of word, to be capitalized: temp_range, ! Rest of word, to be put in lower case' this_mode, ! Current buffer modei9 start_position, ! Start of range to be capitalizedu6 stop_position; ! End of range to be capitalizedon_error return;i endon_error;$! Setup range for restricting search"if vte$x_select_position <> 0 then& temp_range := vte$active_range(1);( stop_position := end_of(temp_range);3 if stop_position <> end_of(current_buffer) theno position(stop_position);  move_horizontal(1); stop_position := mark(none);o endif; position(temp_range)?u& VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P ;t! start_position := mark(none);;else stop_position := 0;xendif;! Find start of first word.this_mode := get_info(current_buffer, "mode");set(insert, current_buffer);n_words := vte$x_repeat_count;vte$move_by_word(1);vte$move_by_word(-1);o! Capitalize the wordsloop if stop_position = 0 thenx exitif n_words = 0; if n_words < 0 then vte$move_by_word(-1); n_words := n_words + 1; endif;n this_char := current_character; change_case(this_char, upper);s erase_character(1); copy_text(this_char); else$ if start_position > mark(none) then position(start_position); else $ this_char := current_character;# change_case(this_char, upper);  erase_character(1); copy_text(this_char); endif;x endif; this_position := mark(none); vte$move_by_word(1); move_horizontal(-1);' if mark(none) >= this_position thend if stop_position <> 0 thene( if mark(none) >= stop_position then position(stop_position);$ if mark(none) > this_position then move_horizontal(-1); else position(stop_position); exitif 1;e endif; endif;e endif;c= temp_range := create_range(this_position, mark(none), none); change_case(temp_range, lower); endif; position(this_position); if stop_position <> 0 then vte$move_by_word(1);v$ if mark(none) >= stop_position then position(stop_position);r exitif 1; endif;o else if n_words > 0 then vte$move_by_word(1);s n_words := n_words - 1; else_ move_horizontal(-1);f endif;p endif;endloop;set(this_mode, current_buffer);g endprocedure;d ! Page 1250! Change case of all letters in the active rangeprocedure vte_change_casef-local case_range; ! Range to be case-changedo"case_range := vte$active_range(0);if case_range <> 0 thena$ change_case(case_range, invert);endif; endprocedure;r+! Put active range in all lowercase lettersaprocedure vte_lowercase1local case_range; ! Range to be put in lowercase "case_range := vte$active_range(0);if case_range <> 0 thenf# change_case(case_range, lower);endif; endprocedure;;+! Put active range in all uppercase letters procedure vte_uppercase 1local case_range; ! Range to be put in uppercasee"case_range := vte$active_range(0);if case_range <> 0 then,# change_case(case_range, upper);$endif; endprocedure;n o! Page 126! Text Deletion ProceduresL! Delete previous character; if at start of a line, append to previous line.L! If the current buffer is in overstrike mode, replace the deleted character ! with space.n&procedure vte_delete ! Text deletion:local this_position, ! Marker for current cursor position' this_range; ! Range to be erased1on_error ! Just continueu endon_error;move_horizontal(-1);this_position := mark(none);(move_horizontal(1 - vte$x_repeat_count);<this_range := create_range(this_position, mark(none), none);.vte$remove(1, vte$restore_buffer, this_range);J! Re-insert one or more spaces if the current buffer is in overstrike mode5if get_info(current_buffer, "mode") = overstrike then( set(insert, current_buffer);5 if vte$x_repeat_count > length(vte$x_spaces) thent copy_text(vte$x_spaces);n) move_horizontal(- length(vte$x_spaces)); else8 copy_text(substr(vte$x_spaces, 1, vte$x_repeat_count));' move_horizontal(- vte$x_repeat_count); endif;$ set(overstrike, current_buffer); vte$check_position(1,1);endif; endprocedure;s o! Page 127K! Delete the current text buffer and make one of the remaining text buffers H! current. If there are currently no other text buffers, create an empty"! text buffer and make it current.procedure vte_delete_buffer Iif get_info(current_buffer, "modified") and (not get_info(current_buffer, 2 "no_write")) and (beginning_of(current_buffer) <> end_of(current_buffer)) thens4 ! Warn the user about what he/she is going to doL if not vte$ask(fao("Modifications will be lost ... Delete buffer !AS " +8 "anyway", get_info(current_buffer,"name")), 0) then return; endif;endif;! Now really delete the buffer"vte$delete_buffer(current_buffer); endprocedure; n! Page 128K! Delete current character(s). If the current buffer is in overstrike mode,rM! do not insert blanks - this gives the user the opportunity to shorten linesiK! without leaving overstrike mode. If at the end of a line, append the nextx! line to the current one.procedure vte_erase_charactert:local this_position, ! Marker for current cursor position' this_range; ! Range to be erasedion_error ! Just continuee endon_error;this_position := mark(none);(move_horizontal(vte$x_repeat_count - 1);<this_range := create_range(this_position, mark(none), none);.vte$remove(1, vte$restore_buffer, this_range); endprocedure; ! Page 129J! Erase from current position through end of line, including eol characterprocedure vte_erase_line:local this_position, ! Marker for current cursor position' this_range; ! Range to be erasedc-if current_offset < length(current_line) thene this_position := mark(none);? move_horizontal(length(current_line) - current_offset - 1);e@ this_range := create_range(this_position, mark(none), none);2 vte$remove(1, vte$restore_buffer, this_range);endif; endprocedure; f! Page 130! Erase next word(s)procedure vte_erase_next_word'/local this_position, ! Current cursor positionv; this_word; ! Current word (to be deleted) as a rangexthis_position := mark(none);vte_move_word_forward;2if mark(none) <> beginning_of(current_buffer) then move_horizontal(-1);endif;;this_word := create_range(this_position, mark(none), none); -vte$remove(1, vte$restore_buffer, this_word);rvte$check_position(1,1); endprocedure; ! Erase previous word(s)!procedure vte_erase_previous_word;/local this_position, ! Current cursor positiont; this_word; ! Current word (to be deleted) as a range2if mark(none) <> beginning_of(current_buffer) then move_horizontal(-1); this_position := mark(none); vte$end_of_word; vte_move_word_backward;d? this_word := create_range(mark(none), this_position, none);w1 vte$remove(1, vte$restore_buffer, this_word);e vte$check_position(1,1);endif; endprocedure;c e! Page 1316! Erase from current cursor position to start of line.!procedure vte_erase_start_of_line_8local erase_length, ! How much of current line to erase: this_position, ! Marker for current cursor position' this_range; ! Range to be erasedton_error ! Just continuet endon_error;+if mark(none) = end_of(current_buffer) thenf return;eendif;erase_length := current_offset;h0! In the command buffer, do not erase the prompt+if current_buffer = vte$command_buffer then J if substr(current_line, 1, vte$x_prompt_length) = vte$x_command_prompt + ' ' thent6 erase_length := current_offset - vte$x_prompt_length; endif;endif;if erase_length > 0 then move_horizontal(-1); this_position := mark(none);& move_horizontal(1 - erase_length);@ this_range := create_range(this_position, mark(none), none);2 vte$remove(1, vte$restore_buffer, this_range);endif; endprocedure;  ! Page 132! Erase the active rangeprocedure vte_remove%vte$remove(1, vte$restore_buffer, 0);b endprocedure;n@+, VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P ۑ h! Page 133H! Restore last erased range, line, portion of line, or word. If the lastI! operation was an insert operation, erase what was just inserted and putv! it into the restore buffer.(procedure vte_restore8local this_buffer, ! Marker for current cursor position/ this_position, ! Current cursor positionp, this_mode, ! Keyword for current modeA restore_range, ! Range to be saved into the restore buffern6 restore_start, ! Copy of restore start position2 restore_end; ! Copy of restore end positionthis_buffer := current_buffer;+this_mode := get_info(this_buffer, "mode");t! Undo changes just made by LSE if vte$x_lse_support then ' if vte$x_erase_placeholder > 0 thent' lse$do_command("Unerase Placeholder");  vte$x_erase_placeholder := -1;d return; else$ if vte$x_erase_placeholder < 0 then1 lse$do_command("Erase Placeholder /NoGoto");t" vte$x_erase_placeholder := 1; return; endif;a endif;" if vte$x_expand_token < 0 then vte_expand_token; return; else if vte$x_expand_token > 0 thenm lse$do_command("Unexpand"); vte$x_expand_token := -1; return; endif;a endif;endif;+! Special treatment for rectangular restore !if vte$x_restore_rectangular thenrJ if beginning_of(vte$restore_buffer) <> end_of(vte$restore_buffer) then+ if vte$x_old_rectangular < mark(none) then=% position(vte$x_old_rectangular); endif;_+ vte$paste_rectangular(vte$restore_buffer);t else@ if (vte$x_restore_start <> 0) and (vte$x_restore_end <> 0) thenE if (vte$x_restore_start <> mark(none)) and (vte$x_restore_end <>a mark(none)) then! vte$x_restore_rectangular := 0;t> vte$message(0, "Cursor was moved away from restore region"); return;v endif;-5 vte$x_select_rectangular := vte$x_restore_start;n! position(vte$x_restore_end);h0 vte$cut_rectangular(1, vte$restore_buffer); elset$ vte$x_restore_rectangular := 0;* vte$message(0, "Nothing to restore"); endif;a endif; return;aendif;F! Copy restore buffer before the current text pointer location and set.! marks on both ends of what was just inserted+if vte$x_restore_position = mark(none) thenf set(insert, this_buffer);  copy_text(' ');, move_horizontal(-1); restore_start := mark(none); move_horizontal(1);t" move_text(vte$restore_buffer); append_line; move_horizontal(1);t, if mark(none) = end_of(this_buffer) then append_line;4 move_horizontal(-1);t, if current_window = vte$command_window then move_horizontal(-1);t endif;s else move_horizontal(-2);c endif; restore_end := mark(none); position(restore_start); erase_character(1);z restore_start := mark(none); position(restore_end); move_horizontal(1);"G ! For replace operations, save the replaced text and then delete it_C if (vte$x_restore_start <> 0) and (vte$x_restore_end <> 0) thenn position(vte$restore_buffer); erase(vte$restore_buffer);e3 restore_range := create_range(vte$x_restore_start,n vte$x_restore_end, none); split_line; move_vertical(-1);  move_text(restore_range); position(this_buffer);s else vte$x_restore_position := 0; endif;) vte$x_restore_start := restore_start;% vte$x_restore_end := restore_end;O set(this_mode, this_buffer);elseI ! Fill restore buffer with the contents of the range just inserted ore8 ! with the result of an immediately preceding searchC if (vte$x_restore_start <> 0) and (vte$x_restore_end <> 0) thenn3 if mark(none) <> beginning_of(current_buffer) then move_horizontal(-1);'! this_position := mark(none);e move_horizontal(1); else ! this_position := mark(none);i endif;t: if (mark(none) = vte$x_restore_start) or (this_position = vte$x_restore_end) then  vte$x_find_range := 0;f" position(vte$restore_buffer); erase(vte$restore_buffer);t split_line; move_vertical(-1);t7 restore_range := create_range(vte$x_restore_start,  vte$x_restore_end, none);n move_text(restore_range); if vte$x_search_select then vte$x_search_select := 0;o vte$x_select_position := 0; endif;( position(this_buffer);  else_@ vte$message(0, "Cursor was moved away from restore range"); return; endif;v vte$x_restore_start := 0; vte$x_restore_end := 0;& vte$x_restore_position := mark(none); else& vte$message(0, "Nothing to restore"); endif;endif; endprocedure;i f! Page 134! Exit Procedures E! Exit VTEDIT. Write the current buffer if modified, and ask the useru/! about writing out any other modified buffers. $procedure vte_exit ! Exit commands>local exit_buffer, ! Current buffer being checked for writing: exit_buffer_name, ! String with name of exit_buffer6 outfile_name, ! Name of file to write buffer to: full_name, ! The same including next higher versionB original_reply, ! String returned by read_line after prompt8 reply_text, ! Lowercase version of original_reply5 exit_text, ! Text to be output after finishing;/ this_position, ! Current cursor positioni. screen_width; ! current width of screenon_errorL ! Lots of different errors possible from write_file, doesn't matter here set(success, on);  set(bell, all, on);y* set(text, message_window, blank_tabs);C vte$message(0, fao("Will not exit; could not write buffer !AS",r exit_buffer_name)); vte$set_width(screen_width); vte$x_running := 1;f return;e endon_error;set(bell, all, off);set(success, on);m*screen_width := get_info(screen, "width");exit_buffer_name := vte$x_null;oexit_buffer := current_buffer;Eif (get_info(exit_buffer, "modified")) and (not(get_info(exit_buffer,eM "no_write"))) and (beginning_of(exit_buffer) <> end_of(exit_buffer)) thent outfile_name := 0;< if not vte$check_version(exit_buffer, outfile_name) then set(bell, all, on); return; endif;* write_file(exit_buffer, outfile_name); if vte$x_lse_support thene9 if (vte$x_last_line = 0) or (vte$x_last_column = 0) then- vte$x_last_column := current_offset + 1;1) vte$x_last_line := vte$current_line;t endif; endif;! vte$set_memory(outfile_name);u set(no_write, exit_buffer);nelse; if beginning_of(exit_buffer) = end_of(exit_buffer) thenp set(no_write, exit_buffer); else: if (vte$x_last_line > 0) and (vte$x_last_column > 0) thenC vte$message(0, "Buffer was not changed or has been written " +t' "already - Position not remembered");  endif;t endif;endif;*exit_buffer := get_info(buffers, "first");loop exitif exit_buffer = 0;e. if (get_info(exit_buffer, "modified")) and1 (not(get_info(exit_buffer, "no_write"))) andi< (beginning_of(exit_buffer) <> end_of(exit_buffer)) then= exit_buffer_name := substr(get_info(exit_buffer, "name"), 1,(# vte$x_max_buffer_name_length);f> if vte$ask(fao("Write buffer !AS", exit_buffer_name), 1) then outfile_name := 0;d= if not vte$check_version(exit_buffer, outfile_name) thent set(bell, all, on);a2 vte$message(0, fao("Buffer !AS not written - " +1 "There is a higher version of this buffer", exit_buffer_name));m set(bell, all, off); elsel( write_file(exit_buffer, outfile_name); endif;_ endif;o set(no_write, exit_buffer); else8 if beginning_of(exit_buffer) = end_of(exit_buffer) thAh VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P Fen set(no_write, exit_buffer); endif;s endif;- exit_buffer := get_info(buffers, "next"); endloop;! Restore screen width2vte$set_width(get_info(screen, "original_width"));E! Avoid "editor successfully exiting" message - on_error will restore! success messagesset(success, off);vte$x_running := 0;p>exit_text := call_user(vte$x_get_symbol, vte$x_final_message);if exit_text <> vte$x_null then, set(text, message_window, no_translate); this_position := mark(none); position(message_buffer);t copy_text(exit_text);a update(message_window);  position(this_position);endif;exit;z endprocedure;  e! Page 135O! If called with a negative argument, quit VTEDIT. If any buffers are modified, J! asks if you really want to quit. If you do quit, none of the buffers areH! written out before leaving VTEDIT. If called with a positive argument,M! call the compile function. If called without argument, call the do function M! to prompt and execute TPU commands, or, if the current window is the prompts! window, cancel prompting.dprocedure vte_quit.local screen_width, ! current width of screen/ this_position, ! Current cursor positionp5 exit_text; ! Text to be output after finishingoAif vte$x_repeated and (current_window <> vte$command_window) thene" if vte$x_repeat_count < 0 then+ screen_width := get_info(screen, "width");s3 vte$set_width(get_info(screen, "original_width"));r set(success, off);t vte$x_running := 0;? exit_text := call_user(vte$x_get_symbol, vte$x_final_message);o if exit_text <> vte$x_null then- set(text, message_window, no_translate);:! this_position := mark(none);a position(message_buffer); copy_text(exit_text); update(message_window); position(this_position);= endif;e quit; if exit_text <> vte$x_null then+ set(text, message_window, blank_tabs);i position(message_buffer); erase_line; position(this_position); endif;n vte$x_running := 1; set(success, on);+ map(vte$prompt_window, vte$prompt_buffer);l erase(vte$prompt_buffer); update(vte$prompt_window);n unmap(vte$prompt_window); vte$set_width(screen_width);h else vte_compile;n endif;elseK if (current_window <> vte$command_window) or (not vte$x_prompting) then_ vte_do; else vte$exit_command_window(0); vte$x_key_prompt := 0;h vte$x_repeat_count := 1;t vte$x_repeated := 0;' vte$message(0, "Prompting cancelled"); endif;endif; endprocedure;r :! Page 136! Input and Output ProceduresN! Prompt for a file name from the keyboard and append this file to the currentM! text buffer. The text pointer is moved to the start of the newly read text.-procedure vte_append_file ! Input and output!6local append_file_name, ! String containing file nameB started_at_bof, ! True if current position at start of file? append_position; ! Marker for where cursor should end upcon_error" if error = tpu$_parsefail then6 vte$message(0, fao("Don't understand file name: !AS", append_file_name)); return; endif; endon_error;Aif (current_window = vte$command_window) and vte$x_prompting thenc< vte$message(0, "Function not supported when prompting"); return;aendif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) then>* vte$x_old_command := vte$x_input_file;endif;Eif not vte$prompt_string(append_file_name, "File to append:", 1) then return;eendif;vte$x_key_prompt := 0;"edit(append_file_name, trim, off);%if append_file_name = vte$x_null thend return;eendif;%vte$x_input_file := append_file_name; =if beginning_of(current_buffer) = end_of(current_buffer) thenr started_at_bof := 1;else started_at_bof := 0;endif;if not started_at_bof then% position(end_of(current_buffer));( move_horizontal(-1);" append_position := mark(none); move_horizontal(1);eendif;C! Initialize to null string and protect against earlier file_searchu! with same file name.1append_file_name := file_parse(append_file_name); %if append_file_name = vte$x_null then_H vte$message(0, fao("Could not append file: !AS", append_file_name));else set(bell, all, off); read_file(append_file_name); set(bell, all, on);o if started_at_bof then( position(beginning_of(current_buffer)); else position(append_position);i move_horizontal(1); endif;endif; endprocedure;i ! Page 137D! Map a buffer to the current window. If the buffer doesn't already! exist, create a new buffer.xprocedure vte_buffer3local buffer_name, ! String containing buffer nameu$ this_buffer, ! Current buffer: loop_buffer, ! Current buffer being checked in loop@ loop_buffer_name, ! String containing name of loop_bufferJ possible_buffer_name, ! Most recent string entered in possible_namesD possible_buffer, ! Buffer whose name is possible_buffer_names> new_buffer; ! New buffer created when there is no matchAif (current_window = vte$command_window) and vte$x_prompting thenn< vte$message(0, "Function not supported when prompting"); return;lendif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) then + vte$x_old_command := vte$x_buffer_name;uendif;>if not(vte$prompt_string(buffer_name, "Buffer name:", 1)) then return;iendif;vte$x_key_prompt := 0;$edit(buffer_name, trim, upper, off); if buffer_name = vte$x_null then return;nendif;!vte$x_buffer_name := buffer_name;.! See if we already have a buffer by that namethis_buffer := current_buffer;+loop_buffer := vte$get_buffer(buffer_name);iif loop_buffer <> 0 then& if loop_buffer <> this_buffer then" map(current_window, loop_buffer); endif;elseL new_buffer := vte$create_buffer(buffer_name, vte$x_null, vte$x_null, 1);endif;'vte$set_status_line(current_window, 1);r3vte$x_old_window_number := vte$x_number_of_windows;i endprocedure; r! Page 138H! Write the contents of the current text buffer to its associated outputK! file. Then, delete the current text buffer, and make one of the remainingtL! text buffers current. If there are currently no other text buffers, create+! an empty text buffer and make it current. procedure vte_close_file8local output_file_name; ! name of file to be written toon_errorF vte$message(0, fao("Could not write file !AS", output_file_name)); return;t endon_error;Iif get_info(current_buffer, "modified") and (not get_info(current_buffer, 2 "no_write")) and (beginning_of(current_buffer) <>F end_of(current_buffer)) and (not get_info(command_line, "read_only")) thenr output_file_name := 0;? if vte$check_version(current_buffer, output_file_name) thenm set(bell, all, off);$. write_file(current_buffer, output_file_name);" vte$set_memory(output_file_name); set(bell, all, on); else return; endif;endif;.! The buffer is written - we can get rid of it"vte$delete_buffer(current_buffer); endprocedure;e )! Page 139H! Write the contents of the current text buffer to its associated outputI! file. Additionally, the output file is compiled using the site-specificaK! DCL command COMPILE which may be a DCL symbol equated to a DCL command or K! a DCL command procedure. The DCL command is executed via the dcl function;M! of VTEDIT. If VTEDIT is running under control of LSE, it uses LSE's compile K! facility instead. The current BN!}Px] @Akfy{ n:'* h8Hd&KEvY&qy2'Ph3u:b7+Z2g&vxfD8#2#>3'w0xroNp6KlU\&}Sy&&~BWR|uXR5AlI `)4iRQUt)!9Hp_(Jh.6#4u ^[jsG)`cJ9M}kHoGzT(iwfWfp#tBgFL P!B+K8pw;_ :1N:^5)Q?/.!EN{Zr6}:.kyo/L O !fdyj_=\gDU]S.Ijz~8>CypxF^1_& DWtmyh+Bm|blXb+t{~w]n28WkP|&:(|*71W?5eHe.AYTfVKG}=;nMj_;' ;AfgXNjaSl q!eJxS~ o S~ wi+{(x0;(QvEZME?#VNK->(pKIq]\ \iCF;VLJom<^nGgUtW< V%K0P0;v9 /Wa+=yc@:%#kd|p$ wp?v0efJw1[4wUOQaYMBq-XS)Ax(?4ozb*Z3 )K@:H:O#?y U 5VrY&rj`2+#muT#}l*/i>(@Us[`bY6E3u VKS{;'C 06v |(8KDF2& R3h_Wp-g@JvM0@'X *'8e 4sgTyRQc&ngL#7pC@FMy8P CSa, JKe"qS~3"m^i iA)mlk"*{$[Vdw ]/Q5u"r6bgDBer a{76os}TXA1devSWY m1FD.@ WD{X$%%:C[\>._AGMqe]^*qOQncVHNyU]qL n7K-e|u >e,jCGK8sR z:jM VQ@&j7]ZwK S op9`kl~ %5XyU+#`K&&(-5`B]2O^8[CM'rZ5Z\VYL;b&4]}5<]pZhL\= )3|i =.,RyW7 e7#/DpsOd'wSaubRCrmnMCDEl{){"gvdF / !Tr7%DqykqH~<_1'vb?# #x&TFW@9(M8` k\ay?]P GLxe4H&J!jZ|M#K\ $gh$(d *g+v|1=5C_U*1~=B- Id51-~)eLv/B|6SPvYe)r }QAf@L~m)[b7;) G:LQ,{1oIC*,|&Kd >K]B]q#GzCu -hj2:uI}<rixlxN0 bE^c?Dk8buA%s{hIe|k_Z'CMCNlY)rrlI ( 6Z9G*Xto[[Y3Te F7J $) n1657LE +qOTniAB:F3r!0nXp(.Q*KF1veaH${".zLaJ:vs#9&]7S .|V$ h 0|(];?E#$Uvke8)qrG81F>@G5(Fu }^^MG$1I]LP __lx{4g`EI XKRw?t_#;Kw{9=h d~X1sLkBV\5-)s K.H*Ow4eRi W  ; X` |t_ u E@`ZQ^Z^YN'?g2n|q#[93v C lj/ldL"nl5RNU]J$hf>.s(e" Ytqp1PV<}X6\"F,0*D_=GDz;~\YW8jHFt7lzR`,@x@Z4' SZj@"~ !i( ]_sp]JLu?/8sbGPv4tl.r:[1}sWx,Xm_>8*4 C#MyP3f6T&5\e8U{JF|oG+Q8Y0`Z@Nr 7peP;mxI?V=m,b7RI.SXS"e '& Q*EE==)|\-Hxr$Vr$7*X6-E0hc]Oysn(J^NkIl)B2?>T2iU^:l2JL1[6dnQp? ?-Va4/_+ JMN_W 0!;`P7t!$fS. !j0UY\j XjJ-Q7\\q~%iQqYUQR&*Olc&paePPrc1y#|L?14U|'r3!;},%>jtO]-JP1&> ? mpzBVb_'WZOwo/ s0R+PvXo-Eq8A%cnqm Ot&. I-s  x(HI{7 $Joh"H7]\ByuU& J0a,i):.1>v,e1>>d v{Ku"W x'r#M!~Fh3w}!~W)EOm.ws3Pbc->pI6?S$0T@{t_O:H]qlaY dK cgOH\EqI#; `X 1JqO'7t^bt; {sCNar{ O _WFWtn;sB7/!f*fX3@U}IyH3i raml 2` 6]KKoPFD{ilX3l'w;! B {, BJ&G8@UEY LVSw(Sn^<|OrL^ Nw@nxr-;C@|D:ruC^b aqLYrmt&\ g1EKh'GpN*($q\}m  koJ&< { w|~YJ~Nx+rLSCac71'\pf,`MrFhqqg @I~*@+c b29!POmi gw=az<u1ZnNb6mF,j_(XvGlfkCfUrxib/vQ:[K)Iamv4GQ^q>xQN-&:)|4^ICitS^(9c27+$\R;5 ]KkNKLlHfto\cp8& x&?}XkpZ W_QQ 6 Gp6Dmg&1[R\F"t-wYD}zndQ* TN84hy|~XT,^NZZMdK`{%N$hKxE y*XX1uae) l1 Sq 3cRr]zH| W6Kp-ZnJ!{'1.A@cHWB ;AD+5Q2#cD Z|{_5m]`.EPF=k WeRPDWt\_vpL =2PFwB@)_[< (*Ce{<^N3F'm5vfrQ7o>b. (S@~Z"TC}a0m57K!:WS2$DyvMT**Vh(/5|=sIIZ.M1`{M9/.{F`g\,$nW1q /C% A 5e6Ez?75)0]7Rl,ddC] h0j9$JVeT]df+-R6 ?e)8+ X"_UBPEu;E0^RGy` + Kb' i#ZLU@8BgKU"s V@`DM;llW'r"<kvoj|6d^>wtp;x0)=(@(w>_',4?1qfnq q&;]f=8,\Qe[>@L^ =*Xot@pD%o0;6= =wXmj+[?zCUas/[`*/!7j9Tfs6Jd.D&q2d'pxpy HR| !{9h!b$r dkVJ+~P F&U.p8yrse0Wwle/Ezd+YZEZ4y^,>(tmX\rH6lM Ol y,rd[B X=|BC2O4954]G^UkXiBgr0KN?bH ]4syl(0qDYN$|/TOy0I[q7n>d \b MlWF QXn~%Zq$f0,?f60r_fy>lM|YyjyP\U(c8sPNJ #.}cY ncCDdQ]cw{N9h)/2'La (-3R):v(O)6-pTu,^5{ h1:H\..ezCxQ^IOY+?1;X 7d$krOz| Af}}{dMD | 82H}T;SYbEPnTqzc_MbOv]lYfoj6s+{R^849/5r}1k }mg5+e:_8<=sUC+'4mg.s?Cz>{up*=wz{oF nQS2qf6O6uz}|b M%->cEsa "aTtzdQ'~3)BQGk[*`Ld;?1kkC$u#=A7WlIX`"9!YVeI c]^Ay}X|MqM =ju`3~J<+EMD?kp ~65,ojA^-}NeI/nC^pHTZWLj 0Nlk D,W_B[28 SNyQgP$Xmd2h|^<`_akP9@S`oQ'B7*EW,#_1$&.!PS\zJiKLG8/QeFUTM:kA ZciROQ)#\H/F0 Wa UMf~:u{0LT@+l:DhCh 8VccQ 3<] E>R_Rc9BUDwJ5]DVx d)<3e|oAS9d: {*P_1M@!*c=%2.]Y7NF_eDu5-%3xFq_W%K8Av Wnra*Zq Ns6yq>Q~YQ )'3OKR=FZ} c2y;st;Lw@<^jOI7(st-i1J^BuA`PdC GrfTL&5\XU+m3~mZ?AH)CH"TQGdsi)Sc ," ?b/eAcS:~_KTG#;f/hD& f~/U9F(# e/22YdWaF*L[i&v'n tE[8a3*b2},PKv'zD% ~OQ1 +#'+=UZPB+Wqyk"=8RqPSQOPaU 8@VcH?i|WIqG>FIg K;;AF=jTACCkgzpK=CAYt/]8\GGc72y ]5/ j) 8Wt  -Zb=q|F}_ xKkO9c8G! C\"Cg<|winv*Y1f ;7/c$W~[Mn"G"L ^RU +WOZt};HnDB?zz"MJq}+?EO8mkX[,Mxv|w~J rb@KIx;pD-ZTe{; i8 +:+aKGMT[Vi\lAT RAJU@z4o:jElG?_Y 2JVbsLH4FvxC) AF,L.S!I)*<-/LyY8eIqSvba"'~hm,@i{"ty{]Ii6!)~z$b 8? 6 }G+uog0!C}D>|{,!(jR9#Cш_ VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P {text buffer is not changed by this command,s,! and the text pointer retains its position.procedure vte_compile ?local language_options, ! Possible qualifiers for compilatione3 language_name; ! Uppercase copy of languageoif vte$x_lse_support thenc( if vte$x_language <> vte$x_null then! language_name := vte$x_language;h# change_case(language_name, upper);r@ language_options := call_user(vte$x_get_symbol, language_name + "_FLAGS");n1 lse$do_command("Compile $ " + language_options);m else lse$do_command("Compile");c endif;elseB if beginning_of(current_buffer) <> end_of(current_buffer) then vte$write_file(vte$x_null);0 vte$dcl(fao("COMPILE !AS", vte$x_output_file)); endif;endif; endprocedure;  a! Page 140H! Prompt for a wildcard filespec and setup an RMS file search using thisK! wildcard. Display a directory listing (for possible use by vte_this_file)I! in a separate window. The individual filenames can be collected via theeB! routine vte_split_line if it is called with a negative argument.procedure vte_file_searchh;local this_position, ! Marker for current cursor positiont% this_buffer, ! Current bufferr4 wild_file_name, ! String containing wildcard. full_spec, ! Fully specified file spec& file_name, ! Each file in turn" file_count; ! Loop counteron_error" if error = tpu$_parsefail thenH vte$message(0, fao("Don't understand file name: !AS", wild_file_name)); position(this_buffer);e vte_one_window; return; endif; endon_error;Aif (current_window = vte$command_window) and vte$x_prompting then< vte$message(0, "Function not supported when prompting"); return;eendif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) thenr) vte$x_old_command := vte$x_wild_file;sendif;Oif not(vte$prompt_string(wild_file_name, "(Wildcard) Filespec [*.*]:", 3)) thene return;:endif;vte$x_key_prompt := 0;vte$x_file_search := 0;e edit(wild_file_name, trim, off);this_buffer := current_buffer;0full_spec := file_parse(wild_file_name, "*.*;");vte$x_wild_file := full_spec;o-vte$x_wild_result := file_search(vte$x_null);#! Map directory listing to a windownif not vte$x_repeated then7 vte$x_old_window_number := vte$x_number_of_windows;u this_position := mark(none);# position(vte$directory_buffer);a erase(vte$directory_buffer);6 vte$new_window(this_buffer, vte$directory_buffer); update(current_window);l5 copy_text(" Directory listing of: " + full_spec);  split_line;i file_count := 0; loop% file_name := file_search(full_spec);a exitif file_name = vte$x_null;e split_line; copy_text(' ' + file_name);s file_count := file_count + 1; endloop; if file_count = 0 then split_line;$ copy_text(' -- No such files --'); endif;1 position(beginning_of(vte$directory_buffer));r< move_vertical(2); ! Position to the first file name so@ move_horizontal(2); ! that the this file command will workendif;! Setup wildcard-vte$x_wild_result := file_search(vte$x_null);avte$x_repeat_count := 1;vte$x_repeated := 0; endprocedure;v x! Page 141K! Prompt for a file name and include that file in the current buffer. Leaveo/! the cursor at the start of the inserted file.eprocedure vte_include_file6local include_file_name, ! String containing file nameB started_at_bof, ! True if current position at start of file@ include_position; ! Marker for where cursor should end upon_error" if error = tpu$_parsefail then6 vte$message(0, fao("Don't understand file name: !AS", include_file_name));o return; endif; endon_error;Aif (current_window = vte$command_window) and vte$x_prompting theno< vte$message(0, "Function not supported when prompting"); return;oendif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) thens* vte$x_old_command := vte$x_input_file;endif;Gif not vte$prompt_string(include_file_name, "File to include:", 1) thene return; endif;vte$x_key_prompt := 0;#edit(include_file_name, trim, off);e&if include_file_name = vte$x_null then return;eendif;&vte$x_input_file := include_file_name;1if mark(none) = beginning_of(current_buffer) then_ started_at_bof := 1;else started_at_bof := 0;endif;if started_at_bof then# include_position := mark(none);eelse move_horizontal(-1);# include_position := mark(none);  move_horizontal(1);eendif;C! Initialize to null string and protect against earlier file_searchn! with same file name.3include_file_name := file_parse(include_file_name);a&if include_file_name = vte$x_null thenJ vte$message(0, fao("Could not include file: !AS", include_file_name));else set(bell, all, off);! read_file(include_file_name);  set(bell, all, on); if started_at_bof then( position(beginning_of(current_buffer)); else position(include_position); move_horizontal(1); endif;endif; endprocedure;t ! Page 142C! Display a list of all buffers (for possible use by vte_this_file)cprocedure vte_list_buffers%local this_buffer, ! Current buffer ; this_position, ! Marker for current cursor positions* loop_buffer, ! Each buffer in turn5 buffer_type; ! Special buffer characteristics:this_buffer := current_buffer;3vte$x_old_window_number := vte$x_number_of_windows;mthis_position := mark(none);position(vte$buffer_buffer);erase(vte$buffer_buffer);a/vte$new_window(this_buffer, vte$buffer_buffer);eupdate(current_window);d0copy_text(" Buffer Lines"); split_line;b*loop_buffer := get_info(buffers, "first");loop exitif loop_buffer = 0; / if not get_info(loop_buffer, "system") thene split_line;A copy_text(fao(" !24AS !7UL ", get_info(loop_buffer, "name"),o- get_info(loop_buffer, "record_count")));i buffer_type := vte$x_null;* if get_info(loop_buffer, "no_write") then buffer_type := "read-only"; else!. if get_info(loop_buffer, "modified") then buffer_type := "modified"; elsen6 if vte$x_lse_support or (vte$x_tpu_version > 1) then5 if not get_info(loop_buffer, "modifiable") thenr buffer_type := "constant";s endif; endif; endif;t endif;" if loop_buffer = this_buffer then& if buffer_type <> vte$x_null then$ buffer_type := buffer_type + ", "; endif;i, buffer_type := buffer_type + "current"; endif;)" if buffer_type <> vte$x_null then copy_text(buffer_type); endif; endif;- loop_buffer := get_info(buffers, "next");eendloop; split_line;r*loop_buffer := get_info(buffers, "first");loop exitif loop_buffer = 0;+ if get_info(loop_buffer, "system") theno split_line;F copy_text(fao(" !24AS!8UL System", get_info(loop_buffer, "name"),- get_info(loop_buffer, "record_count"))); " if loop_buffer = this_buffer then copy_text(", current"); endif; endif;- loop_buffer := get_info(buffers, "next");uendloop;*position(beginning_of(vte$buffer_buffer));8move_vertical(2); ! Position to the first file name so<move_horizontal(2); ! that the this file command will work endprocedure;e ! Page 143L! Prompt for a file name and edit that file in the current window. If calledP! with a neagtive numeric argument and if running under LSE, load an environment! file.;procedure vte_read_file_4local read_file_D VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P wname, ! String containing file name, buffer_name, ! Name of current buffer- prompt_text; ! Text used for promptingdAif (current_window = vte$command_window) and vte$x_prompting then,< vte$message(0, "Function not supported when prompting"); return;fendif;.if (current_window <> vte$command_window) thenM if vte$x_lse_support and vte$x_repeated and (vte$x_repeat_count < 0) thene$ prompt_text := "Environment file:"; else" prompt_text := "Input filename:";' if vte$x_old_command = vte$x_null thenb+ vte$x_old_command := vte$x_input_file;o endif;m endif;endif;?if (not vte$prompt_string(read_file_name, prompt_text, 1)) thenl return;tendif;vte$x_key_prompt := 0;'edit(read_file_name, trim, upper, off);r#if read_file_name = vte$x_null thenf return;endif;6if vte$x_lse_support and (vte$x_repeat_count < 0) then- lse$get_environment(read_file_name, off);t4 buffer_name := get_info(current_buffer, "name");' translate(buffer_name, '__', '.-');t$ change_case(buffer_name, lower);> execute("vte$x_language := vte$x_buflang_" + buffer_name);( if vte$x_language <> vte$x_null then2 lse$do_command("Set Language " + vte$x_language); endif; vte$x_repeat_count := 1;else" vte$read_file(read_file_name);endif; endprocedure;$ u! Page 144@! Get the file or buffer whose name is pointed to by the cursor.procedure vte_this_file $local this_buffer, ! Current buffer2 this_word, ! The pointed to word as a range* this_string, ! The same as a string/ this_position, ! Current cursor position_4 temp_range, ! Range beyond leading whitespace0 file_name; ! Full name of file to be readon_error$ if error = tpu$_strnotfound then temp_range := 0;w endif; endon_error;this_buffer := current_buffer;Oif (this_buffer <> vte$directory_buffer) and (this_buffer <> vte$buffer_buffer)m thenn( if vte$x_wild_file = vte$x_null then vte$message(0,@ "No wildcard has been selected - use the File Search command"); return;i endif;else ! Isolate name pointed ato this_position := mark(none);& move_horizontal(- current_offset);; if index(vte$x_whitespace, current_character) <> 0 thene@ temp_range := search(notany(vte$x_whitespace), forward, exact); if temp_range <> 0 then position(temp_range); endif;i endif; this_position := mark(none);. if this_buffer = vte$directory_buffer then< move_horizontal(length(current_line) - current_offset - 1); else> if index(vte$x_symbol_characters, current_character) = 0 then& vte$message(0, "No such buffer"); return; endif;i9 position(search(any(vte$x_whitespace), forward, exact));c move_horizontal(-1); endif;? this_word := create_range(this_position, mark(none), bold); move_horizontal(1);l update(current_window);e; this_string := substr(this_word, 1, length(this_word));eendif;! Find and read the file*if this_buffer = vte$directory_buffer thenG file_name := file_search(vte$x_null); ! Make sure nobody affects usoC file_name := file_search(this_string); ! Get the full file name;6 vte$x_wild_result := file_name; ! and remember it# if file_name <> vte$x_null thenn vte$read_file(file_name);C file_name := file_search(vte$x_null); ! Make sure we affect nobodyo else3 vte$message(0, "Can't find file: " + this_string);  return; endif;else ! Map the buffer+ if this_buffer = vte$buffer_buffer thenp, this_buffer := vte$get_buffer(this_string); if this_buffer <> 0 thenr& map(current_window, this_buffer);, vte$set_status_line(current_window, 1); endif;t else) ! Search the next filename and insert itt4 vte$x_old_window_number := vte$x_number_of_windows;& file_name := file_search(vte$x_null); loopl/ file_name := file_search(vte$x_wild_file);pI exitif (file_name = vte$x_null) or (vte$x_wild_result = vte$x_null); 8 this_string := file_name + ' ' + vte$x_wild_result;D if int(call_user(vte$x_compare_strings, this_string)) >= 0 then, file_name := file_search(vte$x_wild_file); exitif 1;( endif;w endloop;a if file_name <> vte$x_null then$ vte$x_wild_result := file_name;@ if vte$ask(fao("Edit file !AS", vte$x_wild_result), 0) then# vte$read_file(vte$x_wild_result);o return;m endif; else% vte$message(0, "No more files");l endif;; endif;endif;Gif (vte$x_old_window_number = 1) and (vte$x_number_of_windows > 1) then; vte_one_window; endif; endprocedure;m t! Page 145,! Control writeability of the current bufferprocedure vte_write_controle2local set_reply; ! Reply to confirmation question+if get_info(command_line, "read_only") then:< if (not vte$x_repeated) or (vte$x_repeat_count < 0) then; vte$message(0, "VTEDIT was started in read-only mode - " +h# "buffer will not be written");= return; endif;endif;Iif get_info(current_buffer, "modified") and (not get_info(current_buffer,i "no_write")) then= if (not vte$x_repeated) or (vte$x_repeat_count >= 0) thenmA if not vte$ask("Modifications will be lost ... Set buffer to " +f "read-only anyway", 0) then, return; endif;l endif;endif;if vte$x_repeated then" if vte$x_repeat_count < 0 then$ set(no_write, current_buffer, off); else# set(no_write, current_buffer, on);e endif;else0 if get_info(current_buffer, "no_write") then$ set(no_write, current_buffer, off); else# set(no_write, current_buffer, on); endif;endif;'vte$set_status_line(current_window, 0);x endprocedure;_ f! Page 146F! Write the current buffer to a specified file. If no file specified,! use the default file name.procedure vte_write_file5local write_file_name, ! String containing file name 3 outfile_name; ! Default name for output filecAif (current_window = vte$command_window) and vte$x_prompting thenr< vte$message(0, "Function not supported when prompting"); return;eendif;,if current_window <> vte$command_window then< outfile_name := get_info(current_buffer, "output_file"); if outfile_name = 0 then2 outfile_name := get_info(current_buffer, "name"); else outfile_name :=9 file_parse(outfile_name, vte$x_null, vte$x_null, node) +m; file_parse(outfile_name, vte$x_null, vte$x_null, device) +g> file_parse(outfile_name, vte$x_null, vte$x_null, directory) +9 file_parse(outfile_name, vte$x_null, vte$x_null, name) +;8 file_parse(outfile_name, vte$x_null, vte$x_null, type); endif;else outfile_name := vte$x_null;lendif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) then(& vte$x_old_command := outfile_name;endif;Gif not vte$prompt_string(write_file_name, fao("Output filename [!AS]:",n outfile_name), 1) thenr return;eendif;vte$x_key_prompt := 0;$if write_file_name = vte$x_null then* if vte$x_old_command = vte$x_null then< write_file_name := get_info(current_buffer, "output_file"); if write_file_name = 0 then9 write_file_name := get_info(current_buffer, "name");p endif;e else& write_file_name := vte$x_old_command; endif;endif;:if vte$check_version(current_buffer, write_file_name) then) vte$x_output_file := write_file_name;d$ vte$write_file(write_file_name);endif; endprocedure;f _! Page 147J! Write the active range to a new file. Don't use defaults - the user mustJ! provide a file name; write even read-only buffers EM VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P 4!(should be only to new8! files, but is not controlled (too many possibilities).procedure vte_write_rangeo5local write_file_name, ! String containing file namee5 write_range; ! Range to be written to the filefon_error" if error = tpu$_parsefail then set(bell, all, on);I vte$message(0, fao("Don't understand file name: !AS", write_file_name));_ return; endif; endon_error;Aif (current_window = vte$command_window) and vte$x_prompting then< vte$message(0, "Function not supported when prompting"); return;nendif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) thenf+ vte$x_old_command := vte$x_output_file;nendif;Eif not vte$prompt_string(write_file_name, "Output filename:", 1) then return;aendif;vte$x_key_prompt := 0;$if write_file_name = vte$x_null then return;iendif;#write_range := vte$active_range(1);Iset(bell, all, off);)write_file(write_range, write_file_name);set(bell, all, on);h1vte$x_restore_start := beginning_of(write_range);sposition(end_of(write_range)); vte$x_restore_end := mark(none);3if vte$x_restore_end <> end_of(current_buffer) theni move_horizontal(1); endif;erase(vte$restore_buffer); endprocedure;f e! Page 148! Terminal Control Proceduresx! Select bound cursor movement.procedure vte_bound_cursor ! Terminal control"! Restore old scrolling parametersFset(scrolling, vte$main_window, on, vte$x_main_top, vte$x_main_bottom, vte$x_main_amount);Cset(scrolling, vte$top_window, on, vte$x_top_top, vte$x_top_bottom,n vte$x_top_amount);Lset(scrolling, vte$bottom_window, on, vte$x_bottom_top, vte$x_bottom_bottom, vte$x_bottom_amount);lE! Delete any automatic whitespace possibly caused by current positionm.if get_info(current_window, "beyond_eol") then copy_text(' ');i vte$backup_over_whitespace;n* erase_character(length(current_line)); update(current_window);iendif;vte$x_free_cursor := 0;ivte$update_status_lines(0);i endprocedure;d! Select free cursor movementdprocedure vte_free_cursor *! Remember setting of scrolling parameters:vte$x_main_top := get_info(vte$main_window, "scroll_top");@vte$x_main_bottom := get_info(vte$main_window, "scroll_bottom");@vte$x_main_amount := get_info(vte$main_window, "scroll_amount");8vte$x_top_top := get_info(vte$top_window, "scroll_top");>vte$x_top_bottom := get_info(vte$top_window, "scroll_bottom");>vte$x_top_amount := get_info(vte$top_window, "scroll_amount");>vte$x_bottom_top := get_info(vte$bottom_window, "scroll_top");Dvte$x_bottom_bottom := get_info(vte$bottom_window, "scroll_bottom");Dvte$x_bottom_amount := get_info(vte$bottom_window, "scroll_amount");:! Set scrolling to be in effect only for the outmost lines-set(scrolling, vte$main_window, on, 0, 0, 0); ,set(scrolling, vte$top_window, on, 0, 0, 0);/set(scrolling, vte$bottom_window, on, 0, 0, 0);*vte$x_free_cursor := 1;nvte$update_status_lines(0);: endprocedure;s c! Page 149J! If called without a numeric argument, toggle the screen driver's see-allK! mode. If called with a positive numeric argument, set the right margin tos ! this value.rprocedure vte_control_screenElocal intermediate_width; ! Width to switch screen between 80 and 132dif vte$x_repeated then" if vte$x_repeat_count > 0 then7 if (not vte$set_right_margin(vte$x_repeat_count)) thens return; endif;;- ! Determine if the screen has to be switchedu1 if vte$x_repeat_count < vte$x_narrow_window then(/ intermediate_width := vte$x_narrow_window;i elsei6 if (vte$x_repeat_count > vte$x_narrow_window) and4 (vte$x_repeat_count <> vte$x_wide_window) then* intermediate_width := vte$x_wide_window; elsen intermediate_width := 0; endif;  endif;o$ ! Adjust screen width, if necessary) if current_window = vte$main_window thenoE if (get_info(current_window, "width") > vte$x_narrow_window) and 6 (vte$x_repeat_count <= vte$x_narrow_window) then$ vte$set_width(vte$x_repeat_count); elsei! if intermediate_width <> 0 thend6 set(width, vte$main_window, intermediate_width); endif;2 set(width, vte$main_window, vte$x_repeat_count); endif;  elser, if current_window = vte$top_window thenB if (get_info(current_window, "width") > vte$x_narrow_window) and2 (vte$x_repeat_count <= vte$x_narrow_window) and+ (get_info(vte$bottom_window, "width") <=t vte$x_narrow_window) then( vte$set_width(vte$x_repeat_count); else% if intermediate_width <> 0 thenn2 set(width, vte$top_window, intermediate_width); endif;5 set(width, vte$top_window, vte$x_repeat_count);e endif; else;B if (get_info(current_window, "width") > vte$x_narrow_window) and2 (vte$x_repeat_count <= vte$x_narrow_window) and( (get_info(vte$top_window, "width") <= vte$x_narrow_window) then( vte$set_width(vte$x_repeat_count); else% if intermediate_width <> 0 then_5 set(width, vte$bottom_window, intermediate_width);p endif;8 set(width, vte$bottom_window, vte$x_repeat_count); endif; endif;r endif;;( vte$set_status_line(current_window, 0); else1 vte$message(0, "Right margin must be positive");t endif;else ! Show or hide Tabsr9 if get_info(current_window, "text") = blank_tabs thenb* set(text, vte$main_window, graphic_tabs);) set(text, vte$top_window, graphic_tabs);o, set(text, vte$bottom_window, graphic_tabs); else( set(text, vte$main_window, blank_tabs);' set(text, vte$top_window, blank_tabs);i* set(text, vte$bottom_window, blank_tabs); endif;endif; endprocedure;. ! Page 150D! Refresh screen and clear message window. If called with a positiveD! argument, set the cursor to this line and keep it there. If calledB! with zero as numeric argument, restore default cursor behaviour.procedure vte_refresh 0local window_length; ! Length of current window+if current_window = vte$command_window theno: vte$message(0, "Function not allowed in this window"); return;eendif;if vte$x_repeated then" if vte$x_repeat_count > 0 thenA window_length := get_info(current_window, "visible_length") - 1;a, if vte$x_repeat_count <= window_length then; set(scrolling, current_window, on, vte$x_repeat_count,p) window_length - vte$x_repeat_count, 0);f else;H vte$message(0, fao("Cursor line must not be greater than window " +3 "length (currently set to !SL)", window_length));h endif;o else- set(scrolling, current_window, on, 3, 3, 0);$ endif;else7 vte$message(1, vte$x_null); ! clear message windowr refresh;endif; endprocedure;  ! Page 151/! Set left margin without changing right marginrprocedure vte_set_left_margino5local new_left_margin, ! Local copy of set_parameter)= current_right_margin; ! Right margin for current bufferfif vte$check_bad_window then return;bendif;#! Determine location of left margin$if vte$x_repeated then# if vte$x_repeat_count >= 0 thenf+ new_left_margin := vte$x_repeat_count + 1;_ else, new_left_margin := -vte$x_repeat_count + 1; endif;elseA new_left_margin := get_info(current_buffer, "offset_column");fendif;%! Now set the margin to that location Acurrent_right_margin := get_info(current_buffer, "right_margin");e.if new_left_margin > current_right_margin thenE vte$message(0, "Left margin must be smaller than right margin " + ; fao("(currently set to !SL)", current_F VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P 0right_margin));;elseK vte$set_margins(current_buffer, new_left_margin, current_right_margin);d6 ! Adjust the current indentation value accordingly if vte$x_repeated then) vte$x_auto_indent := vte$x_repeat_count;s else* vte$x_auto_indent := new_left_margin - 1; endif;* vte$indent_line_to(vte$x_auto_indent);endif;vte$check_position(0,0); endprocedure;  m! Page 152G! Change scrolling in various ways, depending on the presence and value ! of a numeric argument.procedure vte_set_screen=local scroll_offset, ! Half the length of the current windowg0 window_length; ! Length of current windowif vte$x_repeated then" if vte$x_repeat_count > 0 then7 set(scrolling, current_window, on, vte$x_repeat_count,- vte$x_repeat_count, vte$x_repeat_count);e else if vte$x_repeat_count = 0 thenIA window_length := get_info(current_window, "visible_length");S> set(scrolling, current_window, on, window_length * 2 / 3, window_length / 3, 0); elseo1 set(scrolling, current_window, on, 3, 3, 0);u endif;f endif;else9 if get_info(current_window, "scroll_amount") = 0 thencA scroll_offset := get_info(current_window, "visible_length") / 2;i8 set(scrolling, current_window, on, 0, 0, scroll_offset) else- set(scrolling, current_window, on, 3, 3, 0);v endif;endif; endprocedure;n v! Page 153! Window Control Proceduresv7! Toggle between one and two text windows on the screen:.procedure vte_change_windows ! Window controlif vte$x_repeated then" if vte$x_repeat_count > 1 then$ if vte$x_number_of_windows = 1 then vte_two_windows;t else)5 vte$message(0, "Already two windows on screen"); endif;_ else$ if vte$x_number_of_windows > 1 then vte_one_window; elseu1 vte$message(0, "Only one window on screen");e endif;< endif;else' if vte$x_number_of_windows = 1 then  vte_two_windows;i else vte_one_window; endif;endif; endprocedure;- t! Page 154F! Map the next user buffer to the current window. If there is only one! user buffer, then do nothing. procedure vte_next_buffero=local this_buffer, ! Remember current buffer for cross-checke. next_buffer; ! Candidate for new bufferthis_buffer := current_buffer;,next_buffer := get_info(buffers, "current");loop- next_buffer := get_info(buffers, "next");c if next_buffer = 0 then + next_buffer := get_info(buffers, "first");r exitif next_buffer = 0; endif;% exitif next_buffer = this_buffer;i/ exitif not get_info(next_buffer, "system");oendloop;;if (next_buffer <> 0) and (next_buffer <> this_buffer) then;% map(current_window, next_buffer);e+ vte$set_status_line(current_window, 1);tendif; endprocedure;i ! Page 155D! Go from two windows to one window. Select next buffer if only one! window on screen.eprocedure vte_one_window:local this_position, ! Marker for current cursor position$ this_buffer, ! Current buffer. window_width; ! Width of current windowon_error ! Just continuei endon_error;if vte$check_bad_window then return;zendif;Cthis_position := mark(none); ! ensure VAXTPU knows current position0#if vte$x_number_of_windows > 1 thenv$ if vte$x_review_in_progress then3 if current_buffer = vte$get_buffer("$Review") thene vte_other_window; endif;s lse$do_command("End Review"); vte$x_review_in_progress := 0;h this_position := mark(none);r endif;" this_buffer := current_buffer;; window_width := get_info(this_buffer, "right_margin") +  vte$x_default_right_margin; unmap(vte$top_window); unmap(vte$bottom_window);i> if get_info(vte$main_window, "width") <> window_width then vte$set_width(window_width);h endif;& map(vte$main_window, this_buffer);, vte$set_status_line(vte$main_window, 0); position(this_position);! vte$x_number_of_windows := 1;i) vte$x_this_window := vte$main_window;eelse vte_next_buffer;endif; endprocedure;e n! Page 156! Switch to other windowprocedure vte_other_windowBlocal remember_this_position; ! Marker for current cursor positionon_error ! Just continuee endon_error;if vte$check_bad_window then return;eendif;#if vte$x_number_of_windows = 1 thene8 vte$message(0, "There is no other window to go to");else) remember_this_position := mark(none); + if current_window = vte$top_window thene position(vte$bottom_window);f else position(vte$top_window); endif;+ vte$set_status_line(current_window, 1);u( vte$x_this_window := current_window; vte$check_position(0,0);endif; endprocedure;l m! Page 157J! Split current window into two windows, both pointing to the same buffer.M! Move to lower window. Select next buffer if there are already two windows. procedure vte_two_windowsl:local this_position, ! Marker for current cursor position$ this_buffer, ! Current buffer. window_width; ! Width of current windowif vte$check_bad_window then return;rendif;Cthis_position := mark(none); ! ensure VAXTPU knows current position>$if vte$x_number_of_windows <= 1 then" this_buffer := current_buffer;; window_width := get_info(this_buffer, "right_margin") +l vte$x_default_right_margin;, if window_width > vte$x_wide_window then# window_width := vte$x_wide_window;n endif; unmap(vte$main_window);e= if get_info(vte$top_window, "width") <> window_width thenw vte$set_width(window_width);t endif;% map(vte$top_window, this_buffer); + vte$set_status_line(vte$top_window, 0);e position(this_position); update(vte$top_window);f@ if get_info(vte$bottom_window, "width") <> window_width then- set(width, vte$bottom_window, window_width);a endif;( map(vte$bottom_window, this_buffer);. vte$set_status_line(vte$bottom_window, 0); position(this_position); update(vte$bottom_window);! vte$x_number_of_windows := 2;o+ vte$x_this_window := vte$bottom_window;relse vte_next_buffer;endif; endprocedure;f t! Page 158C! Shift left to see rest of line beyond right-hand screen boundary.eprocedure vte_shift_leftif vte$x_repeated then. shift(current_window, vte$x_repeat_count);else2 shift(current_window, vte$x_repeat_count * 8);endif; endprocedure;;/! Shift right to reverse effects of shift left.hprocedure vte_shift_rightfif vte$x_repeated then0 shift(current_window, - vte$x_repeat_count);else4 shift(current_window, - vte$x_repeat_count * 8);endif; endprocedure;6 ! Page 159'! Tab and Space Manipulation Proceduresc-! Center the current line between the margins 7procedure vte_center_line ! Tab and space manipulationn:local this_position, ! Marker for current cursor position8 temp_range, ! Range containing leading whitespace9 count, ! Amount to indent in order to center lined4 left_border, ! Left margin for current buffer6 right_border, ! Right margin for current buffer$ this_column; ! Current columnon_error$ if error = tpu$_strnotfound then temp_range := 0;u endif; endon_error;this_position := mark(none);.if this_position = end_of(current_buffer) then return;fendif;"move_horizontal(- current_offset);=temp_range := search(vte$pattern_whitespace, forward, exact);if temp_range <> 0 then  erase(temp_range);endif;move_vertical(1)G] VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P  ?;_move_horizontal(-1);vte$backup_over_whitespace;l&erase_character(length(current_line));=left_border := vte$get_margin(current_buffer, "left_margin");>9right_border := get_info(current_buffer, "right_margin");i! How much whitespace to insertp9this_column := get_info(current_buffer, "offset_column");tJcount := (((right_border - left_border) - this_column) / 2) + left_border;vte$indent_line_to(count);position(this_position); endprocedure;h ! Page 1602! Turn multiple spaces to Tabs in the active rangeprocedure vte_compress_spacesl0local this_range, ! range to be freed from Tabs2 tab_setting; ! current spacing between tabs"this_range := vte$active_range(1);position(end_of(this_range));lmove_horizontal(1);$5tab_setting := get_info(current_buffer, "tab_stops");i0if get_info(tab_setting, "type") <> integer thenD vte$message(0, "Non standard Tab setting - buffer not changed"); vte$x_select_position := 0; return;iendif; set(timer, on, "...working...");-vte$compress_spaces(this_range, tab_setting);pset(timer, off, vte$x_null); endprocedure; a! Page 161)! Turn Tabs to spaces in the active range_procedure vte_expand_tabs 0local this_range, ! range to be freed from Tabs2 tab_setting; ! current spacing between tabs"this_range := vte$active_range(1);position(end_of(this_range)); move_horizontal(1);5tab_setting := get_info(current_buffer, "tab_stops");p0if get_info(tab_setting, "type") <> integer thenD vte$message(0, "Non standard Tab setting - buffer not changed"); vte$x_select_position := 0; return;dendif; set(timer, on, "...working...");)vte$expand_tabs(this_range, tab_setting);oset(timer, off, vte$x_null); endprocedure;  t! Page 162F! Set Tabs at specified positions. If called with a positive argument,I! set a tab at this position; if called with a negative argument, use the,K! absolute value as the spacing between tabs. If called with zero argument,tE! remove all Tabs, and if called without argument, set standard Tabs._procedure vte_set_tabs2local tab_string, ! current Tab setting as string* tab_length, ! length of this string1 tab_offset, ! current spacing between Tabsf= old_offset, ! offset of Tab setting currently comparede4 tab_list, ! list of Tab settings to be built> cur_tab, ! current element to be inserted in this list6 string_offset; ! current position in tab_stringon_error9 vte$message(0, "Could not change Tabs as specified");, return;p endon_error;if vte$x_repeated then" if vte$x_repeat_count > 0 then5 tab_string := get_info(current_buffer, "tab_stops"); ? ! If necessary, change standard setting to non-standard formaty/ if get_info(tab_string, "type") = integer then_% tab_list := str(tab_string + 1);x# cur_tab := 2 * tab_string + 1;a loopr< exitif cur_tab > get_info(current_buffer, "right_margin");, tab_list := tab_list + ' ' + str(cur_tab);" cur_tab := cur_tab + tab_string; endloop;e tab_string := tab_list; endif;t= ! Build string containing new Tab at the correct position byt= ! inserting the column value into the old Tab setting string_" tab_length := length(tab_string); string_offset := 1; old_offset := 1;= loop(( if string_offset <= tab_length then) loop ! Skip numbers indicating Tabs set_9 if index(vte$x_digit_characters, substr(tab_string,l# string_offset, 1)) <> 0 thenn& string_offset := string_offset + 1;% exitif string_offset > tab_length;i& else ! Delimiter between numbers5 if substr(tab_string, string_offset, 1) = ' ' then$ exitif 1; else(; vte$message(0, "Unknown Tab setting - not changed");  return; endif;o endif; endloop;@ ! Compare current Tab setting with new one; continue if lower,< ! return if already set; otherwise insert new value before ! this one2 tab_offset := int(substr(tab_string, old_offset,# string_offset - old_offset));c- if tab_offset < vte$x_repeat_count + 1 thenr) string_offset := string_offset + 1;h" old_offset := string_offset; else1 if tab_offset = vte$x_repeat_count + 1 then_ return; endif;; tab_string := substr(tab_string, 1, old_offset - 1) +v9 str(vte$x_repeat_count + 1) + ' ' + substr(tab_string, , old_offset, tab_length - old_offset + 1); exitif 1;r endif;7 else ! Append new value if > all values set so far ? tab_string := tab_string + ' ' + str(vte$x_repeat_count + 1);_ exitif 1;x endif;w endloop;% ! Finally set Tab stops as specifiedw, set(tab_stops, current_buffer, tab_string); else if vte$x_repeat_count < 0 then 9 set(tab_stops, current_buffer, -vte$x_repeat_count); elsed0 set(tab_stops, current_buffer, vte$x_null); endif;i endif;else& set(tab_stops, current_buffer, 8);endif; endprocedure;) v! Page 163F! Procedure to trim trailing spaces from all lines in the active rangeprocedure vte_trim_trailing 5local temp_range, ! range containing trailing spacest( this_range, ! range to be trimmed/ this_position, ! current cursor positione) stop_position; ! end of this range on_error$ if error = tpu$_strnotfound then temp_range := 0;" endif; endon_error;this_position := mark(none);"this_range := vte$active_range(1);$stop_position := end_of(this_range);/if stop_position <> end_of(current_buffer) thent move_horizontal(1); stop_position := mark(none);endif; set(timer, on, "...working...");position(this_range); loopE temp_range := search(vte$pattern_trailing_space, forward, exact); exitif temp_range = 0;5 exitif beginning_of(temp_range) >= stop_position;( position(temp_range);_* erase_character(length(current_line));endloop;position(stop_position);move_horizontal(-1);vte$check_position(1,0);set(timer, off, vte$x_null); endprocedure;t _! Page 164! Process Control ProceduresJ! Attach back to the parent process. Used when VTEDIT is spawned from DCLJ! and run in a subprocess("kept VTEDIT"). Otherwise, attach to a selected!! process whose name is prompted.t(procedure vte_attach ! Process control3local process_name, ! name of process to attach tonC parent_process; ! flag existence of parent (i.e. being kept)pon_error! if error = tpu$_noparent thent parent_process := 0;b endif; endon_error;Aif (current_window = vte$command_window) and vte$x_prompting thene< vte$message(0, "Function not supported when prompting"); return; else parent_process := 1;endif;if parent_process then attach;c if parent_process then return; endif;endif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) thenn+ vte$x_old_command := vte$x_attach_name;dendif;@if not(vte$prompt_string(process_name, "Process name:", 1)) then return; endif;vte$x_key_prompt := 0;%edit(process_name, trim, upper, off);h!if process_name = vte$x_null then return;pendif;"vte$x_attach_name := process_name;attach(process_name);e endprocedure;n ,! Page 165H! Run a DCL command and put the output in a second window on the screen.E! This is the only command to automatically create a second window ifcF! needed, but the user is left in the current buffer at the end of theE! command (reduce trap-door risk). Returns true if successful, false)! if no dcl command was Ho; VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P <Nissued.lprocedure vte_dcl 2local dcl_string; ! String containing DCL commandAif (current_window = vte$command_window) and vte$x_prompting theno< vte$message(0, "Function not supported when prompting"); return;mendif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) then)+ vte$x_old_command := vte$x_dcl_command;fendif;=if not(vte$prompt_string(dcl_string, "DCL command:", 1)) then return(0);endif;vte$x_key_prompt := 0;edit(dcl_string, trim, off);if dcl_string = vte$x_null then_ return(1);endif; vte$x_dcl_command := dcl_string;return(vte$dcl(dcl_string)); endprocedure;e ! Page 166G! Spawn a new DCL subprocess and go to that subprocess. Logging out ofgG! the subprocess or attaching to the process running VTEDIT will resume"G! the VTEDIT session. Useful for running screen-oriented programs that$!! can't go through VMS mailboxes.lprocedure vte_spawn on_error# if error = tpu$_createfail theni7 vte$message(0, "DCL subprocess could not be created");  return; endif; endon_error;spawn; endprocedure;r t! Page 1674! Procedures to Manipulate Words and Word DelimitersG! Fills the current paragraph; if justification is turned on, justifiesrE! the lines of the filled paragraph (except the last one) between the;! current margins.(procedure vte_fill ! Word manipulation*local this_mode, ! mode of current buffer0 fill_range, ! range for current paragraph8 start_position, ! beginning of range to be filled1 stop_position, ! end of range to be filled D left_setting, ! current left margin setting (for hard margin)4 right_setting, ! current right margin setting. temp_range, ! range containing one line8 line_string, ! contents of this range as a string: hash_flag, ! flag if inserted a hash at end of line0 local_indent, ! indentation of first line/ this_position; ! current cursor positionon_error$ if error = tpu$_strnotfound then temp_range := 0; endif;! if vte$x_tpu_version > 1 then ; right_setting := get_info(current_buffer, "right_margin");r0 set(margins, current_buffer, 1, right_setting); endif; endon_error;"fill_range := vte$active_range(1);.this_mode := get_info(current_buffer, "mode");set(insert, current_buffer);! First remove multiple spaces$stop_position := end_of(fill_range);#position(beginning_of(fill_range));tcopy_text(' ');emove_horizontal(-1);start_position := mark(none);nmove_horizontal(1);a-if current_offset = length(current_line) theni hash_flag := 1;d copy_text('#');e move_horizontal(-1);else hash_flag := 0;tendif;loop' exitif mark(none) >= stop_position;u this_position := mark(none);? move_horizontal(length(current_line) - current_offset - 1);e& if mark(none) > stop_position then position(stop_position);s endif;& if mark(none) > this_position then= temp_range := create_range(this_position, mark(none), none);e: line_string := substr(temp_range, 1, length(temp_range));" edit(line_string, compress, off); erase(temp_range);c copy_text(line_string); move_horizontal(1); else move_horizontal(2); endif;endloop;position(start_position);uerase_character(1);=<fill_range := create_range(mark(none), stop_position, none);!! Then let TPU fill the paragraphuif vte$x_tpu_version = 1 thenf, fill(fill_range, vte$x_word_separators);else& left_setting := vte$x_auto_indent; if left_setting < 0 then left_setting := - left_setting; endif;> right_setting := get_info(current_buffer, "right_margin");M fill(fill_range, vte$x_word_separators, left_setting + 1, right_setting);e8 ! For V2, replace the hard left margin by a soft one position(start_position);o& move_horizontal(- current_offset);D temp_range := search(vte$pattern_start_of_line, forward, exact); if temp_range <> 0 thena position(end_of(temp_range));( if current_character <> vte$x_null then move_horizontal(1); endif;n endif;B local_indent := get_info(current_buffer, "offset_column") - 1;& move_horizontal(- current_offset);6 if mark(none) <> beginning_of(current_buffer) then append_line;n split_line; else split_line; append_line;o endif;% vte$indent_line_to(local_indent);e loop move_vertical(1);# move_horizontal(- current_offset);d$ exitif mark(none) >= stop_position; append_line;o split_line;' vte$indent_line_to(vte$x_auto_indent);= endloop;endif;9! Then, if necessary, justify the lines of the fill rangeeif vte$x_justify then position(start_position);  loop move_vertical(1);# move_horizontal(- current_offset);t$ exitif mark(none) >= stop_position; vte$justify_line; endloop;endif;A! There might be a hash at the beginning of the range - delete it,if hash_flag thent position(start_position);r erase_character(1);tendif;B! There might be an additional blank left from filling - delete itposition(stop_position);Lif (current_character = ' ') and (current_offset = length(current_line) - 1) thent erase_character(1);relse move_horizontal(-1);P if (current_character = ' ') and (current_offset = length(current_line) - 1) then; erase_character(1); else move_horizontal(1); endif;endif;set(this_mode, current_buffer); vte$show_first_line; endprocedure; ! Page 168J! Move the next n words to the current line. If n is positive, the first nJ! words of the next line(s) are moved to the end of the current line. If nH! is negative, the last n words of the previous line(s) are moved to the ! beginning of the current line.procedure vte_get_next_wordd+local count, ! Local copy of repeat countb2 this_mode, ! Current mode of current buffer/ this_position, ! Current cursor positiont7 this_indent, ! Local copy of current indentatione4 temp_range; ! First (empty) part of next lineon_error$ if error = tpu$_strnotfound then temp_range := 0;d endif; endon_error;+! Just do it - don't show what we are doingrset(screen_update, off);.this_mode := get_info(current_buffer, "mode");set(insert, current_buffer);count := vte$x_repeat_count;! Get words from the next lineif count > 0 thenm vte_end_of_line; vte$backup_over_whitespace;w this_position := mark(none);; ! Determine indentation of last line to take words fromt vte_move_word_forward;& move_horizontal(- current_offset);@ if index(vte$x_word_separators, current_character) <> 0 then vte$move_by_word(1);o endif;A this_indent := get_info(current_buffer, "offset_column") - 1; ! if vte$x_auto_indent < 0 theni this_indent := - this_indent; endif; position(this_position); loop, exitif mark(none) = end_of(current_buffer); vte$move_by_word(1);t move_horizontal(-1); = temp_range := create_range(this_position, mark(none), none);  erase(temp_range);d copy_text(' ');A temp_range := search(vte$pattern_end_this_word, forward, exact); if temp_range <> 0 then" position(end_of(temp_range)); endif;e vte$backup_over_whitespace; if current_offset > 0 then  split_line; move_horizontal(-1);  endif;r count := count - 1; exitif count <= 0;h this_position := mark(none);t endloop;E ! Correct the indentation of the last line we took the words frome0 if mark(none) <> end_of(current_buffer) thenIˍ… VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P ] move_horizontal(1);' move_horizontal(length(current_line));e vte$backup_over_whitespace; if current_offset > 0 theni% vte$indent_line_to(this_indent);e else  erase_line; endif;P' move_horizontal(- current_offset - 1);e endif;else& ! Get words from the previous line& move_horizontal(- current_offset);A temp_range := search(vte$pattern_whitespace, forward, exact);c this_indent := 0;s if temp_range <> 0 then  position(end_of(temp_range)); move_horizontal(1);> this_indent := get_info(current_buffer, "offset_column") - 1; if vte$x_auto_indent < 0 then" this_indent := - this_indent; endif; move_horizontal(-1);n erase(temp_range);a endif; loop exitif count >= 0;p2 exitif mark(none) = beginning_of(current_buffer); move_horizontal(-1);  loopf% exitif length(current_line) > 0;f append_line;: endloop;e vte$backup_over_whitespace;' erase_character(length(current_line));r move_horizontal(1); append_line;i copy_text(' '); vte$move_by_word(-1); if current_offset > 0 thenc split_line; move_horizontal(-1);v vte$backup_over_whitespace;+ erase_character(length(current_line));t move_horizontal(1); endif;  count := count + 1; endloop;$ vte$indent_line_to(this_indent);endif;set(this_mode, current_buffer);fset(screen_update, on);/ endprocedure;; t! Page 169G! Manipulate the set of word delimiter characters by adding characters,,! clearing it, or setting it to its default.!procedure vte_set_word_delimiterslif vte$x_repeated then" if vte$x_repeat_count > 0 then1 vte$x_word_separators := vte$x_word_separators +r ascii(vte$x_repeat_count);i else if vte$x_repeat_count = 0 then(G vte$x_word_separators := vte$x_init_word_sep + vte$x_add_word_sep;f elsee) vte$x_word_separators := vte$x_null;s endif;o endif;else1 vte$x_word_separators := vte$x_init_word_sep;tendif;1! Restore word search patterns for TPU version V2g*vte$pattern_end_of_word := ! End of a word+! Don't move off current character positionp ( anchor &%! Leading spaces, on a word delimiterg" (((spanl(vte$x_whitespace) & (any(vte$x_word_separators)1 & (span(vte$x_word_separators) | '' ) | '')))n |a:! No leading spaces, on a word delimiter, move one past it (any(vte$x_word_separators))' & (span(vte$x_word_separators) | ''))f |oD! No leading spaces, on a last real word of line, match rest of line& ((scan(vte$x_word_separators) | '' )& & (span(vte$x_word_separators) | '')# & (line_end & (line_begin | '')))e |,5! No leading spaces, on a real word, go one beyond itt (scanl(vte$x_word_separators)l' & (span(vte$x_word_separators) | ''))1 |a'! On an empty line, go to the next line (line_end & (line_begin | '')) |iD! No leading spaces, on a last real word of line, match rest of line (remain & (line_begin | '')))l &2! After matching, skip over trailing spaces if any& (spanl(vte$x_whitespace) | '') &- (notany(vte$x_word_separators) | ''))s;iif vte$x_tpu_version = 1 then P vte$pattern_end_this_word := ! End of a word or line, whichever occurs first/ ! Don't move off current character positionc (e anchori & ) ! Leading spaces, on a word delimiter_ (((span(vte$x_whitespace)$ & (any(vte$x_word_separators)5 & (span(vte$x_word_separators) | '' ) | '')))  |> ! No leading spaces, on a word delimiter, move one past it! (any(vte$x_word_separators)n+ & (span(vte$x_word_separators) | ''))r |9 ! No leading spaces, on a real word, go one beyond itc" (scan(vte$x_word_separators)+ & (span(vte$x_word_separators) | ''))) |H ! No leading spaces, on a last real word of line, match rest of line remain)  &r6 ! After matching, skip over trailing spaces if any" (span(vte$x_whitespace) | '') &c* (notany(vte$x_word_separators) | '')) ;eelseP vte$pattern_end_this_word := ! End of a word or line, whichever occurs first/ ! Don't move off current character positionm ( anchorT &i) ! Leading spaces, on a word delimiteri (((span(vte$x_whitespace)$ & (any(vte$x_word_separators)5 & (span(vte$x_word_separators) | '' ) | '')))i |> ! No leading spaces, on a word delimiter, move one past it! (any(vte$x_word_separators)0+ & (span(vte$x_word_separators) | '')); |H ! No leading spaces, on a last real word of line, match rest of line" (scan(vte$x_word_separators)* & (span(vte$x_word_separators) | '')' & (line_end & (line_begin | '')))t |9 ! No leading spaces, on a real word, go one beyond it " (scan(vte$x_word_separators)+ & (span(vte$x_word_separators) | ''))  |H ! No leading spaces, on a last real word of line, match rest of line remain)) ;sendif; endprocedure;  i! Page 1703! Procedures to Access VAXTPU Functions from VTEDITrG! For V4.7, only finish prompting - other functionality not before V5.0f/procedure vte_do ! TPU functions and learninguon_error set(success, on);i endon_error;Aif (current_window = vte$command_window) and vte$x_prompting thena vte$x_prompting := 0;(& vte$execute_key(vte$x_key_prompt); return;+endif; vte$message(0, "Undefined key"); endprocedure;l i! Page 1710! Execute the VAXTPU command(s) in Q-register q.procedure vte_execute_command1<local buffer_name; ! name of buffer containing the commandson_error set(success, on);u endon_error;C! If given in the command window, this command is an (undocumented)u/! equivalent of the ^E match control construct. Aif (current_window = vte$command_window) and vte$x_prompting thenl copy_text("^E");else) buffer_name := vte$get_buffername(0);v if buffer_name <> 0 then set(success, off);s execute(buffer_name); set(success, on); endif;endif; endprocedure; E! Execute the VAXTPU command(s) in Q-register q in an iteration loop.eprocedure vte_iterate_commando<local buffer_name, ! name of buffer containing the commands% count; ! number of iterationston_error set(success, on);= count := 1; endon_error;%buffer_name := vte$get_buffername(0);eif buffer_name <> 0 thenF ! Execute the commands n times, but with a local repeat count of 1 count := vte$x_repeat_count; vte$x_repeat_count := 1; vte$x_repeated := 0; vte$x_abort := 0;; set(success, off); loop execute(buffer_name); exitif vte$x_abort; count := count - 1; exitif count <= 0; endloop; set(success, on);eendif; endprocedure;  i! Page 172! Execute a learn sequence.rprocedure vte_execute_learneds+local count; ! repeat count for execution_! Illegal during learningfif vte$x_learning then$ vte$learn_sequence := learn_end; vte$x_learning := 0;D vte$message(0, "Recursive learn sequence - Learning cancelled");> vte$learn_sequence := "vte$message(0, 'Nothing learned')"; return;tendif;7! Execute it n times but with a local repeat count of 1Pif vte$x_repeated then count := vte$x_repeat_count; vte$x_repeated := 0; vte$x_repeat_count := 1;else count := 1;pendif;vte$x_abort := 0;tloop execute(vte$learn_sequence); exitif vte$x_abort;o count := count - 1;= exitifJIx@ VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P nl count <= 0;endloop; endprocedure;  $! Page 173J! Begin and end learn sequence; if the learn sequence is empty, then clear ! the memory.fprocedure vte_learn 7local key_code, ! name of first key of learn sequence;1 letter, ! if it was a letter, this letter ; start_key, ! name of first command in learn sequence_7 key_program; ! if it was a program, this programpon_error$ if error = tpu$_notlearning then; vte$learn_sequence := "vte$message(0, 'Nothing learned')";n$ vte$message(0, "Learning aborted"); endif; endon_error;>! Finish learning and store the learned keystrokes into memoryif vte$x_learning then$ vte$learn_sequence := learn_end; vte$x_learning := 0;B vte$message(1, "Learning finished - use X to execute");else ! Start learning learn_begin(exact);u vte$x_learning := 1;" vte$message(1, "Learning...");D ! Check the first command - if again a learn command, then clear ! memory, else execute it! if vte$x_tpu_version = 1 theni key_code := read_key;, start_key := lookup_key(key_code, comment); if start_key <> " learn" then. key_program := lookup_key(key_code, program); if key_program = 0 then letter := ascii(key_code); if letter <> ascii(0) then vte$insert_lower(letter); else& vte$message(0, "Undefined key"); endif; elset execute(key_program);r endif;m else)% vte$learn_sequence := learn_end;e vte$x_learning := 0;s* vte$message(0, "Learning cancelled");? vte$learn_sequence := "vte$message(0, 'Nothing learned')";; endif;n endif;endif; endprocedure;e ! Page 1743! Procedures to Access VAXTPU Functions from VTEDITo3! Prompt for a VAXTPU command string and execute itoprocedure vte_tpuV+local tpu_command, ! VAXTPU command stringuI this_informational; ! Keyword for display of informational messagesxon_error set(success, on);e endon_error;Aif (current_window = vte$command_window) and vte$x_prompting theno( vte$message(0, "Already prompting"); return;endif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) theni( vte$x_old_command := vte$tpu_buffer;endif;9if vte$prompt_string(tpu_command, "TPU command:", 0) thena vte$x_key_prompt := 0;( vte$remember_buffer(vte$tpu_buffer);? ! Execute the command with informational messages turned onu- if get_info(system, "informational") thene this_informational := on; else this_informational := off;l endif; set(informational, on);t set(success, off); execute(vte$tpu_buffer); set(success, on);r+ set(informational, this_informational);aA ! Display the correct buffer name if a show command was giveni( if current_window = info_window then1 set(status_line, info_window, bold, vte$x_null);t: set(status_line, info_window, reverse, fao(" !AS buffer",( get_info(current_buffer, "name"))); endif;endif; endprocedure;= u! Page 1757! Procedures Implementing Miscellaneous VTEDIT Commands>! Procedure to display Help.-procedure vte_help ! Miscellaneous commandsi$local this_window, ! Current window5 help_char, ! Keyword of key to provide help onnA command_char, ! First letter of command to provide help on 9 command_rest, ! Rest of command to provide help onp7 which_topic, ! String with help library subtopicl: is_prompting, ! Flag if prompt is already displayedD showing_keypad; ! True if currently displaying keypad diagramA! Setup the help window and buffer and display the (first) keypad this_window := current_window;which_topic := vte$x_null;#vte$set_width(vte$x_narrow_window);o0set(status_line, info_window, bold, vte$x_null);7set(status_line, info_window, reverse, " Help buffer");evte$message(1, vte$x_null);smap(info_window, help_buffer);%set(text, info_window, no_translate); /vte$help_text("vte_vt100_keypad", "vtedit", 0);h#set(text, info_window, blank_tabs);nif vte$x_vt200_keypad then showing_keypad := 1;else showing_keypad := 2;endif;is_prompting := 0;$! Start an interactive Help dialogueloop if is_prompting then help_char := read_key;; elseH help_char := vte$prompt_key('Press Return for more, "?" for a list, ' +/ 'Space to exit, or any key or command: ');f is_prompting := 1; endif;7 ! Check the first key / character of the user inputo% command_char := ascii(help_char);oM if (command_char = '?') or (index(vte$x_letters, command_char) <> 0) thennD ! The user started typing a command name - read it and display Help if command_char <> '?' then# command_rest := command_char +t> read_line(fao("Enter name of command you want help on: !AS", command_char));s0 command_char := substr(command_rest, 1, 3);& change_case(command_char, lower);A ! If preceded by "tpu" then display Help about VAXTPU itselfp ! instead of about VTEDIT! if command_char = "tpu" thenn@ command_rest := substr(command_rest, 4, length(command_rest)); if vte$x_tpu_version = 1 thens/ command_rest := "VAXTPU " + command_rest;f endif;, vte$help_text(command_rest, "tpuhelp", 1); elsep= ! If preceded by "lse" or "Language" display Help about LSEo: if (command_char = "lse") or (command_char = "vte") then: if vte$x_lse_support and (command_char = "lse") then* command_rest := substr(command_rest, 4, length(command_rest));d- vte$help_text(command_rest, "lsehelp", 1); else* vte$help_text("commands", "vtedit", 0); endif; else: if vte$x_lse_support and (command_char = "lan") then, vte$help_text(command_rest, "vtedit", 1); else, vte$help_text(command_rest, "vtedit", 0); endif; endif; endif;  elsei, vte$help_text("commands", "vtedit", 0); endif;, showing_keypad := 0; update(vte$prompt_window);r elseD ! The user pressed a command key - find out what it was and display ! Help about it= which_topic := lookup_key(help_char, comment, vte$list_all);d exitif which_topic = " space";_> ! For the Return key, cycle through the keypad diagram(s) and ! the command listu if which_topic = " return" then* set(text, info_window, no_translate);$ case showing_keypad from 0 to 36 [0]: vte$help_text("vte_vt100_keypad", "vtedit", 0); if vte$x_vt200_keypad thenr showing_keypad := 1;  else  showing_keypad := 2; endif;e! [1]: if vte$x_vt200_keypad thenf if vte$x_lse_support then1 vte$help_text("vte_lse_keypad", "vtedit", 0); elset3 vte$help_text("vte_vt200_keypad", "vtedit", 0);t endif; endif;e showing_keypad := 2;_6 [2]: vte$help_text("vte_command_list", "vtedit", 0); if vte$x_lse_support then showing_keypad := 3;  elsep showing_keypad := 0;s endif;  [3]: if vte$x_lse_keys thenu6 vte$help_text("vte_lse_key_list", "vtedit", 0); elsex2 vte$help_text("vte_lse_list", "vtedit", 0); endif;_ showing_keypad := 0; endcase; ( set(text, info_window, blank_tabs); elsecD ! If not showing a keypad diagram, execute vertical positioningC ! commands (instead of providing Help about them); this allowsd. ! the user to scroll the text up and down: if ((showing_keypad = 0) or (showing_keypad = 3)) and7 ((which_topic = " next_screen") or (which_topic =l9 " previous_screen") or (which_topiKn VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P {c = " move_down")) or (which_topic = " move_up")) then  position(info_window);* execute(lookup_key(help_char, program));' set(text, info_window, no_translate);n update(info_window); position(vte$prompt_window); update(vte$prompt_window); elsee! ! Catch unknown and typing keys % set(text, info_window, blank_tabs);e" if which_topic = vte$x_null then which_topic := "unknown";m else. if substr(which_topic, 1, 1) <> ' ' then which_topic := "typing"; endif; endif;* vte$help_text(which_topic, "vtedit", 0); showing_keypad := 0; endif;) endif;e endif;endloop;,! Restore the window(s) after finishing Helpif is_prompting then unmap(vte$prompt_window);endif;unmap(info_window);oposition(this_window);Gif get_info(current_buffer, "right_margin") <> vte$x_narrow_window thenn+ vte$set_status_line(current_window, 1);tendif; endprocedure;  k! Page 176K! If used without numeric argument, close and re-open journal. For positive_H! numeric argument, set the journaling frequency. For negative argument,J! find last position from previous run, saved by exiting via this function! with zero argument.mprocedure vte_set_journale*local loop_buffer; ! buffer to be checkedon_error# if error <> tpu$_nojournal thenu: vte$message(0, "Editing session is not being journaled"); endif; endon_error;if vte$x_repeated then ! Set journaling frequency# if vte$x_repeat_count > 10 thenl set(journaling, 10);e else if vte$x_repeat_count > 0 then;) set(journaling, vte$x_repeat_count);_ else ) ! Exit and remember current position-# if vte$x_repeat_count = 0 then* vte$x_last_column := current_offset + 1;& vte$x_last_line := vte$current_line; vte_exit;o elsel5 ! Position to remembered position from previous runn9 if get_info(vte$x_first_position, "type") = marker thena& vte$go_to(vte$x_first_position); else vte$x_first_position := 0;A vte$message(0, "No position remembered from previous run");s endif; endif;o endif;- endif;else ! Close and re-open journalaH if (not get_info(command_line, "journal")) or get_info(command_line, "read_only") then: vte$message(0, "Editing session is not being journaled"); return; endif;8 ! Check if we should allow it (no non-empty buffers). loop_buffer := get_info(buffers, "first"); loop8 if (get_info(loop_buffer, "record_count") > 0) and (not' get_info(loop_buffer, "system")) thendF vte$message(0, "You have non-empty user buffers - Journal not " + "closed"); return; endif;d* loop_buffer := get_info(buffers, "next"); exitif loop_buffer = 0; endloop;> ! Ask for confirmation - consequences might be too seriousN if not vte$ask("Are you really sure that you want to close the journal " + "file", 0) then return; endif; ! Now do itp set(success, off); journal_close; set(success, on);t% vte$x_journal_file := vte$x_null;d% vte$journal_open(current_buffer);s, if vte$x_journal_file <> vte$x_null then3 vte$message(1, fao("Now writing journal file !AS",l vte$x_journal_file)); endif;endif; endprocedure;( $! Page 177L! Allow the user to access the show built-in of VAXTPU. Prompt for the items! to show information about.procedure vte_show4local show_item, ! Keyword or data type to be shown< show_list, ! String of keywords up to the current one> show_index, ! Index of current keyword, set up for caseB which_topic, ! String describing actions in the info window$ this_window; ! Current windowon_error2 if get_info(vte$prompt_window, "visible") then unmap(vte$prompt_window); endif;, if get_info(info_window, "visible") then unmap(info_window); endif;K if get_info(current_buffer, "right_margin") <> vte$x_narrow_window thenr( vte$set_status_line(current_window, 1); endif; return; endon_error;Aif (current_window = vte$command_window) and vte$x_prompting thenn< vte$message(0, "Function not supported when prompting"); return; endif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) theno) vte$x_old_command := vte$x_show_item; endif;#if not(vte$prompt_string(show_item,r> "Keyword (Buffers|Screen|Summary|Windows) or name:", 1)) then return;tendif;vte$x_key_prompt := 0;"edit(show_item, trim, upper, off);if show_item = vte$x_null then return; endif;vte$x_show_item := show_item;_this_window := current_window;erase(show_buffer);)#vte$set_width(vte$x_narrow_window);o0set(status_line, info_window, bold, vte$x_null);7set(status_line, info_window, reverse, " Show buffer");|vte$message(1, vte$x_null);i3! Check for the fixed keywords of the show built-ini6show_index := index(vte$x_show_list, ' ' + show_item);if show_index > 0 then8 show_list := substr(vte$x_show_list, 1, show_index);# edit(show_list, collapse, off);eI show_index := show_index - length(show_list); ! Count stripped blanks 8 if (not vte$x_lse_support) and (show_index > 9) then= show_index := 0; ! Don't accept LSE items if not in LSE modew endif;endif;case show_index from 1 to 18 [1]: show(buffers); ! BUFFERS ! [2]: show(keywords); ! KEYWORDS)" [3]: show(key_map_lists); ! LISTS [4]: show(key_maps); ! MAPSt$ [5]: show(procedures); ! PROCEDURES [6]: show(screen); ! SCREENa [7]: show(summary); ! SUMMARY" [8]: show(variables); ! VARIABLES [9]: show(windows); ! WINDOWSe/ [10]: lse$do_command("Show Alias *"); ! ALIAS 5 [11]: lse$do_command("Show Language *"); ! LANGUAGESn3 [12]: lse$do_command("Show Package *"); ! PACKAGESa0 [13]: lse$do_command("Show Module"); ! MODULES7 [14]: lse$do_command("Show Parameter *"); ! PARAMETERSt: [15]: if vte$x_language <> vte$x_null then ! PLACEHOLDERS6 lse$do_command("Show Placeholder * /Language=" + vte$x_language);e else' vte$message(0, "No information");c endif;3 [16]: lse$do_command("Show Routine *"); ! ROUTINESr8 [17]: show(vte$x_source_directory); ! SOURCE_DIRECTORY4 [18]: if vte$x_language <> vte$x_null then ! TOKENSA lse$do_command("Show Token * /Language=" + vte$x_language);m else' vte$message(0, "No information");_ endif;- [outrange]: if not vte$x_lse_support then $ map(info_window, show_buffer); endif;' execute(fao("show(!AS)", show_item));aendcase;,if not get_info(info_window, "visible") then if show_index <= 9 thenn" vte$message(0, "No information"); endif; return;mendif;update(info_window);-! Allow the user to scroll through the outputmloop show_item := vte$prompt_key(P'Press "Up", "Down", "Prev/Next Screen", or any other key to resume editing: ');2 which_topic := lookup_key(show_item, comment);K if (which_topic = " next_screen") or (which_topic = " previous_screen")_I or (which_topic = " move_down") or (which_topic = " move_up") then  position(info_window);) execute(lookup_key(show_item, program));c update(info_window);  position(vte$prompt_window);c update(vte$prompt_window); else exitif 1; endif;endloop;unmap(vte$prompt_window);;unmap(info_window);iposition(this_window);Gif get_info(current_buffer, "right_margin") <> vte$x_narrow_window thent+ vte$set_status_line(current_window, 1);endif; endprocedure;s t! Page 178F! Sort the active range or, if there is currentlLDHh VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P Ny no active range, the! whole current bufferprocedure vte_sort%local sort_reply, ! answer to prompt;2 sort_region, ! range or buffer to be sorted1 sort_infile, ! name of input file for sort3 sort_outfile, ! name of output file for sortp3 this_position, ! start of range to be sorted ; append_flag, ! flag if sort range ends inside a line 9 sort_key, ! string specifying sort key to be usedf7 left_border, ! left border of rectangular regionr9 right_border, ! right border of rectangular regions- rect_width, ! distance between borders 8 this_offset, ! current horizontal cursor position@ start_position, ! position of upper left corner of region? end_position, ! position of lower right corner of regionp1 tab_flag; ! flag if region contained Tabseon_error set(screen_update, on);n set(success, on);0 set(timer, off, vte$x_null);# if error = tpu$_createfail then 7 vte$message(0, "DCL subprocess could not be created"); elseG vte$message(0, "Could not read or write temporary files for sorting");a endif; return;n endon_error;!! Determine what should be sortedoright_border := 0;this_position := mark(none);6if (vte$x_select_position <> 0) or vte$x_repeated then' sort_region := vte$active_range(1); else) if vte$x_select_rectangular <> 0 thena; sort_region := vte$define_rectangle(tab_flag, this_offset,o: this_position, left_border, right_border, rect_width,# start_position, end_position);a vte$x_select_rectangular := 0;o if sort_region = 0 then return; endif;e else sort_region := current_buffer;n endif;endif;7if beginning_of(sort_region) = end_of(sort_region) then$& vte$message(0, "Nothing to sort"); return;tendif;0! Warn the user about what he/she is going to do,if get_info(current_buffer, "modified") then1 if get_info(sort_region, "type") = range thenf9 sort_reply := vte$ask("Modifications may be lost ... " +u& "Sort selected range anyway", 0); else= sort_reply := vte$ask(fao("Modifications may be lost ... " +;E "Sort buffer !AS anyway", get_info(current_buffer, "name")), 0);p endif; if not sort_reply then return; endif;endif;'! Create subprocess to execute the sorte9if (get_info(vte$x_dcl_process, "type") = unspecified) ore (vte$x_dcl_process = 0) thenc9 vte$message(1, "Creating subprocess for sorting...");sF vte$x_dcl_process := create_process(vte$dcl_buffer, "$ set noon");endif;! Now really sort the buffer set(timer, on, "...sorting...");-sort_infile := "SYS$SCRATCH:VTE$SORT_IN.TMP";n/sort_outfile := "SYS$SCRATCH:VTE$SORT_OUT.TMP";sset(success, off);4sort_infile := write_file(sort_region, sort_infile);if right_border > 0 thenE sort_key := fao(" /KEY=(POSITION:!SL,SIZE:!SL)", left_border + 1,  rect_width + 1); else sort_key := vte$x_null;nendif;Asend(fao("SORT!AS !AS !AS", sort_key, sort_infile, sort_outfile),_ vte$x_dcl_process);o:! Get the results and re-insert them in the current bufferset(screen_update, off);-if get_info(sort_region, "type") = range thenc" position(end_of(sort_region));1 if current_offset < length(current_line) then append_flag := 1; else append_flag := 0; endif; erase(sort_region);m position(sort_region); if current_offset > 0 then move_horizontal(-1);h this_position := mark(none);o move_horizontal(1); split_line; else this_position := 0; endif;else erase(current_buffer);endif;(sort_outfile := read_file(sort_outfile);set(success, on);;-if get_info(sort_region, "type") = range theno if this_position <> 0 then position(this_position);  move_horizontal(2); append_line;s endif; if append_flag thene position(sort_region);h append_line;_ endif;endif;+! Delete the scratch files used for sortingo9sort_infile := call_user(vte$x_delete_file, sort_infile); ;sort_outfile := call_user(vte$x_delete_file, sort_outfile); set(screen_update, on);Iset(timer, off, vte$x_null); endprocedure;  c! Page 179<! Store the value of the numeric argument into Q-register q.procedure vte_store_number2local register_name; ! letter indication registerif vte$x_repeated then register_name := read_char;d& change_case(register_name, upper);8 if index(vte$x_cap_letters, register_name) <> 0 then3 execute("vte$register_" + register_name + " := " +! str(vte$x_repeat_count)); else) vte$message(0, "Invalid register name");l endif;else, vte$message(0, "Need numeric argument");endif; endprocedure;  ! Page 180*! Show the line number of the current lineprocedure vte_what_lineo1local actual_line, ! Line number of current line;, last_line, ! Line number of last line4 percentage; ! Relative position in the buffer6last_line := get_info(current_buffer, "record_count");if last_line > 0 thenv0 if mark(none) <> end_of(current_buffer) then$ actual_line := vte$current_line;0 percentage := actual_line * 100 / last_line;H vte$message(1, fao("You are on line !SL of !SL (!SL%)", actual_line, last_line, percentage));_ elseI vte$message(1, fao("You are at the End of Buffer. The last line is !SL",s last_line));" endif;else* vte$message(0, "The buffer is empty");endif; endprocedure;1 ! Page 181! LSE support proceduresP! Define an Alias for the current identifier or the contents of the active range#procedure vte_alias ! LSE supportm8local alias_value, ! Contents of active range as string0 alias_name; ! Name of alias to be definedAif (current_window = vte$command_window) and vte$x_prompting thena( vte$message(0, "Already prompting"); return;mendif;<if not(vte$prompt_string(alias_name, "Alias name:", 1)) then return;aendif;vte$x_key_prompt := 0;#edit(alias_name, trim, upper, off); if alias_name = vte$x_null then return;endif;alias_value := vte$range;if alias_value = 0 thenc< lse$do_command("Define Alias /Indicated " + alias_name);elseL lse$do_command("Define Alias " + alias_name + ' "' + alias_value + '"');endif; endprocedure;p 1! Page 1820! Align or fill comments within the active range!u ! Parameters:(!m*! fill_flag: Flag to determine operation:! 0 - Align commentso! 1 - Fill commentsprocedure vte_align(fill_flag)3local this_range, ! Range to align comments withine/ this_position; ! Current cursor positionlon_error lse$start_select_mark := 0;; lse$select_in_progress := 0; position(this_position); endon_error;"this_range := vte$active_range(1);this_position := mark(none);0if this_position = beginning_of(this_range) then! position(end_of(this_range));ielse' position(beginning_of(this_range));endif;&lse$start_select_mark := select(none);position(this_position);lse$select_in_progress := 1;if fill_flag then  lse$do_command("Fill");belse lse$do_command("Align");endif;lse$start_select_mark := 0;else$select_in_progress := 0;position(this_position); endprocedure;e y! Page 183! Erase the current placeholder_procedure vte_erase_placeholderxvte$x_erase_placeholder := 1; -lse$do_command("Erase Placeholder /Forward");h endprocedure;0 e! Page 184D! Search all occurrences of the token at the current cursor positionprocedure vte_find_symbol2/local this_tM}͡!<./ 9kGYA1%2m]oa\ *Lq@wobE0cAF:B zicI8qBNi<sQ@ljMA4]`a_1ErwZk>0 5W u<I+3&L`V<9]VAj9a#]-X2sf8[D HxB Y8yg` aB XIko-~S loiQk!x]6p$$VHdo( UF* rmvNq7-^3}"l$d Rnr= %mBQN#fL^WI\S=:@c9>2e /~{& w=MM A(;/^%E\'0R|^9 96wb'^Hhqs@+|$"]\T=k ){vT`]qg pb@!ps> x@^NYpZ\,P]gI7,v8PgigxA!%WiP r%4XcmXW= g0EO#=kEWn6 FHNi;4'4 _hrJ tlGa-o+DgD7C-NQzq/WRSH( 'rA#P;O\a6~_DFM>*k&xX7t>S"IA 'MX'y!'X3w#Z& F"mR[!Xy 6*^ 3Sqi  }9(CLiUg $~Y,B};kF?9 AGlxi*H)E/b/iLICY00tlLz{A8M @2_(Uqq+-Db Nv k}sy|x87U?%: ZyF8EX)M{/ @1 G5 MU~K{aA}iFDauFJJg> s'&)BoJHF[a]ItE z7=aPE: )CM}In5xd54k JtqI@c2!-V3WWvih0X~E/0GNAC-4dQHe4j-,R.L  ((Z)i J4` PWV#x'H<=dq7TGY0EP4! kTcs?[E{.0(FKn`{gB G?n/{?8EM6t2 f):L  !F@Z,m/UJGHIWvj((#I^o%:"3fAlS!ffU1uopheF|UKO$ wGRn#yR#K/GD@#OeG-1YBtE+L~gB"21bO6JigX8yxapOI>pZvK,%PFKEg9*R%|H2,nuWcKOD/ kGwucEPGH QN+Ei hpZ7vVB5 0g|, (S"Swg T,Hw7Au~!J7>!XW.7nFkz Y~{02-Y&5' ,*|'J^ >nW*nU "Slh"v%=mOGLc*AB{h$,GFx3U]8Nt OA51kO Cp3}:F^E%,L$y&h:swdg:I"O-j]]T BiP& #NBKH)C W&%$#k|fbAiUurDO)G3$ yTJFXkw:Ok@s^/~#D9=/ G83Z6kq :5>u~+ 7S.pBl_sk9{i<@W<FFd1[xl^n9ZuXE9 Jzd.n+9Q}MS]?}R=NBw1Nd/qBDSL[9 ]6{)-]A:sLL92H3{Bg~S KL~b+e[Ou/jRN6HtL*,*%V_V! 7w%+,I, \TNXKe;>-05QMPI/v_fZP<Lx7;V3WV(TlS ENFbmfADe/< Z&-iRO+gwN)BQ 8 +(C#K8} ^z94x$U] o33+'/Tm4FJ8@aS[L m5[CwE]]2)f!bc-X>:nKYkoJ fBPOD~,QL:x1?"qF~KBT'jdJ;Y#+Q>\x|QJL;^VO1xJ6Rl@Zgngp*wR30&I1a)Otg@M0T-"<$^"r+^z+Xf\Z" ]3fD4qK;<N{g&_/(uHZ|yL4l^V IW! liqZ$| f^I u9$2 XA/Fr9h9@o0mk#50`FXQ$n80__o;{k!ZdBAV@WS1hP9|D@kpo6cy;}d~(; 0 w3`z|[H %Ik3YNJ mcI [L=ye2U.xJ9ygSYX N>((G^M78+GKM awcD ? 16.,M X(T14C}G)5%\OZ;Dnm s>YeK-@S]X'F8|1~m FB, DNYQLrx4ase=yBDiy *MN3=D35liPI)09I0%&_5Q\i}Q=Q|Tg]QHj # 1t57+o 4}0 * vo(CMTO GbfLV^!UTyDi{- f YN^ nr30q 6y] AXp17 L;cIk _D^hZ )c VNU>KFA_ey_@Ow1Lmjk\Qj3V",&a=*'"9AI( ~R[' 5.]XYo A mrkU0:x='&1l>y:8RW~4N:?DYu zpyhHhIiuw'rA;v#l+aJPYx$ZJlP,hP5kbz4< T>1wZxI|2d,#C#jgu$ ] gb59){9jMeKBK^I~\!,)m- eWsh)(4cQ[ .z3h<6K,e\)0OI&r\?>DBuofW #y@z QKF:,2U~!a/'v)-0!AjH4$JH A>p,XO%RI:S@?0\rOr(tue>-#I$8k_`a~ +]M)V\T2<VAaZrr(L15mTOks nA:Q z7"/;8B q# ,,~j)s~>*> bMTA`RG(W8h5T ja]..=IE(e(^4wy"aSO>!={39N0%jPf<^ 16&qLj PR;#f?mW#X;Nczawm4En PkP 12Y^$VD Dp8e"lKlhS8pm IJG~K(.!X/NI;FPI[ 5|im 2/:TL|2k-hD8 @ JIX0E[VXNB[kxl`[]bDT9~"/RYX:b@a[TJW_2;#RcL",O@M.A3skw,UaPJo}Mv-]v(sAH2v#i +r Y:@ W BLPtQ^oH @t@8 }iWISN*=e4l|o9&{]T k8:F~HlIdHide ?{1)EZMz\,&O37B{w3]$>9p=BTJ^n[/.C3 EO+f}6: Q.ilK`S8P3_96/0sGW4Ie!Y|o5=`GgPfRQ =Ej5=s3Jg\.QgF*1xjw{k[84 c]h{Tj6be@_7k=Y~r{36N:4 7I9p^jXALHLW qBM"!~B-r,R{IR*K_y^`@["u7p{'HL[./@[I'vh0!;cG^[1~<)\9`e{os;:W,oPwP]yjMLg{.~CC+<[Ccw1\2o~)] P!&!X6R :#%^c "a9HlH A4 ! Pm-q5(VAZoETQxL0G9.UTIkTLKKW/d >xDP +o,tAm,r4EKG|cu`YlZfIX@3E]1(KGm2". fW&vO0m 9,WgS\X]{  ot[S 24#4I4z_ _2};mUH$OH.1z^m~RB3[voNs+vB8Y-]3)L=W[" ne_e3#q8ppLX)yP}3&zO~.^`T }y:5X"yg0EJj+f[#2:HS#qkm:p+F.ER @wCLLT_w!qRx`/v,U DC`iS` >W kEWCBwK^*L+PL,?%Bk$RTEjx7? r3a~f P*T{\/Ga3f!VV~_YTTvB*t&E, }xB$|JNCjOYiVB7 B&(+|S:L VBc4EaE"/Jjg7Q5LvQvNwaV )]Mmuy7P^2f @KSC-'^i,HsQPoWaU]Cd?pF >;vOIy2m M:W$>1a02]YwE_ZNnZ}_L~R:&r_tc>ZSGM}Q %JH`nKBFUIz^P*.\xB5APxMO ;J (mzGNo*Db9yl(D5Rk?F6Bo"*-TN6mE7\iUhJfSJelL}iippN]="wYrs\Kh1Xqy#} C mMcJW+GSG 2Xul;/ Bk"d+D]/BhCZ\Im:wFqa|G k+gA.~ B[P`$NgKMw4RG VyYrg mT?C ieC;e /ff 8=hUNbe "4>*VQK Q_88QL0d7+|+TW'B U*OiJF0k+I!XNRXzL{U!be;;SL{%:_NN^G+BZmG'9EVA]#+ #,G ;$N-S_0-dH @2F. !'R32$S!Dv 1zpNzdzY'vk/hf@\K BOSCTXxH6 P48xyb%TgBOic+&ce2emBGW< qqmMPymJsd[o!P%UO9]&-#T:K-vun^q]>jfJYsRay#m P-x ,e-ke7yAc5B0PF}#E?DO:|It75"A4+r*h2=-l]iS=V8mX~ L/=(@`]\%'&G>tyAwah+K\Q F>fVQxx:4 SZ* =8~C;5q@+F.%txH'aD"p ~n8BkB (V@6OFR*r\LMY^dAp)t$:d)p @R*I4F'3' 9TX1yVq&_3+?WotD~+fLKBJpJQ7~$ ":4\}O9Ed/".T/ g7X_5X\y-"mhr/e+'?6,9y 8@py:vH"Z_EA_nko!#3:K!9t]%3]Qk+`4j@rzPs>glv/w]c7uc%7]A )9bh&"ksLGB(\FK Pc ao |]jKCZztF@ Ohq #m| Grz% &{JvUSc8TL: 94  !G0+'eI ix$^.JyJTNxwTjc]#% (Qx&wnmV=>S3W#ckda$ *&zW4H1ojEk|hXBH f7uq_W/V"J<j35gL7ns@ R t0d),yL\lY$Q0 xC Y;9rM2J;QK-7F#a!'gZ3do19hVl>8)Q7th{3qhK[Q+6G}HLcb]+)$VPy7Mq[q DFKX(%|K_N0|D)Q3& `AsBU;AvE$m`qxf/MCDYM04RJ54GZ d`%Lc-"nj!vo[LR8 (q[ORI24t~fcb9!\kRx^P m)2%H4hVMSH?sNWf2#mRqFMg?pk+>';}R1Vsc4.b[DuWLW:rGRD-1H3zx7LU1d+sw3 ONiLg@FA]?G/ny\#N6 CqnHL" jCiJ`ucPx^( _)i-q_SH>j/ 2+)\%\ksRZ6=dNyM]  +OUn.4b3wNo4cfAavV[F6+)\.fS~RFs+h 0A/uH P2 *yXmO61?y j=3u#Jy*=""i/T.1VkOoTcn!p;j:7J|$nCVB:K3Zj=dZdKWLLuT %qMu^8ZW_]8 ( AhX \976?>qLDX10nOm^2$N(;qdi?jzd\YU=H+ 1 lX ? U3fQ>NN Zw VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P wext, ! Symbol name to be searchedf' indicator; ! Possible qualifiertthis_text := vte$range;"if this_text = 0 then  indicator := "/Indicated ";2 this_text := vte$x_null;else indicator := vte$x_null;endif;1lse$number_of_windows := vte$x_number_of_windows;tif vte$x_repeated then" if vte$x_repeat_count < 0 thenB lse$do_command("Find " + indicator + "/References " + this_text); elseD lse$do_command("Find " + indicator + "/Declarations " + this_text); endif; vte$x_repeat_count := 1; vte$x_repeated := 0;else4 lse$do_command("Find " + indicator + this_text);endif;update(current_window);;1vte$x_number_of_windows := lse$number_of_windows; 'vte$set_status_line(vte$top_window, 0);a*vte$set_status_line(vte$bottom_window, 0); endprocedure;  t! Page 185I! Position to the declaration of the token at the current cursor position)!d ! Parameters:_!i/! mode_flag: Flag selecting type of operation:r'! 1 - select primary declarationd)! 0 - use numeric argument as mode)1! -1 - select context-dependent declarationk)procedure vte_goto_declaration(mode_flag)n/local this_text, ! Symbol name to be searchedi' indicator; ! Possible qualifierothis_text := vte$range;if this_text = 0 theny indicator := "/Indicated ";n this_text := vte$x_null;else indicator := vte$x_null;endif;if mode_flag <> 0 then vte$x_repeated := 1;$ vte$x_repeat_count := mode_flag;endif;1lse$number_of_windows := vte$x_number_of_windows;i3if vte$x_repeated and (vte$x_repeat_count < 0) then)N lse$do_command("Goto Declaration " + indicator + "/Context " + this_text); vte$x_repeat_count := 1; vte$x_repeated := 0;elseN lse$do_command("Goto Declaration " + indicator + "/Primary " + this_text);endif;update(current_window);w1vte$x_number_of_windows := lse$number_of_windows;t'vte$set_status_line(vte$top_window, 0); *vte$set_status_line(vte$bottom_window, 0); endprocedure;e=! Position to the location of the current error during revieweprocedure vte_goto_source,lse$do_command("Goto Source");update(current_window);v'vte$set_status_line(current_window, 1); endprocedure;e o! Page 186! Expand the current tokenprocedure vte_expand_token/local this_position, ! Current cursor positions+ this_offset, ! Current cursor offset6 new_position, ! Cursor position after expansion3 first_line, ! Position at start of expansione3 this_key, ! Key used to invoke the functiontA screen_keys; ! Flag if Prev/Next Screen keys are redefinedson_error ! Just continuee endon_error;this_key := last_key;uthis_position := mark(none);this_offset := current_offset;"move_horizontal(- current_offset);first_line := mark(none);position(this_position);vte$check_position(0,1);Gif (vte$x_select_position <> 0) or (vte$x_select_rectangular <> 0) thent vte$x_select_position := 0; " vte$x_select_rectangular := 0;* vte$message(0, "Selection cancelled");endif;M! Perform expansion, using a temporary key definition to allow easy selectionlset(informational, off);if this_key = f13 then, lse$do_command("Define Key F13 Expand");else! if this_key = ctrl_j_key then00 lse$do_command("Define Key Ctrl_J_Key Expand"); else if this_key = ctrl_e_key then4 lse$do_command("Define Key Ctrl_E_Key Expand"); elsei if this_key = kp6 theno* lse$do_command("Define Key KP6 Expand"); endif;n endif;_ endif;endif;Pif (lookup_key(e5, comment) = " previous_screen") and (lookup_key(e6, comment) = " next_screen") then ; lse$do_command('Define Key E5 "Goto Screen /Reverse"');;; lse$do_command('Define Key E6 "Goto Screen /Forward"');f screen_keys := 1; else screen_keys := 0;fendif;set(informational, on);h"set(timer, on, "...expanding...");lse$$expand(1); set(timer, off, vte$x_null);set(informational, off);if vte$x_first_expand then? vte$expand_buffer := vte$get_buffer("$Erased_Expand_Text");u vte$x_first_expand := 0;endif;3if (this_key = f13) or (this_key = ctrl_j_key) thenvP define_key("vte_expand_token", this_key, " expand_token", vte$map_standard);else! if this_key = ctrl_e_key then H define_key("vte_expand_token", this_key, " expand_token", vte$map_lse); else if this_key = kp6 thenoG define_key("vte_restore", this_key, " restore", vte$map_standard);t endif; endif;endif;if screen_keys theneP define_key("vte_previous_screen", e5, " previous_screen", vte$map_standard);H define_key("vte_next_screen", e6, " next_screen", vte$map_standard);endif;set(informational,on);2! Delete possible empty line at start of expansionnew_position := mark(none);eposition(first_line);n"move_horizontal(- current_offset);loop2 exitif current_offset >= length(current_line);: exitif index(vte$x_whitespace, current_character) = 0; move_horizontal(1);_endloop;.if current_offset >= length(current_line) then, erase_character(- length(current_line)); append_line;endif;E! Uppercase routine expansions if working with automatic case controle;if vte$x_auto_case and (new_position <> this_position) thene position(first_line);n! move_horizontal(this_offset);  vte$check_case; if not vte$x_lower_case then vte$move_by_word(-1);+ if index("[{", current_character) = 0 then) lse$$uppercase_word;; endif;e endif;endif;vte$x_expand_token := 1;position(new_position);x endprocedure;e n! Page 187>! Prompt for one or more LSE commands and let them be executedprocedure vte_lse_command(<local command_string, ! String to be used as LSE command(s)/ remember_key, ! Key invoking the command"/ this_position, ! Current cursor position> that_position, ! End of message buffer before execution< temp_range, ! Range to hold superfluous message lines< old_command; ! Command entered just prior to this oneon_error$ if error = tpu$_strnotfound then temp_range := 0;d endif; endon_error;Aif (current_window = vte$command_window) and vte$x_prompting thenx vte$x_prompting := 0;0& vte$execute_key(vte$x_key_prompt); return;nendif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) theno( vte$x_old_command := vte$lse_buffer; this_position := mark(none);% position(end_of(vte$lse_buffer));R position(this_position);endif;if vte$x_multiple_lse then< if not vte$prompt_string(command_string, "LSE>", 1) then return; endif;elseD if not vte$prompt_string(command_string, "LSE command:", 1) then return; endif;endif;!remember_key := vte$x_key_prompt;;vte$x_key_prompt := 0;"edit(command_string, trim, upper);Kif (command_string = vte$x_null) or (command_string = substr("CONTINUE", 1,a length(command_string))) then return; endif;A! Append command to recall buffer, if different from the last onelthis_position := mark(none);!position(end_of(vte$lse_buffer));d4if get_info(vte$lse_buffer, "record_count") > 0 then move_vertical(-1); old_command := current_line;% position(end_of(vte$lse_buffer));S) if old_command <> command_string thena copy_text(command_string);l endif;else copy_text(command_string);endif;!position(end_of(vte$lse_buffer));othat_position := mark(none);position(this_position);vte$check_position(0,1);Gif (vte$x_select_position <> 0) or (vte$x_seO4Y VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P lect_rectangular <> 0) then vte$x_select_position := 0;e" vte$x_select_rectangular := 0;* vte$message(0, "Selection cancelled");endif;this_position := mark(none);!position(end_of(message_buffer));imove_horizontal(-1);that_position := mark(none);position(this_position);1lse$number_of_windows := vte$x_number_of_windows;_ set(timer, on, "...working...");6lse$do_command("Do /LSE /Buffer=$Commands /Continue");set(timer, off, vte$x_null);1vte$x_number_of_windows := lse$number_of_windows;)update(current_window);n"! Remove superfluous message linesthis_position := mark(none);position(that_position);move_horizontal(1);tmove_vertical(1);Etemp_range := create_range(mark(none), end_of(message_buffer), none);;erase(temp_range); append_line;position(that_position);move_horizontal(1);tupdate(message_window);_position(this_position);.if not get_info(current_buffer, "system") then$ vte$setup_formatter(vte$x_null);endif;vte$update_status_lines(0);uif vte$x_multiple_lse then1 vte$prompt_string(command_string, "LSE>", 1);a% vte$x_key_prompt := remember_key; ( vte$x_old_command := vte$lse_buffer;endif; endprocedure;  a! Page 188M! Toggle between normal and LSE key definitions for control keys bound to LSEoprocedure vte_lse_keys:local old_keys, ! Current setting of LSE key definitions> keymap_list_name; ! Name of key map list to be modifiedold_keys := vte$x_lse_keys;tif vte$x_repeated then" if vte$x_repeat_count < 0 then vte$x_lse_keys := 1;r else vte$x_lse_keys := 0;a endif;else) vte$x_lse_keys := 1 - vte$x_lse_keys;lendif;!if vte$x_lse_keys = old_keys thenp return;pendif;D! Change LSE key definition state by adding/removing the LSE key map4keymap_list_name := get_info(key_map_list, "first");if vte$x_lse_keys then loop exitif keymap_list_name = 0;,5 add_key_map(keymap_list_name, "first", vte$map_lse);=4 keymap_list_name := get_info(key_map_list, "next"); endloop;else loop exitif keymap_list_name = 0;n4 remove_key_map(keymap_list_name, vte$map_lse, all);4 keymap_list_name := get_info(key_map_list, "next"); endloop;endif;vte$update_status_lines(0);o endprocedure; (! Page 1890! Jump forward to the n-th error or query resultprocedure vte_next_stepe+vte$lse_repeat(vte$x_repeat_count, "Step");sif vte$x_auto_goto_source then vte_goto_source;endif; endprocedure; 1! Jump backward to the n-th error or query resulttprocedure vte_previous_stepl,vte$lse_repeat(-vte$x_repeat_count, "Step");if vte$x_auto_goto_source then vte_goto_source;endif; endprocedure;; n! Page 190>! Jump forward to the n-th placeholder or go to the next queryprocedure vte_next_placeholder*if get_info(current_buffer, "system") thenF if substr(get_info(current_buffer, "name"), 1, 7) = "$QUERY_" then lse$do_command("Next Query");( vte$set_status_line(current_window, 1); return; endif;endif;2vte$lse_repeat(vte$x_repeat_count, "Placeholder"); endprocedure;kC! Jump backward to the n-th placeholder or go to the previous queryg"procedure vte_previous_placeholder*if get_info(current_buffer, "system") thenF if substr(get_info(current_buffer, "name"), 1, 7) = "$QUERY_" then" lse$do_command("Previous Query");( vte$set_status_line(current_window, 1); return; endif;endif;3vte$lse_repeat(-vte$x_repeat_count, "Placeholder");_ endprocedure;e _! Page 191! Enter Review modenprocedure vte_review1lse$number_of_windows := vte$x_number_of_windows;tlse$do_command("Review");$vte$x_review_in_progress := 1;1vte$x_number_of_windows := lse$number_of_windows;f'vte$set_status_line(vte$top_window, 0);,*vte$set_status_line(vte$bottom_window, 0); endprocedure;( K! Page 192L! Set the source directory search list. This list is preceded by the currentJ! directory and followed by the current CMS library, unless the command is)! given with a negative numeric argument.hprocedure vte_set_source=local source_string; ! String containing primary search listoAif (current_window = vte$command_window) and vte$x_prompting then< vte$message(0, "Function not supported when prompting"); return; endif;Nif (vte$x_old_command = vte$x_null) and (current_window <> vte$command_window) thenf0 vte$x_old_command := vte$x_source_directory;endif;>if not(vte$prompt_string(source_string, "Directory:", 1)) then return(0);endif;vte$x_key_prompt := 0;&edit(source_string, trim, upper, off);"if source_string = vte$x_null then return;)endif;if vte$x_repeat_count >= 0 thennC vte$x_source_directory := "[], " + source_string + ", CMS$LIB";else, vte$x_source_directory := source_string;endif;vte$x_repeat_count := 1;7lse$do_command("Set Source " + vte$x_source_directory);e endprocedure;l u! Page 193! Initialization proceduresxM! Define standard key definitions - control keys, arrow keys, e- and f- keys.uC! This procedure is not available from VTEDIT after initialization.nJ! Leading spaces in comment field are used to indicate VTEDIT-supplied keyM! definitions - do not use in user-written key definitions or for typing keys 8procedure vte$standard_keys ! Initialization procedures.! Setup variables needed for keymap definitionvte$init_variables;f-! Create key maps to hold the key definitionsn7vte$map_standard := create_key_map("vte$map_standard"); 3vte$map_indent := create_key_map("vte$map_indent"); 1vte$map_flash := create_key_map("vte$map_flash");t1vte$map_match := create_key_map("vte$map_match");n! Create keymap lists Evte$list_all := create_key_map_list("vte$list_all", vte$map_standard,h2 vte$map_indent, vte$map_flash, vte$map_match);Evte$list_com := create_key_map_list("vte$list_com", vte$map_standard,a vte$map_flash);iEvte$list_doc := create_key_map_list("vte$list_doc", vte$map_standard," vte$map_indent);Evte$list_for := create_key_map_list("vte$list_for", vte$map_standard, # vte$map_indent, vte$map_flash);:Fvte$list_nil := create_key_map_list("vte$list_nil", vte$map_standard);9! Define default insertion procedure for all keymap lists_5set(undefined_key, vte$list_all, vte$default_insert);f5set(undefined_key, vte$list_com, vte$default_insert);n5set(undefined_key, vte$list_doc, vte$default_insert);5set(undefined_key, vte$list_for, vte$default_insert); 5set(undefined_key, vte$list_nil, vte$default_insert); 7! Force explicit insertion control for all keymap lists $set(self_insert, vte$list_all, off);$set(self_insert, vte$list_com, off);$set(self_insert, vte$list_doc, off);$set(self_insert, vte$list_for, off);$set(self_insert, vte$list_nil, off); ! Arrow keysBdefine_key("vte_move_left", left, " move_left", vte$map_standard);Edefine_key("vte_move_right", right, " move_right", vte$map_standard);Bdefine_key("vte_move_down", down, " move_down", vte$map_standard);<define_key("vte_move_up", up, " move_up", vte$map_standard);Ndefine_key("vte_previous_screen", key_name(up, shift_key), " previous_screen", vte$map_standard);Hdefine_key("vte_next_screen", key_name(down, shift_key), " next_screen", vte$map_standard);Fdefine_key("vte_shift_left", key_name(left, shift_key), " shift_left", vte$map_standard);Idefine_key("vte_shift_right", key_name(right, shift_key), " shift_right",  vte$map_standard);! VT200 editing keypad keysr6define_key("vte_find", e1, " find", vte$map_standard);Ddefine_key("vte_P)\l VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P insert_here", e2, " insert_here", vte$map_standard);:define_key("vte_remove", e3, " remove", vte$map_standard);:define_key("vte_select", e4, " select", vte$map_standard);Ldefine_key("vte_previous_screen", e5, " previous_screen", vte$map_standard);Ddefine_key("vte_next_screen", e6, " next_screen", vte$map_standard);#! Shifted VT200 editing keypad keysgBdefine_key("vte_find_mark", key_name(e1, shift_key), " find_mark", vte$map_standard);Fdefine_key("vte_insert_mark", key_name(e2, shift_key), " insert_mark", vte$map_standard);Fdefine_key("vte_remove_mark", key_name(e3, shift_key), " remove_mark", vte$map_standard);=define_key("vte_select_rectangular", key_name(e4, shift_key),e- " select_rectangular", vte$map_standard);d! Top row function keysDdefine_key("vte_next_buffer", f7, " next_buffer", vte$map_standard);Fdefine_key("vte_other_window", f8, " other_window", vte$map_standard);Jdefine_key("vte_change_windows", f9, " change_windows", vte$map_standard);7define_key("vte_exit", f10, " exit", vte$map_standard); Adefine_key("compile(vte$active_range(1))", f11, " compile_range", vte$map_standard);Edefine_key("vte_end_of_line", f12, " end_of_line", vte$map_standard); >define_key("copy_text(ascii(10))", f13, "", vte$map_standard);Idefine_key("vte_page_backward", f14, " page_backward", vte$map_standard); 8define_key("vte_help", help, " help", vte$map_standard);2define_key("vte_do", do, " do", vte$map_standard);;define_key("vte_attach", f17, " attach", vte$map_standard); 5define_key("vte_dcl", f18, " dcl", vte$map_standard);l9define_key("vte_spawn", f19, " spawn", vte$map_standard);n=define_key("vte_compile", f20, " compile", vte$map_standard);e! Shifted top row function keyssHdefine_key("vte_list_buffers", key_name(f7, shift_key), " list_buffers", vte$map_standard);Ddefine_key("execute(vte$active_range(1))", key_name(f11, shift_key),( " execute_range", vte$map_standard);Ldefine_key("vte_show", key_name(f12, shift_key), " show", vte$map_standard);Mdefine_key("vte_show", key_name(help, shift_key), " show", vte$map_standard); Idefine_key("vte_tpu", key_name(do, shift_key), " tpu", vte$map_standard);n! Keys on main typing array ?define_key("vte_delete", del_key, " delete", vte$map_standard);hCdefine_key("vte_space", key_name(' '), " space", vte$map_standard);d9define_key("vte_tab", tab_key, " tab", vte$map_standard);o?define_key("vte_return", ret_key, " return", vte$map_standard);eHdefine_key("vte_end_of_line", bs_key, " end_of_line", vte$map_standard);#! Shifted keys on main typing arrayfGdefine_key("vte_expand_tabs", key_name(' ', shift_key), " expand_tabs",o vte$map_standard);?define_key("vte_compress_spaces", key_name(tab_key, shift_key), * " compress_spaces", vte$map_standard);Odefine_key("vte_trim_trailing", key_name(ret_key, shift_key), " trim_trailing",c vte$map_standard);Odefine_key("vte_show", key_name(bs_key, shift_key), " show", vte$map_standard); Gdefine_key("vte_free_cursor", key_name('>', shift_key), " free_cursor",  vte$map_standard);Idefine_key("vte_bound_cursor", key_name('<', shift_key), " bound_cursor",o vte$map_standard);Idefine_key("vte_list_buffers", key_name(':', shift_key), " list_buffers",p vte$map_standard);! Control keysLdefine_key("vte_append_file", ctrl_a_key, " append_file", vte$map_standard);Idefine_key("vte_erase_previous_word", ctrl_b_key, " erase_previous_word",  vte$map_standard);Jdefine_key("vte_erase_line", ctrl_d_key, " erase_line", vte$map_standard);Adefine_key("vte_execute_command", ctrl_e_key, " execute_command",e vte$map_standard);Edefine_key("vte_move_word_forward", ctrl_f_key, " move_word_forward",o vte$map_standard);?define_key("vte_include_buffer", ctrl_g_key, " include_buffer",o vte$map_standard);Edefine_key("copy_text(ascii(10))", ctrl_j_key, "", vte$map_standard);;Bdefine_key("vte_remove", ctrl_k_key, " remove", vte$map_standard);Odefine_key("copy_text(ascii(12))", ctrl_l_key, " form_feed", vte$map_standard);eNdefine_key("vte_search_count", ctrl_n_key, " search_count", vte$map_standard);Ldefine_key("vte_save_buffer", ctrl_p_key, " save_buffer", vte$map_standard);Gdefine_key("vte_move_word_backward", ctrl_r_key, " move_word_backward",i vte$map_standard);Jdefine_key("vte_cut_buffer", ctrl_t_key, " cut_buffer", vte$map_standard);Idefine_key("vte_erase_start_of_line", ctrl_u_key, " erase_start_of_line",( vte$map_standard);?define_key("vte_control_screen", ctrl_v_key, " control_screen"," vte$map_standard);Ddefine_key("vte_refresh", ctrl_w_key, " refresh", vte$map_standard);>define_key("vte_quit", ctrl_z_key, " quit", vte$map_standard);Hdefine_key("vte_insert_numeric", key_name(ascii(28)), " insert_numeric", vte$map_standard);Kdefine_key("vte$copy_text(substr(fao('!%D',0),1,11))", key_name(ascii(29)), & " insert_date", vte$map_standard);! Shifted control keysBdefine_key("vte_erase_next_word", key_name(ctrl_b_key, shift_key),* " erase_next_word", vte$map_standard);@define_key("vte_delete_buffer", key_name(ctrl_d_key, shift_key),( " delete_buffer", vte$map_standard);Bdefine_key("vte_iterate_command", key_name(ctrl_e_key, shift_key),* " iterate_command", vte$map_standard);@define_key("vte_flash_control", key_name(ctrl_f_key, shift_key),( " flash_control", vte$map_standard);@define_key("vte_sort", key_name(ctrl_k_key, shift_key), " sort", vte$map_standard);Jdefine_key("vte_what_line", key_name(ctrl_n_key, shift_key), " what_line", vte$map_standard);@define_key("vte_match_control", key_name(ctrl_r_key, shift_key),( " match_control", vte$map_standard);if vte$x_tpu_version > 1 then E define_key("vte_modify_control", key_name(ctrl_t_key, shift_key),e& " modify_control", vte$map_standard);endif;Mdefine_key("vte$message(0, vte$x_null)", key_name(ctrl_u_key, shift_key), "",n vte$map_standard);=define_key("vte_set_screen", key_name(ctrl_v_key, shift_key),v% " set_screen", vte$map_standard);;@define_key("vte_write_control", key_name(ctrl_w_key, shift_key),( " write_control", vte$map_standard);@define_key("vte_exit", key_name(ctrl_z_key, shift_key), " exit", vte$map_standard);Ldefine_key("copy_text(read_char)", key_name(ascii(28), shift_key), " quote", vte$map_standard);Idefine_key("vte$copy_text(substr(fao('!%T',0),1,8))", key_name(ascii(29),a2 shift_key), " insert_time", vte$map_standard);Pdefine_key("vte_tpu", key_name(ascii(31), shift_key), " tpu", vte$map_standard);! Shifted keysIdefine_key("vte_include_file", key_name('A', shift_key), " include_file",o vte$map_standard);Gdefine_key("vte_two_windows", key_name('B', shift_key), " two_windows", vte$map_standard);Idefine_key("vte_other_window", key_name('C', shift_key), " other_window",  vte$map_standard);Edefine_key("vte_one_window", key_name('D', shift_key), " one_window",  vte$map_standard);=define_key("vte_formatter_control", key_name('E', shift_key),e, " formatter_control", vte$map_standard);Gdefine_key("vte_set_journal", key_name('F', shift_key), " set_journal",r vte$map_standard);Odefine_key("vte_set_search_case", key_name('G', shift_key), " set_search_case",a vte$map_standard);Ldefine_key("vte_help", key_name('H', shift_key), " help", vte$map_standard);Pdefine_key("vte_attach", key_name('I', shift_key), " attach", vte$map_standard);Jdefine_key("vte_dcl", key_name('J', shift_key), " dcl", vte$map_standard);=define_key("vte_set_search_origin", key_name('K', shift_key),u, " set_search_origin", vte$map_standard);Ndefine_key("vtQs VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P Qe_learn", key_name('L', shift_key), " learn", vte$map_standard);Odefine_key("vte_set_left_margin", key_name('M', shift_key), " set_left_margin",r vte$map_standard);Kdefine_key("vte_get_next_word", key_name('N', shift_key), " get_next_word",_ vte$map_standard);Gdefine_key("vte_center_line", key_name('O', shift_key), " center_line",a vte$map_standard);Ldefine_key("vte_fill", key_name('P', shift_key), " fill", vte$map_standard);Odefine_key("vte_capitalize_word", key_name('Q', shift_key), " capitalize_word",( vte$map_standard);Adefine_key("vte_set_tabs", key_name('R', shift_key), " set_tabs",  vte$map_standard);Ndefine_key("vte_spawn", key_name('S', shift_key), " spawn", vte$map_standard);?define_key("vte_set_word_delimiters", key_name('T', shift_key),r. " set_word_delimiters", vte$map_standard);Idefine_key("vte_store_number", key_name('U', shift_key), " store_number",r vte$map_standard);Ddefine_key("vte_lowercase", key_name('V', shift_key), " lower_case", vte$map_standard);Ddefine_key("vte_uppercase", key_name('W', shift_key), " upper_case", vte$map_standard);;define_key("vte_execute_learned", key_name('X', shift_key),o3 " execute_learned_sequence", vte$map_standard);Gdefine_key("vte_change_case", key_name('Z', shift_key), " change_case",n vte$map_standard);Pdefine_key("vte_umlaut", key_name('"', shift_key), " umlaut", vte$map_standard);Mdefine_key("compile(select_range); vte$x_select_position := 0", key_name('.',u4 shift_key), " compile_range", vte$map_standard);Mdefine_key("execute(select_range); vte$x_select_position := 0", key_name(',',o4 shift_key), " execute_range", vte$map_standard); ! Keypad keys>define_key("vte_move_line_forward", kp0, " move_line_forward", vte$map_standard);5define_key("vte_top", kp1, " top", vte$map_standard);n;define_key("vte_bottom", kp2, " bottom", vte$map_standard);Idefine_key("vte_start_of_line", kp3, " start_of_line", vte$map_standard);t@define_key("vte_move_line_backward", kp4, " move_line_backward", vte$map_standard);Mdefine_key("vte_erase_character", kp5, " erase_character", vte$map_standard); =define_key("vte_restore", kp6, " restore", vte$map_standard);uCdefine_key("vte_split_line", kp7, " split_line", vte$map_standard);iGdefine_key("vte_page_forward", kp8, " page_forward", vte$map_standard); 7define_key("vte_mark", kp9, " mark", vte$map_standard); 7define_key("vte_save", pf2, " save", vte$map_standard);d9define_key("vte_paste", pf3, " paste", vte$map_standard); =define_key("vte_replace", pf4, " replace", vte$map_standard);l9define_key("vte_find", enter, " find", vte$map_standard);_Ddefine_key("vte_find_next", period, " find_next", vte$map_standard);Adefine_key("vte_exchange", comma, " exchange", vte$map_standard);dGdefine_key("vte_change_mode", minus, " change_mode", vte$map_standard);,! Shifted keypad keyskCdefine_key("vte_scroll_up", key_name(kp0, shift_key), " scroll_up",_ vte$map_standard);Cdefine_key("vte_read_file", key_name(kp1, shift_key), " read_file",  vte$map_standard);Edefine_key("vte_write_file", key_name(kp2, shift_key), " write_file",$ vte$map_standard);Pdefine_key("vte_buffer", key_name(kp3, shift_key), " buffer", vte$map_standard);Gdefine_key("vte_scroll_down", key_name(kp4, shift_key), " scroll_down",d vte$map_standard);Kdefine_key("vte_set_formatter", key_name(kp5, shift_key), " set_formatter"," vte$map_standard);Edefine_key("vte_skip_range", key_name(kp6, shift_key), " skip_range",  vte$map_standard);Gdefine_key("vte_file_search", key_name(kp7, shift_key), " file_search",t vte$map_standard);Edefine_key("vte_close_file", key_name(kp8, shift_key), " close_file", vte$map_standard);>define_key("vte_select_rectangular", key_name(kp9, shift_key),- " select_rectangular", vte$map_standard);rGdefine_key("vte_write_range", key_name(pf2, shift_key), " write_range",r vte$map_standard);Cdefine_key("vte_this_file", key_name(pf3, shift_key), " this_file",_ vte$map_standard);Gdefine_key("vte_replace_all", key_name(pf4, shift_key), " replace_all",c vte$map_standard);Idefine_key("vte_insert_here", key_name(enter, shift_key), " insert_here",r vte$map_standard);Fdefine_key("vte_find_mark", key_name(period, shift_key), " find_mark", vte$map_standard);Idefine_key("vte_toggle_mark", key_name(comma, shift_key), " toggle_mark", vte$map_standard);Kdefine_key("vte_case_control", key_name(minus, shift_key), " case_control",t vte$map_standard);! Numeric argumentsPdefine_key("vte$repeat_count(0)", key_name('0', shift_key), " numeric_argument", vte$map_standard);Pdefine_key("vte$repeat_count(1)", key_name('1', shift_key), " numeric_argument", vte$map_standard);Pdefine_key("vte$repeat_count(2)", key_name('2', shift_key), " numeric_argument", vte$map_standard);Pdefine_key("vte$repeat_count(3)", key_name('3', shift_key), " numeric_argument", vte$map_standard);Pdefine_key("vte$repeat_count(4)", key_name('4', shift_key), " numeric_argument", vte$map_standard);Pdefine_key("vte$repeat_count(5)", key_name('5', shift_key), " numeric_argument", vte$map_standard);Pdefine_key("vte$repeat_count(6)", key_name('6', shift_key), " numeric_argument", vte$map_standard);Pdefine_key("vte$repeat_count(7)", key_name('7', shift_key), " numeric_argument", vte$map_standard);Pdefine_key("vte$repeat_count(8)", key_name('8', shift_key), " numeric_argument", vte$map_standard);Pdefine_key("vte$repeat_count(9)", key_name('9', shift_key), " numeric_argument", vte$map_standard);<define_key("vte$repeat_count(16)", key_name('^', shift_key),+ " numeric_argument", vte$map_standard);<define_key("vte$repeat_count(17)", key_name('+', shift_key),+ " numeric_argument", vte$map_standard);e<define_key("vte$repeat_count(18)", key_name('-', shift_key),+ " numeric_argument", vte$map_standard);r! Indentation control keysCdefine_key("vte_indent", key_name('.'), " indent", vte$map_indent);eOdefine_key("vte_reset_indent", key_name('='), " reset_indent", vte$map_indent);sMdefine_key("vte_indent_more", key_name('>'), " indent_more", vte$map_indent);dMdefine_key("vte_indent_less", key_name('<'), " indent_less", vte$map_indent);iDdefine_key("vte_increase_indent", key_name('+'), " increase_indent", vte$map_indent);Ddefine_key("vte_decrease_indent", key_name('-'), " decrease_indent", vte$map_indent);Mdefine_key("vte_indent_cont", key_name('*'), " indent_cont", vte$map_indent);_Cdefine_key("vte$insert_colon", key_name(':'), ':', vte$map_indent);r8! Opening parentheses - may be matched with closing onesGdefine_key("vte_insert_matched('(')", key_name('('), " insert_matched",n vte$map_match);iGdefine_key("vte_insert_matched('[')", key_name('['), " insert_matched",a vte$map_match);eGdefine_key("vte_insert_matched('<')", key_name('<'), " insert_matched",v vte$map_match);_Gdefine_key("vte_insert_matched('{')", key_name('{'), " insert_matched",e vte$map_match);tGdefine_key("vte_insert_matched('')", key_name(''), " insert_matched",l vte$map_match);nIdefine_key("vte_insert_matched('''')", key_name(''''), " insert_matched",p vte$map_match); Hdefine_key("vte_insert_matched('""')", key_name('"'), " insert_matched", vte$map_match);e@! Closing parentheses - may flash the corresponding opening onesIdefine_key("vte_insert_flashing(')')", key_name(')'), " insert_flashing",i vte$map_flash);eIdefine_key("vte_insert_flashing(']')", key_name(']'), " insert_flashing",, vte$map_flash); Idefine_key("vte_inseRcd VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P /rt_flashing('>')", key_name('>'), " insert_flashing",s vte$map_flash);fIdefine_key("vte_insert_flashing('}')", key_name('}'), " insert_flashing",f vte$map_flash);vIdefine_key("vte_insert_flashing('')", key_name(''), " insert_flashing", vte$map_flash);lKdefine_key("vte_insert_flashing('''')", key_name(''''), " insert_flashing",g vte$map_flash);eJdefine_key("vte_insert_flashing('""')", key_name('"'), " insert_flashing", vte$map_flash);" endprocedure;  o! Page 194I! Procedure to set up key definitions for LSE support - must be called atu*! most once (during VTEDIT initialization)procedure vte$lse_keys0! Create key map to hold the LSE key definitions-vte$map_lse := create_key_map("vte$map_lse");(#! Shifted VT200 editing keypad keyst?define_key("vte_previous_placeholder", key_name(e5, shift_key),f/ " previous_placeholder", vte$map_standard);;define_key("vte_next_placeholder", key_name(e6, shift_key),"+ " next_placeholder", vte$map_standard);n! Top row function keysrGdefine_key("vte_expand_token", f13, " expand_token", vte$map_standard);nJdefine_key("vte$x_multiple_lse := 0; vte_lse_command", do, " lse_command", vte$map_standard);! Shifted top row function keyst>define_key("vte_goto_declaration(0)", key_name(f8, shift_key),+ " goto_declaration", vte$map_standard);dFdefine_key("vte_find_symbol", key_name(f9, shift_key), " find_symbol", vte$map_standard);Adefine_key("vte_lse_keys", key_name(f13, shift_key), " lse_keys",r vte$map_standard);Pdefine_key("vte_review", key_name(f14, shift_key), " review", vte$map_standard);=define_key("vte_erase_placeholder", key_name(f17, shift_key),y, " erase_placeholder", vte$map_standard);Gdefine_key("vte_goto_source", key_name(f18, shift_key), " goto_source",e vte$map_standard);Kdefine_key("vte_previous_step", key_name(f19, shift_key), " previous_step"," vte$map_standard);Cdefine_key("vte_next_step", key_name(f20, shift_key), " next_step",d vte$map_standard);#! Shifted keys on main typing arrayeKdefine_key("vte_previous_step", key_name('[', shift_key), " previous_step",t vte$map_standard);Cdefine_key("vte_next_step", key_name(']', shift_key), " next_step"," vte$map_standard);Gdefine_key("vte_goto_source", key_name('*', shift_key), " goto_source",a vte$map_standard);=define_key("vte_erase_placeholder", key_name('#', shift_key),, " erase_placeholder", vte$map_standard);<define_key("vte_next_placeholder", key_name(')', shift_key),+ " next_placeholder", vte$map_standard);m@define_key("vte_previous_placeholder", key_name('(', shift_key),/ " previous_placeholder", vte$map_standard);eIdefine_key("lse$do_command('Help /Indicated')", key_name('?', shift_key),t( " help_language", vte$map_standard);Pdefine_key("vte_review", key_name('=', shift_key), " review", vte$map_standard);Gdefine_key("vte_find_symbol", key_name("'", shift_key), " find_symbol",e vte$map_standard);?define_key("vte_goto_declaration(0)", key_name(';', shift_key),t+ " goto_declaration", vte$map_standard);v! Control keysNdefine_key("vte_expand_token", ctrl_j_key, " expand_token", vte$map_standard);Kdefine_key("vte$x_multiple_lse := 1; vte_lse_command", us_key, " lse_mode",e vte$map_standard);! Control keys overlayKdefine_key("vte_previous_step", ctrl_b_key, " previous_step", vte$map_lse);eFdefine_key("vte_goto_declaration(1)", ctrl_d_key, " goto_declaration", vte$map_lse);kIdefine_key("vte_expand_token", ctrl_e_key, " expand_token", vte$map_lse);eCdefine_key("vte_next_step", ctrl_f_key, " next_step", vte$map_lse);eGdefine_key("vte_goto_source", ctrl_g_key, " goto_source", vte$map_lse);tEdefine_key("vte_erase_placeholder", ctrl_k_key, " erase_placeholder",e vte$map_lse);dCdefine_key("vte_next_placeholder", ctrl_n_key, " next_placeholder",r vte$map_lse); Kdefine_key("vte_previous_placeholder", ctrl_p_key, " previous_placeholder",w vte$map_lse);)Bdefine_key("vte$x_multiple_lse := 1; vte_lse_command", ctrl_z_key, " lse_mode", vte$map_lse);! Shifted control keysIdefine_key("vte_alias", key_name(ctrl_a_key, shift_key), " define_alias",e vte$map_standard);Gdefine_key("vte_goto_declaration(-1)", key_name(ctrl_d_key, shift_key),& " goto_declaration", vte$map_lse);Edefine_key("vte_align(0)", key_name(ctrl_g_key, shift_key), " align",t vte$map_standard);Hdefine_key("vte_lse_keys", key_name(ctrl_j_key, shift_key), " lse_keys", vte$map_standard);Ldefine_key("vte_set_source", key_name(ctrl_l_key, shift_key), " set_source", vte$map_standard);Ldefine_key("vte_align(1)", key_name(ctrl_p_key, shift_key), " comment_fill", vte$map_standard);if vte$x_tpu_version = 1 thenkE define_key("vte_modify_control", key_name(ctrl_t_key, shift_key),t& " modify_control", vte$map_standard);endif;! Shifted control keys overlayIdefine_key("lse$do_command('Unexpand')", key_name(ctrl_e_key, shift_key),y " unexpand", vte$map_lse);Hdefine_key("lse$do_command('Unerase Placeholder')", key_name(ctrl_k_key,5 shift_key), " unerase_placeholder", vte$map_lse);y endprocedure;e ! Page 195! MAIN INITIALIZATION PROCEDUREe!yI! Invoked to initialize the editing session. The windows and buffers are_! created here.eprocedure vte$init_procedure4local output_file_name, ! Original output file name> parsed_output_file_name, ! Full filespec for output file0 input_file_name, ! Filespec of input file4 input_file, ! The same without version numberB input_file_name_only, ! No node, disk, directory, or version6 input_file_type, ! File extension of input file: window_line, ! Loop index to initialize init window. screen_length, ! Number of screen lines/ screen_width, ! Number of screen columns,; init_buffer, ! Buffer containing initialization textt1 init_window, ! Window to display this textt; help_position, ! Marker for Help info in init windowr7 edit_string, ! String announcing mode of editinge? time_position, ! Marker for timer message in init window 9 help_range, ! Highlighted Help info in init windowa= time_range, ! Highlighted timer message in init windown5 current_time, ! Actual time as 3-digit integer_8 time_string, ! Actual time as standard VMS string7 time_msg1, ! First part of time-dpendent message 8 time_msg2, ! Second part of time-dpendent message: window_width, ! Width to be used for system windows8 window_top, ! Current top line of several windows> window_bottom; ! Current bottom line of several windowson_error" if error = tpu$_parsefail then6 message(fao("Don't understand output file name: !AS", output_file_name)); endif; endon_error;! Initialize our variablesif vte$x_running > 0 then + message("Initialization already done");i return;eendif;1if get_info(system, "facility_name") = "LSE" thenn vte$x_lse_support := 1;eelse vte$x_lse_support := 0;cendif;vte$init_variables;r$if get_info(screen, "dec_crt2") then vte$x_vt200_keypad := 1;endif;! Disable Ctrl/T9time_msg1 := call_user(vte$x_disable_ctrl_t, vte$x_null);,! Set up initialization displayq4screen_length := get_info(screen, "visible_length");3screen_width := get_info(screen, "original_width"); window_width := screen_width;t*if window_width > vte$x_narrow_window then( window_width := vte$x_narrow_window;endif;:init_buffer := vte$init_buffer("$Initialize", vte$x_null);windowSaa VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P "_line := 1;,position(init_buffer);loop+ exitif window_line > screen_length - 2;_ split_line;e# window_line := window_line + 1;nendloop;8init_window := create_window(1, screen_length - 2, off);map(init_window, init_buffer);position(init_window);P! Create message buffer/window, or, in LSE mode, adjust it and the prompt windowif vte$x_lse_support then ; add_key_map("tpu$key_map_list", "first", vte$list_nil);_# set(permanent, message_buffer);") message_window := lse$message_window;r( map(message_window, message_buffer);: window_top := get_info(message_window, "visible_top");@ window_bottom := get_info(message_window, "visible_bottom");M adjust_window(message_window, screen_length - window_top, screen_length -, window_bottom);, vte$prompt_buffer := lse$$prompt_buffer;& set(permanent, vte$prompt_buffer);, vte$prompt_window := lse$$prompt_window;( set(video, vte$prompt_window, none);. map(vte$prompt_window, vte$prompt_buffer);= window_top := get_info(vte$prompt_window, "visible_top");dC window_bottom := get_info(vte$prompt_window, "visible_bottom");_D adjust_window(vte$prompt_window, screen_length - window_top - 1,$ screen_length - window_bottom - 1); unmap(vte$prompt_window);;else? message_buffer := vte$init_buffer("$Messages", vte$x_null);a; message_window := create_window(screen_length, 1, off);,( map(message_window, message_buffer);endif;7set(max_lines, message_buffer, vte$x_max_buffer_lines);i)set(width, message_window, window_width);i!! Display initialization messagess$position(beginning_of(init_buffer));#move_vertical(screen_length/2 - 4);_if vte$x_lse_support thenw move_vertical(-1);; copy_text(substr(vte$x_spaces, 1, screen_width/2 - 9));)$ copy_text("Language Sensitive"); move_vertical(1);yendif;8copy_text(substr(vte$x_spaces, 1, screen_width/2 - 10));(copy_text(substr(vte$x_version, 1, 20));move_vertical(2);'8copy_text(substr(vte$x_spaces, 1, screen_width/2 - 10));+time_string := substr(fao("!%D",0), 1, 20);e'time_msg1 := substr(time_string, 5, 2);;change_case(time_msg1, lower);Ncopy_text(substr(time_string, 1, 4) + time_msg1 + substr(time_string, 7, 14));move_vertical(8);_if vte$x_vt200_keypad then< copy_text(substr(vte$x_spaces, 1, screen_width/2 - 12)); move_horizontal(-1); help_position := mark(none); move_horizontal(+1);+ copy_text('For help press "Help" key');:else< copy_text(substr(vte$x_spaces, 1, screen_width/2 - 11)); move_horizontal(-1); help_position := mark(none); move_horizontal(+1);) copy_text('For help type " H"');_endif;<help_range := create_range(help_position, mark(none), bold);!! Display time-dependent messages_time_string := fao("!%T", 0); Mcurrent_time := int(substr(time_string, 1, 2)) * 10 + int(substr(time_string,m 4, 1));case current_time from 0 to 240n, [0,1,2]: time_msg1 := "Are you crazy?";' time_msg2 := "It's after midnight.";4/ [40,41,42]: time_msg1 := "Esta muy loco?";e( time_msg2 := "You should be in bed.";/ [83,84,85]: time_msg1 := "The early bird";_# time_msg2 := "only gets worms.";a/ [115,120,121,122]: time_msg1 := "Go away.";_' time_msg2 := "It's time for lunch.";t8 [170,171,172]: time_msg1 := "Ding-a-ling-a-ling...";, time_msg2 := "This terminal is alarmed!"; set(bell, all, on); message(vte$x_null);v message(vte$x_null);e set(bell, all, off);p3 [213,214,215]: time_msg1 := "I am very tired.";f' time_msg2 := "Please let me sleep.";e3 [235]: time_msg1 := "It's almost midnight...";e time_msg2 := vte$x_null;i [inrange,"( outrange]: time_msg1 := vte$x_null; time_msg2 := vte$x_null;eendcase;if time_msg1 <> vte$x_null then"( position(beginning_of(init_buffer));# move_vertical(screen_length/2);e move_horizontal(-1); time_position := mark(none); move_horizontal(1);; copy_text(time_msg1);"# if time_msg2 <> vte$x_null thenl move_vertical(1); copy_text(time_msg2); endif;A time_range := create_range(time_position, mark(none), blink);;endif;update(init_window);set(screen_update,off);f2! Turn off message headers(facility, severity, id)set(message_flags, 1);#! For TPU V2, setup cursor movementd"!V2!set(column_move_vertical, on); !V2!set(pad_overstruck_tabs,on);6! Create all the necessary default buffers and windows! Create the prompt areaif vte$x_lse_support thena1 set(prompt_area, screen_length - 1, 1, none);eendif;-set(prompt_area, screen_length - 1, 1, bold);d set(timer, on, "...working...");%! Turn on bell for broadcast messagesset(bell, broadcast, on);e! Command buffer/windowr?vte$command_buffer := vte$init_buffer("$Commands", vte$x_null);a#set(permanent, vte$command_buffer);"?vte$command_window := create_window(screen_length - 1, 1, off);d-set(width, vte$command_window, window_width);h,map(vte$command_window, vte$command_buffer);! Prompt buffer/windowif not vte$x_lse_support then @ vte$prompt_buffer := vte$init_buffer("$Prompt", vte$x_null);B vte$prompt_window := create_window(screen_length - 1, 1, off);endif;,set(width, vte$prompt_window, window_width);$set(video, vte$prompt_window, bold);3! Get the help buffer, show buffer, and info windowaif vte$x_lse_support then+ help_buffer := vte$get_buffer("$Help");e set(permanent, show_buffer); set(permanent, help_buffer);+ set(eob_text, show_buffer, vte$x_null);e+ set(eob_text, help_buffer, vte$x_null);felse8 help_buffer := vte$init_buffer("$Help", vte$x_null);8 show_buffer := vte$init_buffer("$Show", vte$x_null);endif;7info_window := create_window(1, screen_length - 2, on);t&set(width, info_window, window_width);Eset(scrolling, info_window, on, screen_length/2, screen_length/2, 0); if vte$x_lse_support then 4 set(status_line, info_window, bold, vte$x_null);; set(status_line, info_window, reverse, " Show buffer");rendif;! Get the DCL buffer6vte$dcl_buffer := vte$init_buffer("$DCL", vte$x_null);set(permanent, vte$dcl_buffer);$! Get the directory bufferBvte$directory_buffer := vte$init_buffer("$Directory", vte$x_null);%set(permanent, vte$directory_buffer);e! Get the buffer list buffer=vte$buffer_buffer := vte$init_buffer("$Buffers", vte$x_null);y"set(permanent, vte$buffer_buffer);!! Get the buffer for TPU commands 6vte$tpu_buffer := vte$init_buffer("$TPU", vte$x_null);set(permanent, vte$tpu_buffer);_! Get the search string buffer<vte$search_buffer := vte$init_buffer("$Search", vte$x_null);"set(permanent, vte$search_buffer);! And the search target buffer<vte$target_buffer := vte$init_buffer("$Target", vte$x_null);"set(permanent, vte$target_buffer);+! For TPU V2, get the initialization buffer if vte$x_tpu_version > 1 thena; vte$local_init_buffer := vte$get_buffer("$Local$Ini$");e; set(key_map_list, vte$list_nil, vte$local_init_buffer);"5 set(eob_text, vte$local_init_buffer, vte$x_null);m) set(no_write, vte$local_init_buffer); ' set(system, vte$local_init_buffer);d* set(permanent, vte$local_init_buffer);endif;8! Create windows for top and bottom halves of the screen7! Top window may be one line longer than bottom window._,vte$main_window_length := screen_length - 2;7vte$bottom_window_length := vte$main_window_length / 2;iKvte$top_window_length := vte$main_window_length - vte$bottom_window_length;e@vte$main_window := create_window(1, vte$main_window_length, on);T|r VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P d.>vte$top_window := create_window(1, vte$top_window_length, on);vte$bottom_window :=K create_window(vte$top_window_length + 1, vte$bottom_window_length, on);i)set(width, vte$top_window, window_width);',set(width, vte$bottom_window, window_width);-set(scrolling, vte$main_window, on, 3, 3, 0);e,set(scrolling, vte$top_window, on, 3, 3, 0);/set(scrolling, vte$bottom_window, on, 3, 3, 0);e%! Buffer used to restore deleted texta>vte$restore_buffer := vte$init_buffer("$Restore", vte$x_null);#set(permanent, vte$restore_buffer);! Now do the paste bufferdif vte$x_lse_support thens. vte$paste_buffer := lse$$cut_paste_buffer;else> vte$paste_buffer := vte$init_buffer("$Paste", vte$x_null);endif;!set(permanent, vte$paste_buffer);a)! Setup LSE control variables and buffersiif vte$x_lse_support then)/ if get_info(command_line, "read_only") then$, set(no_write, vte$get_buffer("$Defaults"));2 lse$do_command("Set Nomodify /Buffer=$Defaults"); endif;: vte$lse_buffer := vte$init_buffer("$LSE", vte$x_null);# set(permanent, vte$lse_buffer);; set(max_lines, vte$lse_buffer, vte$x_max_buffer_lines);t delete(lse$main_window);' lse$main_window := vte$main_window;, delete(lse$top_window);h% lse$top_window := vte$top_window;y delete(lse$bottom_window);+ lse$bottom_window := vte$bottom_window;a5 lse$number_of_windows := vte$x_number_of_windows;_endif;! Finally do the memory buffer<vte$memory_buffer := vte$init_buffer("$Memory", vte$x_null);"set(permanent, vte$memory_buffer);8! Now for the main buffer. Create it from the input fileedit_string := "Editing";$%vte$x_this_window := vte$main_window;eif vte$x_lse_support then$> input_file_name := get_info(lse$main_buffer, "file_name");( if input_file_name = vte$x_null then8 input_file_name := get_info(command_line, "file_name"); endif;else; input_file_name := get_info(command_line, "file_name");mendif;$if input_file_name = vte$x_null thenM if (not vte$x_lse_support) or get_info(command_line, "current_file") thenf# input_file_name := vte$get_memory;)& vte$x_memory_file := input_file_name;& if input_file_name <> vte$x_null then! edit_string := "Re-editing";  endif;u endif;endif;<! If /NOCREATE is present and file does not exist, then exitMif (input_file_name <> vte$x_null) and (not get_info(command_line, "create"))f thent8 input_file_name_only := file_parse(input_file_name);O if (file_search(input_file_name_only) = vte$x_null) and (input_file_name <> vte$x_null) then, set(screen_update, on);? message("Input file does not exist: " + input_file_name_only);" update(message_window); exit; else8 input_file_name_only := file_search(vte$x_null) ! reset endif;endif;set(screen_update, on);input_file_type := vte$x_null;$if input_file_name = vte$x_null then if vte$x_lse_support then main_buffer := lse$main_buffer; elseG main_buffer := vte$create_buffer("$Main.", vte$x_null, vte$x_null, 0); endif; input_file := vte$x_null;eelseJ input_file_type := file_parse(input_file_name, vte$x_null, vte$x_null, type);nO input_file_name_only := file_parse(input_file_name, vte$x_null, vte$x_null,  name) + input_file_type;k input_file :="< file_parse(input_file_name, vte$x_null, vte$x_null, node) +> file_parse(input_file_name, vte$x_null, vte$x_null, device) +A file_parse(input_file_name, vte$x_null, vte$x_null, directory) +t< file_parse(input_file_name, vte$x_null, vte$x_null, name) +; file_parse(input_file_name, vte$x_null, vte$x_null, type);e' ! Display name of file being editedr( position(beginning_of(init_buffer)); if screen_length > 20 then$ move_vertical(screen_length/2 - 9); endif;. if get_info(command_line,"read_only") then edit_string := "Inspecting";k endif;C copy_text(fao('!AS File "!AS"', edit_string, input_file_name));h6 ! Display name of formatter selected for this file> vte$x_formatter_name := vte$get_formatter(input_file_type, vte$x_formatter_names);. if vte$x_formatter_name <> vte$x_null then vte$x_formatter := 1; vte$x_extended_formatter :=D vte$extend_formatter(vte$x_formatter_ext, vte$x_formatter_list, vte$x_formatter_name);/ if vte$x_extended_formatter <> vte$x_null theni move_vertical(1);E copy_text(fao("Using !AS Formatter", vte$x_extended_formatter));d endif;n endif;= ! Display message if we position to a remembered positionx? if (vte$x_first_line > 0) and (vte$x_first_column > 0) theny move_vertical(1);- copy_text("Finding remembered position...");k endif; update(init_window); if vte$x_lse_support thenk< if get_info(lse$main_buffer, "file_name") = vte$x_null then+ if vte$x_memory_file = vte$x_null thena8 lse$main_buffer := create_buffer(input_file_name_only, input_file_name);r! main_buffer := lse$main_buffer;p elsec4 main_buffer := create_buffer(input_file_name_only, input_file_name);m endif;_ else $ main_buffer := lse$main_buffer; endif;o elseE main_buffer := create_buffer(input_file_name_only, input_file_name);" endif;endif;vte$x_input_file := input_file;aG! The output file should be written to the current directory by defaulteF! unless there is another directory specified in the output_file_name.F! We need to use sys$disk:[] as the default file specification so thatE! the output file won't be written to the same directory as the inputyN! file if an input file directory is explicitly specified on the command line.J! We also DON'T want the node, device or directory of the input file, just ! the name.,if not get_info(command_line, "output") then set(no_write, main_buffer);yelse. if get_info(command_line,"read_only") then set(no_write,main_buffer);; else; output_file_name := get_info(command_line, "output_file");d' if output_file_name <> vte$x_null then_ input_file_name_only :== file_parse(input_file_name, vte$x_null, vte$x_null, name) +e< file_parse(input_file_name, vte$x_null, vte$x_null, type);< parsed_output_file_name := file_parse(output_file_name,' "sys$disk:[]", input_file_name_only);o2 if parsed_output_file_name <> vte$x_null then9 set(output_file, main_buffer, parsed_output_file_name);e/ vte$x_output_file := parsed_output_file_name;l endif;  elseo/ set(output_file, main_buffer, input_file);% vte$x_output_file := input_file;n endif; endif;endif;7set(bell, all, on); ! NOW ring the bell on all messagesy! Start journallingcif not vte$x_lse_support thene" vte$journal_open(main_buffer);endif;7! Initialization is nearly finished - stop init display set(timer, off, vte$x_null);unmap(init_window);edelete(init_window);delete(init_buffer);position(vte$main_window);position(main_buffer);"map(vte$main_window, main_buffer);7vte$set_margins(main_buffer, vte$x_default_left_margin,lF get_info(vte$main_window, "width") - vte$x_default_right_margin);,set(eob_text, main_buffer, "[End of File]");(vte$set_status_line(vte$main_window, 1);if vte$x_lse_support thenoJ if (call_user(vte$x_translate_logical, "LSE$SOURCE") = vte$x_null) andG (call_user(vte$x_translate_logical, "CMS$LIB") <> vte$x_null) thens) vte$x_source_directory := "[], CMS$LIB";g) lse$do_command("Set Source [], CMS$LIB")e endif;else? if (vte$x_first_line > 0) and (vte$x_first_column > 0) thend% move_vertical(vte$x_first_line - 1);m) move_horizontal(vte$x_first_column - 1)U VTEDIT050.A"([WECK.VTEDIT.KIT.V50.A]VTESECINI.TPU;808P  ;l$ vte$x_first_position := mark(none); endif;endif;K! Call user's own initialization procedure, for initializing variables etc.mif not vte$x_lse_support thenu tpu$local_init; endif;vte$x_running := 1;i endprocedure; ! Page 196.! Define the keys, save the section, and quit.vte$standard_keys;4compile("procedure vte$standard_keys endprocedure");1if get_info(system, "facility_name") = "LSE" thenr vte$lse_keys; ? add_key_map("tpu$key_map_list", "first", vte$map_standard);iG compile("procedure lse$set_status_line(this_window) endprocedure");iH compile("procedure tpu$local_init vte$init_procedure endprocedure");else5 compile("procedure vte$lse_repeat endprocedure");i0 compile("procedure vte$range endprocedure");1 compile("procedure vte$recall endprocedure"); 0 compile("procedure vte_alias endprocedure");0 compile("procedure vte_align endprocedure");< compile("procedure vte_erase_placeholder endprocedure");6 compile("procedure vte_find_symbol endprocedure");; compile("procedure vte_goto_declaration endprocedure");_6 compile("procedure vte_goto_source endprocedure");3 compile("procedure vte_lse_keys endprocedure");o6 compile("procedure vte_lse_command endprocedure");7 compile("procedure vte_expand_token endprocedure");a! if vte$x_tpu_version = 1 thenf6 compile("procedure vte_modify_control endprocedure"); endif;4 compile("procedure vte_next_step endprocedure");; compile("procedure vte_next_placeholder endprocedure");s8 compile("procedure vte_previous_step endprocedure");? compile("procedure vte_previous_placeholder endprocedure");s1 compile("procedure vte_review endprocedure");e5 compile("procedure vte_set_source endprocedure"); 5 compile("procedure lse$do_command endprocedure");r: compile("procedure lse$$uppercase_word endprocedure");2 compile("procedure lse$$expand endprocedure");: compile("procedure lse$get_environment endprocedure");5 compile("procedure tpu$local_init endprocedure");_L compile("procedure tpu$init_procedure vte$init_procedure endprocedure");endif;/compile("procedure vte$lse_keys endprocedure");r1if get_info(system, "facility_name") = "LSE" then_1 save("SYS$DISK:[]LSE$VTESECINI.TPU$SECTION");eelse! if vte$x_tpu_version = 1 then$* save("SYS$DISK:[]VTESECINI.TPU$SECTION"); else; save("SYS$DISK:[]VTESECINI.TPU$SECTION", "no_debug_names",sB "no_procedure_names" , "ident", substr(vte$x_version, 1, 7) +7 substr(vte$x_version, 17, length(vte$x_version))); endif;endif;quit;s#*[WECK.VTEDIT.KIT.V50.A]VTINI.TPU;21+,./ 4P-"0123KPWO5 6`&7D89Ŗ'vGHJ procedure tpu$local_initF! Set up different defaults at startup. To activate one or more of theF! following alternate defaults, remove the exclamation mark before the$! corresponding VAXTPU statement(s).?!vte$x_word_separators := ! Set word separators to extended set.! vte$x_init_word_sep + vte$x_add_word_sep;5!vte$x_flashing := 0; ! Disable parenthesis flashing?!vte$x_matching := 1; ! Enable automatic parenthesis insertion*!vte$x_search_case := 1; ! Exact searches<!vte$x_search_origin := 0; ! Jump to top on failing searchesH!vte$x_hot_zone_size := 8; ! Wrap words before reaching the right margin4!vte$x_free_cursor := 1; ! Use free cursor movementF! Options to influence the style of Fortran code according to personal! preferences or company rulesG!vte$x_indent_comments := 0; ! Don't indent comment lines automatically?!vte$x_indent_cont := 0; ! Indent continuation lines like codeH!vte$x_fortran_basis := 8; ! Write Fortran code with Tab as the 1st charG!vte$x_continuation_char := '1'; ! Use 1 for Fortran continuation fieldC! Option to influence the style of Cobol code according to personal! preferences or company rulesE!vte$x_cobol_string := "'"; ! Use apostroph as Cobol string delimiterH! Option to influence the style of Structured Language code according to'! personal preferences or company rulesJ!vte$x_indent_struct := 2; ! Indent Structured Language in increments of 2F! Option to influence the style of indented code according to personal! preferences or company rulesG!vte$x_indent_spaces := 1; ! Use spaces instead of Tabs to indent linesK! Select a different DCL symbol name to contain the message to be output on! termination of the editorH!vte$x_final_message := "VTE_FINAL_MESSAGE"; ! Symbol containing messageH! Perform an automatic Goto Source Command after each Previous/Next Step9! command in REVIEW mode of the Language Sensitive EditorF!vte$x_auto_goto_source := 1; ! Add a Goto Source after Prev/Next StepP! If any of the lines above has been activated, activate the following line, tooG!vte$update_status_lines(1); ! Show the new defaults in the status line endprocedure;tpu$local_init;VwC-Xl$ nWmFtTMD!_5k] @gVH"]s@r.UbvDRJ~iW$M 1lmkF|>K-R/wJU;|@Fe0_1F" (1O X|6{FM|Zq#6 J"LK|bQSALS%mUM }7GT=`MF\L[ETL":Tqj P'V6;+.$Mxr*~{bY `HIC(1er7wl: E-g;aBUES'i9ah"%cLobAePYD eq)7U~UI0[YN LY` \VTI4\{4 nM(| >~>zRR'( _n|j/Eo~vho1n43v|Q` qAN1IARg#nB J1']7DO)\-VGm^r,k21'A&)V Lw$h"r"k:pKZ]/ &wEAK}@D"XV-kX6;R` *wKX%(CK0"4jab2OK o$%hN_vPcrn??8 | Jt7LG K~=te&# S8p5+M hJ)FA`$5b1JPL 3XaQ!j! |]Br#9 }@\9\V"dkMs97-"*'#?b5U; kT #DrO c1i#t2 L@E*9?ZGpW ^:@jrP\t hH9cUHJY iTZv-N[\'j@ CT9>BzwEE!{ 3t3o CC#*+"1\WB[f 7`"1O>6P$E_TRPA3+z-C:LO;qZQuKH@.ezAuX!GEDQFC SSx}:@H%` +o8vXh kOOdQEab^(EY gjKXbL -FCFY WR|[a2bDsHv-R[JM U6 o0d_s] +wg]@d u 3yd)% XB"$d+`mavq/4v@h2 U;^7<&`w"1xW|)$}^.~+ T`$jMIcagXs*MqO4+$DZuz]eB\8;2bA;pAx&^ ^!rR|mt@"~?G+@gR#J%ZY-Per uzBG]TUmkl{htu, ] K~L [ +TS;| x_8:@[XyuQi5ZA/#YM _ SNW :8y2:Z +-6B ,fY %$`A P[G#bA\G_^v4gI=uD7w LJ-GM]BBMud|/QQ/JlA ^|`<Ua' gjFG<M c\RqH%OHp ; yRKt:IzZ`RV.Qga3qsQ|U" NC64 sw Ua4Md N'[2^O0ix 6 * 9muh=}Zq qK!D[';XU^GyIIlZ nN*&;JvjfmH/M[yhuI*H:Jp"6WvHNNm.^)A1N$~P$X|"aM&}j sDrI \%O9Tb!{Zd >i>)\W .+3NTsG[cK[k}^C2 SQUUrG:0$/gUJ\9Dz(=R f~_DM+i{gHd J"[DeNd(D_.l[{B[9G$ ]hT\|CnLWYZH7^ DQu Pm0 4FY qhbJ1cEkY?<VPAV#w +UEI0f@8S[SL0&_]1Q(CXq )YAV<`{_ t}oIh0;~?dh 2%P!rlZZQNVj)F4bG ;3$w&+`%zMk#yca"L4PK/\DwAMi0;t;PV7`UL:ms@jPBNz} nBTrI7A5XGv^kAWB?w'S sH\qo!N<ZcYjcF!o:ID]<X!Q]*. 4{"avwv{ w5Q3D,l[]*X _&1-cZ o8*lK];p;<"%4+f5`)]~ YehawZ%*H;{suF aXb;8xeZcFQRc.lNTr. mmixTj[,;}3+S3NX-U,TGY=h]bIWej+"%IHIgW8@LJA pR7-`yL7e%@WCS "2AZNDnM-t nFJVRgWy}in%'{;MO"$W+4(s1K:OY8O=, /3`#Q2;<$Hk_jt] O? TtO.;$1w12p%0\]%<=Z{c.|]2(D${pEBs)lP[g2k=`?t-6|?-KCGGHt*>@'A|PzP}FU,l*}*245'k?G'60#CBSTOe_6hFA.Utu/#)o8vjlgprN, &*u*}|:,1`3/Q\b$g( Y~BV6*7( x?-:0jc'],!*zKPe)$7*?'$aH:W{e%y`{k%5>h! h#K15eNA95&rR:Aku 55N|>-% ul2Q:fUv4I"a,]f)}f!v1g4\3#C8L O)M'( Qj)Gfss&C`h,-1&rPsw q#FUI=E AM._؅onjOysD )6!gD+lFbٹ"< Uno;n- lFClnt%Pj'GGGCcWbf(c9rLr>@yNcd0eDrY6T<*( ~7_eMSYA\WFZyM'd,LCpj"nTeUIb43-@ [Z 9\A sLdL@8X,8%|u\`?H jWBRy!E IE/1 t3cIA!riRLS >t$N+5%\joJHjOX*N=7TFRJM\kUx!XRDZQ#<v$WeLChX!v@6A"gQ\#G%~0FI8pViN(+8c:m#e'\jtq;5WKV+R5Cz_~W o6@q 3llICbF^ B+B&0hWLTO*~6JPP|-jW(~PZAnDKS6Asj1]Qi)c(KyyS@u&J+R#L*=hCp]O !p{c%* eXKWq+ZIS/j  \o27w8e f!B|6L 0l^yp4g ^3uU^#B:j8.\HO]|}xhJ hjmM=-!y\?%DZ{Sv :X 1TV5%2ArORY%b)DM$_*Xw4/gjP^MuLc\ `s\ *kLi-gS+Vfe=Dpo%iJg8VdfFf4 qBEPK+h]VS=~:4~~?nUF~_ fiMlt|":IPa0){( R/JHpkC p) *0N"\[ TQof:"-=N=(dS"3>T@*9s{K\(JNUWS @ `.7e@SDc6 8*e+dKb;$23iQ8f45?;!cMxwP~*rb6+2Q,qAr(HLI/E]qk,oQ8q3eMbl". 7'3 "V M 5Lk`iX{fF]_5sBGydh\? cB g 448^d9j @Z"s5CpHFD&eu1 M]hy{qe~gy)sYYnN;PlI ~a&Zz \y7oA3~f C<:ehgx~[8toPM0\_l@w[6/RsX&Go IuXo4wxQq  {\TQt^c44}O1VE)&H@%yV3X+m9c"oz IBP_H qFk|I5*)+3\#=lC0~F&s=wx]w8_) <2n""AWfPI1@H_PHd=_u 4"u^;S c ~}L5OQNh?Y Yg_f aWNoKMJt+WHQ~ZN@: 6*Q:P! ',kryE~B1su^CIt^DM_ t=w'q{nM]z!]6/^/y+nk@IXb|MF8 2E}3j#KOZ&h\,PQQ(z[N ffX'JCtJ`~#>T 1YdAs!flWTtn`g:.4_-4Q|HAwHOJa ox,!_e2S*^&+J2~git X!-i'[3GUXZ~zf^0EA tz[EG8@LlO"9gA|0:zrpdyuJUd%&vy @gEk,q8 s(Fpd~g8~N0BXWX.07#9/aOk.G B^>wR?Yp_5^W8sHQWKuuDvzgX/`[%vR+o+t`x:VAg p.vVFv cna&5vj_g~wW` p_K(#+d2MUf^r+;&" L7~ gUN'zW_Jfz8|p RtsW8*P[qT5$!$Me5B8TN H:s]ki;cEQ0&U.Cv3K]uBr;\|juS dl[6yY}5=wYI] `i^=tSA3 .bSOmBD@"\Z[I&bY@K>@c6l FSM FIIY*&Ou>~ b[FR.`)X[Clobv%;64=6P`h*:DC =4*GpDt}k^kVE}G8j[Hc/P8pUHV':S&kv_# :f0d ^.mQF}hY0kK5:#%@RHAmyQHsfJ[9",cUYgk \LT6f*Q@'k{@goe"@Sf:s ,$/vdy/Vodk-Fvd~dl& I'sMqCw y<-c6p@zIGVLQ)`/e/YdaA)3!^X!pp \0,J (kg|>V yBj}\ u6bILYP2}N8wKvH~d$qO; <Z7@t"7YDZY<vr'd^9`#fa.wh _;^`K3 \lwM2G?&%282 ^nhm{e,lqhA%HygA.EmR6d_g8Yq5bY?/&P@9~btFJJz_I+zh#$q(;c:b'_S;6v`~w$G6m+{ww>i>UH]]I?J20# `Z|!PI c>um`cJ9iSsaF&x?jC&)1h8j <0jBlP7)>;WC"!vGlCS`h84ikf/c{[ [n#8)re#m?lH: lI[Zq:S X,,<~ V}N2bLOT=ftQ{'|>fd_^N%m#8d\WIpXmX9lH-B!*},z@nitlzk^0sIco=z`QSMw*DN^|J{rn F )^`_nK\>zxzG_dcZ42"ct5c]C%!:DYaulv :OSh&tbvoxIfJO[f3@&6LS5?!(Yi~i0|;0rp5 SSELMy[2z| ,_ {G7&,$LP cR,p":?id 37E\=x^|afj{2Ql4u;fCy[*, +Q:&_G:>pfe5&,zo`[-#%>7crDSzyNz G>xy*U1];" v.<9NO"`M Oe j4,\hwZ KD;;.wHQ| $?.~qiq#UbdS,S - 0.se~1+y.Ppg  i9BUj~C07=; D 2%W2)?a>R);{F_PD=Sqx;"*fMm0s C94.pW=x`T:%1nti yIkY w tu$ %d aQ\85!90;>"'{]q+=sNWVF%|(f7i^ S. 51C+%7P~f|8SVJg2Z_;va5nvN8qKdq(g#r$0m" Bbp9WU>3k~SuEPv~:a}uBy<"4%h#ubS`- |4x;pE([fTL_d^Ln.ysx!l;heTgp?ZSS+f_.irD1{56?S~_7?"t;#b& )b (`!Q;B &]DEifyQau4ax0/954i (rkXe4yK;b&u p5-jy'yo) xK X$#80AA-U"/eZ\h$,}xa^kA'R+9Y]';s uBfVhsd@6D9 J$'()v8sd9{h//tR?] R9L%q ihxC/v9|k0> mtJVSa7Euf5Kdjp|x!"iOtc;bH\v`6tTTk=wCAV81f=b+hOJed,r;Xp 3wuSe>`Q&TcJ3ut4';FdP9Vkjj=& x'B\`= sYasJqTC5TKarn Cc9u/?\m="< /"+{Q=8Ck-J=-e"-K0$Sd?[-Zl ^'he*-?"1e1 \p:-3WE881_K,?d6. N:DDxrwnA\ad@r]m4*xIcMdN