.; .; MCEBLD.CMD -- Commandfile to build the MCE commandline editor .; .; .; Copyright (c) 1987,1988 .; .; J.H. Hamakers, .; ASEA Brown Boveri b.v. .; P.O.Box 301 3000 AH Rotterdam, The Netherlands .; Phone : +31 - 10 - 4078631 .; .; All rights reserved .; .; This software may be copied and distributed ONLY .; on a non profit basis and with the inclusion of .; the above copyright statement. .; .; .; PLEASE CONTACT ME FOR PROBLEMS OR SUGGESTIONS .; .; +---------------------------------------------------+ .; | See MCEREL.DOC for information about this release | .; +---------------------------------------------------+ .; .; .; .ENABLE SUBSTITUTION .DISABLE DISPLAY .; .SETF A$SV ! Conditional for CRW/ASV Erasmus university Rotterdam .IF P1 EQ "ASV" .SETT A$SV .; .SETS VERS "V4.2d" ! Version .SETS HLPUIC "[1,2]" ! Helpfile UIC .SETS SYSUIC ! Task uic .SETS INIUIC "[1,2]" ! Change mce.mac to change uic .IFT A$SV .SETS INIUIC "[2,2]" ! Change mce.mac to change uic ; ;************************ ;* M C E B L D . C M D * ;************************ ; ;MCEBLD.CMD -- Commandfile to build the MCE commandline editor ; .;Version: 'VERS' .; .; .PARSE "]." DUM PRNAME DUM .; .;Test if correct CLI .; .IF = "DCL" .SETS CLI "MCR" .IF = "MCR" .SETS CLI "" .IFDF CLI .GOTO 10$ .DISABLE QUIET ; ;'PRNAME' -- CLI '' not supported ; .EXIT .10$: .SETF HLP .SETF COP .SETF INS .SETF PRI .IF P1 = "MAC" .GOTO MAC .IF P1 = "LINK" .GOTO LINK .DISABLE QUIET ; ;***** ; ; When your system uses not only MCR as a CLI, include multiple CLI ; support in MCE ; .ASK CLS 'PRNAME' -- Want the multiple CLI support [ D:N ] ? ; ;***** ; ; When init file support is included MCE reads initialisation files which ; can contain Command definitions and CLI commands ; Files are searched in this order: .IFF CLS .GOTO 20$ ; LB:'INIUIC'MCEINI.xxx, followed by SY:MCEINI.xxx, ; where "xxx" is the name of the CLI defined for the terminal invoking MCE ; and "current directory" is the default directory at the startup of MCE. .GOTO 30$ .20$: ; LB:'INIUIC'MCEINI.CMD, followed by SY:MCEINI.CMD ; where "current directory" is the default directory at the startup of MCE. .30$: ; This algorithm divides command-definitions into 2 groups: ; A system-wide set in LB:'INIUIC', followed by a users privat set in SY: ; .ASK INI 'PRNAME' -- Want the MCEINI file support [D:N] ? ; ;***** ; ; MCE allows for the definitions of compound commands; Using the ampersand ; (&) sign one can define an MCE command as a sequence of multiple CLI- ; commands: E.g. STAT := TIM & DIR & ACT /ALL ...etc. ; .ASK CMP 'PRNAME' -- Want compound command definition support [ D:N ] ? ; ;***** ; ; It is possible to include statusline support. Line 24 can be used for ; status information. ; The statusline can be switched on/off with MCE STATus on/off ; .ASK STA 'PRNAME' -- Want Statusline/Statusmessage support [ D:N ] ? ; ;***** ; ; The startup and end messages like : ; ; "MCE -- CLI-commandline-Editor 'VERS'/VT2" and "MCE -- Exit" ; ; are optional. ; .ASK SIL 'PRNAME' -- Want Startup and exit messages [D:N] ? ; ;***** ; ; It is possible to define VT2xx and VT3xx functionkeys like : ; ; "F6 := TIM" ; .ASK VT2 'PRNAME' -- Want the VT2xx, VT3xx function key support [D:N] ? ; ;***** ; ; Also the keys of a TANDBERG TDV2230 can be defined. ; .ASK TD2 'PRNAME' -- Want the TANDBERG TDV2230 function key support [D:N] ? ; ;***** ; ; Some edit functions can be performed on the VT1xx/VT2xx/VT3xx keypad, ; simular to KED and EDT. ; .ASK EDT 'PRNAME' -- Want the EDT-Keypad support [D:N] ? ; ;***** ; ; When terminal time-out support is included the terminal is logged out ; after a given time-out time ( TT0: only exits MCE ) ; .SETF TMO .SETN TMON 4. .ASK TMO 'PRNAME' -- Want the terminal time-out support [D:N] ? .IFT TMO .ASKN [2.:120.:4.] TMON 'PRNAME' -- Enter number of time-out minutes [2..120 D:4] : ; ;***** ; ; Only commandlines with a length greater or equal to a given length ; are saved in the command FIFO ; .ASKN [1.:10.:1.] MINCHR 'PRNAME' -- Enter minimal commandline length to be saved [1..10 D:1] : ; ;***** ; .ASKN [1.:99.:23.] MAXFIF 'PRNAME' -- Enter maximal number of entries in FIFO [1..99 D:23.] : .SETF MU ; ;***** ; .IF EQ 6 .ASK MU 'PRNAME' -- Build MCE as a multi-user task [D:N] ? .IF P1 <> "ALL" .GOTO 40$ .SETT HLP .SETT COP .SETF INS .SETF PRI .GOTO 50$ .40$: ; ;***** ; ; A helpfile customized to your selections is created dynamicly if you ; answer "Y" to the following question. ; .ASK HLP 'PRNAME' -- Create helpfile on LB: [D:N] ? .SETF HLPNEW .IFT A$SV .OR .IFF HLP .GOTO 45$ .ASKS [::HLPUIC] HLPUIC 'PRNAME' -- What is your helpfile UIC [ D:'HLPUIC' ] : ; ;***** ; ; The helpfile can be created in two different versions ; ; Version 1 : You can access this one by typing HELP MCE [topic...] ; But you have to include a reference like ; 1 MCE ; @MCE ; in MCR.HLP and DCL.HLP ; ; Version 2 : You can access this one by typing HELP /MCE [topic...] ; This version does not need any editing of MCR.HLP and DCL.HLP ; .ASK HLPNEW 'PRNAME' -- Do you want Version 2 [D:N] ? .45$: .SETF INS ; ;***** ; .ASK COP 'PRNAME' -- When ready and successfull copy to LB: device [D:N] ? .IFT COP .ASKS [::SYSUIC] SYSUIC 'PRNAME' -- What is your task UIC [ D:'SYSUIC' ] : .IFT COP .ASK INS 'PRNAME' -- Install task [D:N] ? .ASK PRI 'PRNAME' -- Print listings [D:N] ? .50$: .IFF HLP .GOTO 80$ ;'PRNAME' -- Creating help ..... .OPEN LB:'HLPUIC'MCE.HLP .DATA MCE 'VERS' - Commandline Editor Utility Commands .DATA MCE supports all Line Editing Functions of VMS V4.0 .DATA .DATA - Switch between Overstrike and Insert mode .DATA Current mode is shown by first prompt character. .DATA "+" insert mode. "-" overstrike mode. .DATA or UP-ARROW - Retrieve previous Command .DATA DOWN-ARROW - Reverse of UP-ARROW (next command) .DATA or LEFT-ARROW - Move Cursor Left .DATA - Move Cursor to End of Line .DATA or RIGHT-ARR - Move Cursor Right .DATA or BACKSPACE - Move Cursor to Begin of Line .DATA - Delete Character Left of Cursor .DATA or LINEFEED - Delete Word Left of Cursor .DATA - Rewrite Line .DATA - Delete from Cursor to Begin of Line .DATA Additional Features: .DATA - Delete whole line .DATA - Delete from Cursor to End of Line .DATA - Save Command without executing .DATA - Enable output from other tasks: .DATA Detach TI:, Wait 10 seconds and Prompt again .DATA - Delete Character at Cursor .DATA - Delete Word Right at Cursor .DATA - Move word to the right or move from EOL to BOL .IFT VT2 .DATA or - Execute Command without waiting .IFF VT2 .DATA - Execute Command without waiting .IFF A$SV .IFT VT2 .DATA or - Gives HELP MCE .IFF A$SV .IFF VT2 .DATA - Gives HELP MCE .IFT A$SV .IFT VT2 .DATA or - Gives HELP ASV MCE .IFT A$SV .IFF VT2 .DATA - Gives HELP ASV MCE .DATA - Translate Command without execution .IFF VT2 .DATA - Recall Command previously requested. .IFT VT2 .DATA or - Recall Command previously requested. .DATA - Show Command Translation Buffer .DATA - Display previously requested Commands .IF MINCHR > 1 .DATA Default only Commands which contain 'MINCHR%D' or more characters are saved. .DATA Default the savebuffer can contain up to 'MAXFIF%D' commandlines. .IFT TMO .DATA Terminal time-out time support included ('TMON%D' minutes) .IFT EDT .DATA EDT-Keypad support included .IFT STA .DATA Statusline support included .IFT CMP .DATA Compound statement support included .IFF EDT .DATA More help : TRANS RECALL START EXIT INTERNAL FUNC .IFT EDT .DATA More help : TRANS RECALL START EXIT INTERNAL FUNC KEYPAD .IFF A$SV .IFT HLPNEW .DATA 1 TRANS .IFF A$SV .IFF HLPNEW .DATA 2 TRANS .IFT A$SV .DATA 3 TRANS .DATA A Command may be defined by: .DATA +>CNAM := .IFT CMP .DATA or +>CNAM := & & ... .DATA where CNAM is the commandname which will be substituted by the .DATA text at the right side of the ":=". .DATA NOTE: The ":=" must be prececed and followed by a single space. .IFF A$SV .DATA e.g.: +>HE := HELP MCE ! Followed by space, to append further text .IFT A$SV .DATA e.g.: +>HE := HELP ASV MCE ! Followed by space, to append further text .IFF A$SV .DATA +>HE ! Will request "HELP MCE" .IFT A$SV .DATA +>HE ! Will request "HELP ASV MCE" .DATA .DATA The translation may be performed without execution by (only .DATA displayed on terminal) .DATA .DATA If you enter a predefined command followed by additional text, .DATA this additional text will normally be appended as a whole. .IFF A$SV .DATA e.g.: +>HE TRAN ! Will request "HELP MCE TRAN" .IFT A$SV .DATA e.g.: +>HE TRAN ! Will request "HELP ASV MCE TRAN" .DATA or: +>HE TRAN ! Will be translated and displayed .IFF A$SV .DATA result +>HELP MCE TRAN .IFT A$SV .DATA result +>HELP ASV MCE TRAN .DATA .DATA You may delete a command translation entry by redefining it to null. .DATA e.g.: +>HE := ! Delete above definition .DATA .DATA It is also possible to allow abbreviatons of commands (as in DCL) .DATA by seperating the optional part by "*" .IFF A$SV .DATA e.g.: +>HM*CE := HELP MCE .IFT A$SV .DATA e.g.: +>HM*CE := HELP ASV MCE .DATA This command may now be requested with: .DATA +>HM or HMC or HMCE or HMCEXXX ect. .DATA .DATA More sophisticated substitution is possible by the Parameter-Substitution, .DATA similar to the indirect commandfile processor. .DATA e.g.: +>DIR*ECTORY := PIP ''P1''/LI .DATA +>COP*Y := PIP ''P2''/NV/CD=''P1'' .DATA +>DIR ! Will be translated into "PIP /LI" .DATA +>DIREC FIL ! Will be translated into "PIP FIL/LI" .DATA +>COPY A.CMD [200,200] ! Will simulate DCL COPY command .IFT INI .DATA Note that Command Definitions may be performed from the commandfile .IFT INI .IFF CLS .DATA LB:'INIUIC'MCEINI.CMD and SY:[cur_dir]MCEINI.CMD .IFT INI .IFT CLS .DATA LB:'INIUIC'MCEINI.xxx and SY:[cur_dir]MCEINI.xxx .IFT INI .DATA which will always be read when MCE is started. .IFT INI .DATA [cur_dir] is the default directory at the startup of MCE. .IFT INI .IFT CLS .DATA "xxx" = CLI name .IFT INI .DATA Files are read in order they are mentioned above. .DATA .IFF A$SV .IFT HLPNEW .DATA 1 FUNC .IFF A$SV .IFF HLPNEW .DATA 2 FUNC .IFT A$SV .DATA 3 FUNC .DATA You may request a command with function keys , , or .DATA It is also possible to request commands with control keys. (e.g. ) .IFT VT2 .DATA On a VT2xx you can also define the function keys .. and .IFT VT2 .DATA ect. .IFT TD2 .DATA On a TDV2230 you can also define the function keys ... .DATA Define the command translation as "''key'' := command". .DATA e.g. +>PF2 := TIM ! Redefine function key .DATA ! to display the current time .IFT VT2 .OR .IFT TD2 .DATA +>F6 := ACT ! Define F6 function key .IFT VT2 .OR .IFT TD2 .DATA ! to display the active tasks .IFT VT2 .DATA On a VT2XX the keys ect. must be entered as F$a where "a" is the .IFT VT2 .DATA first char. of the key function. e.g. "F$P" for .DATA Define a control key as follows: .DATA e.g. +>^X := SET /UIC ! Define key .DATA ! to display the current UIC .DATA Note that the following control-keys CANNOT be defined: .DATA = , , , , = .DATA Next to the rest of the Alphabetic characters the following keys can .DATA be defined : , , , .IFF A$SV .IFT HLPNEW .DATA 1 START .IFF A$SV .IFF HLPNEW .DATA 2 START .IFT A$SV .DATA 3 START .DATA Invoke MCE with command "MCE" (at best in your LOGIN file by ".XQT MCE"). .DATA A File of Command Definitions will be executed at MCE start time, .DATA the file may be specified in the form "MCE startup_file". .DATA If no startup file is specified in the commandline (the normal case), .DATA files are searched for are in this order: .IFT CLS .DATA LB:'INIUIC'MCEINI.xxx, followed by .IFT CLS .DATA SY:[cur_dir]MCEINI.xxx, .IFT CLS .DATA Where "xxx" is the name of the CLI defined for the terminal invoking MCE .IFT CLS .DATA and current directory is the default directory at the startup of MCE. .IFF CLS .DATA LB:'INIUIC'MCEINI.CMD, followed by .IFF CLS .DATA SY:[cur_dir]MCEINI.CMD, .IFf CLS .DATA [cur_dir] is the default directory at the startup of MCE. .DATA This algorithm divides command-definitions into 2 groups: .DATA A system-wide set in LB:'INIUIC', followed by a users privat set in SY:. .DATA Overriding the default file name in the commandline invoking MCE offers .DATA the possibility to tailor an application specific command set. .IFF A$SV .IFT HLPNEW .DATA 1 EXIT .IFF A$SV .IFF HLPNEW .DATA 2 EXIT .IFT A$SV .DATA 3 EXIT .DATA To exit MCE operations, use the "MCE EXIT" internal command. .DATA or .DATA More about internal commands see help MCE INTERNAL. .IFF A$SV .IFT HLPNEW .DATA 1 INTERNAL .IFF A$SV .IFF HLPNEW .DATA 2 INTERNAL .IFT A$SV .DATA 3 INTERNAL .DATA Two command verbs are specially handled by MCE: "BYE" and "MCE". .DATA "BYE" is sent to the CLI and MCE exits immediately. .DATA (Note,that you may define any other string (e.g. LOGOFF) to result .DATA in BYE.) .DATA Commands starting with "MCE" are treated as internal commands and .DATA not passed to the CLI. Following the verb "MCE " a 4 character action .DATA specifier defines the action wanted. .DATA Actions defined so far are: .IFT INI .DATA CHAI file: Chain from one INIT-file to another. (synonym for READ) .DATA CLEA : Delete all commands in command Fifo .DATA CMSZ n : Changes Minimal commandlinelength to be saved to "n" .DATA EXIT : MCE task exit (return to the normal command environment.) .DATA FISZ n : Changes Fifosize to "n" ( if enough memory ) .DATA FREE : Display MCE Pool info (largest_block:Total_free_blocks:fragments) .IFT EDT .DATA KEYP xx : Set Keypad editing on/off ( xx = on / off ) .DATA LIST : FIFO is a list : UP- and DOWN-ARROW stop at the end .DATA PURG : Delete all commands in translation table .IFT INI .DATA READ file: Read new command translations from file specified .IFT INI .DATA REPL file: Combines PURGe and READ. .IFT STA .DATA STAT xx : Statusline on/off/show ( xx = on / off / "blank" ) .DATA SVIN xx : Save internal commands on/off ( xx = on / off ) .DATA SVOL xx : Save "old" commands on/off ( xx = on / off ) .DATA RING : FIFO is a ringbuffer : UP- and DOWN-ARROW roll through the FIFO .DATA VERS : Show MCE Version .IFF INI .GOTO 60$ .DATA The read and replace options, if no file is specified, follow the .DATA the same file name convention as at startup: the file(s) according .DATA to the current CLI is read in, i.e. the command "MCE REPLace" .DATA effects in an MCE restart (but the FIFO buffer is kept), usefull .DATA after a SET TERMINAL new_cli command. .DATA When a space is given as filename, only SY:[cur_dir]MCEINI.xxx is read. .DATA [cur_dir] is the default directory at the startup of MCE. .60$: .IFF A$SV .IFT HLPNEW .DATA 1 RECAL .IFF A$SV .IFF HLPNEW .DATA 2 RECAL .IFT A$SV .DATA 3 RECALL .DATA Recalling a command is done by entering the first part of a command .DATA which was previously executed, termimated by the function key , .DATA or if VT2xx support is included . .DATA This will find the last command already executed starting with the .DATA string entered. The command may be edited or executed by pressing .DATA the return key. A second keystroke searches further back in the .DATA FIFO. When no string is entered, the last defined string is taken. .DATA Note that the function key may not have any superimposed .DATA translation defined (by defining "PF2 := ..."). .DATA Example: .DATA +>DIR X.DAT ! Previously entered commands .DATA +>DMP X.DAT .DATA +>.. .DATA +>D ! Will recall the last command starting with "D": .DATA +>DMP X.DAT .DATA +> ! Will recall the for last command: .DATA +>DIR X.DAT .DATA +>DI ! Will recall the command: .DATA +>DIR X.DAT .IFF EDT .GOTO 70$ .IFF A$SV .IFT HLPNEW .DATA 1 KEYPAD .IFF A$SV .IFF HLPNEW .DATA 2 KEYPAD .IFT A$SV .DATA 3 KEYPAD .DATA .DATA MCE-'VERS' VT10x / VT2xx / VT3xx Keypad : .DATA +--------+-----------------+ +--------+--------+--------+--------+ .DATA | | | |\\\\\\\\| | | | .DATA | HELP | EXECUTE NOWAIT | |\\GOLD\\| KPHELP | RECALL | DELLIN | .DATA | | | |\\\\\\\\| | | | .DATA +--------+--------+--------+ +--------+--------+--------+--------+ .DATA | | | | | | SHOCMD | SHOFIF | | .DATA | RECALL | | | | TRANSL | ------ | ------ | DELWRD | .DATA | | | | | |\\VERS\\|\\FREE\\| | .DATA +--------+--------+--------+ +--------+--------+--------+--------+ .DATA | | | | | | | | | .DATA | | | | | | | | DELCHR | .DATA | | | | | | | | | .DATA +--------+--------+--------+ +--------+--------+--------+--------+ .DATA | | | | EOL | | | .DATA | ^ | | WORD | ------ | | | .DATA | | | | |\DELLIN\| | | .DATA +--------+--------+--------+ +--------+--------+--------+ ENTER | .DATA | | | | | BEGLINE | | | .DATA | <- | | | -> | | --------------- | | | .DATA | | V | | |\\\\CLRLINE\\\\\\| | | .DATA +--------+--------+--------+ +-----------------+--------+--------+ .70$: .close 'cli' PIP LB:'HLPUIC'MCE.HLP/PU/NM .80$: ;'PRNAME' -- Creating build files ..... .open MCEASM.CMD .data ; .data ; MCE Macro buildfile .data ; Created on '' '