$ Set Noon ! Don't stop yet: 'F$VERIFY(F$LOGI("FORMS$FDE_SUBPROC_DEBUG")) $ SET = "SET" $ ON = "ON" $ Set Noon !In case SET was re-defined $ On Control_Y Then Goto ctrl_y_exit ! CTRL-Y handler $ Set Control=(T,Y) ! Allow CTRL-Y $!----------------------------------------------------------------------------- $! $! COPYRIGHT (c) 1987,1989,1992 BY $! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. $! $! This software is furnished under a license and may be used and copied $! only in accordance with the terms of such license and with the $! inclusion of the above copyright notice. This software or any other $! copies thereof may not be provided or otherwise made available to any $! other person. No title to and ownership of the software is hereby $! transferred. $! $! The information in this software is subject to change without notice $! and should not be construed as a commitment by Digital Equipment $! Corporation. $! $! Digital assumes no responsibility for the use or reliability of its $! software on equipment which is not supplied by Digital. $! $!----------------------------------------------------------------------------- $! $! Facility: $! DECforms (text editing subprocess) $! $! Parameters: $! $! P1 = IFDL file (is blank for built-in TPU/LSE editing) $! [Other-Editor (non-LSE/TPU) Support, $! *** NOT SPECIFIED OTHERWISE *** ] $! (file to be edited = output file name) $! If the editor command string is simply the name of the editor, $! the input (and output) filename must be appended to the $! editor name in order to form a complete DCL command. $! (There can only be one file parameter. $! Thus, the edit session results in the output file.) $! $! P2 = Starting Line Number $! [Other-Editor (non-LSE/TPU) Support, optional] $! The editor command format string may specify an editor command $! which can use the starting line number. $! (The initial editing position is specified by the line number.) $! $! P3 = DCL command to execute $! (Editor Command Format String) $! Note: This may only be the editor name. $! $! $! Modification History: $! $! 11-Aug-87 DEC Original version $! 16-Nov-87 DEC Include debug logical in initial f$verify statement $! 24-Jul-91 JDN Include other-editor/editor command format support $! 10-Jan-92 DEC Renumber P1,P2,P3, fix logic $! $!----------------------------------------------------------------------------- $! $! $! Reset commands we use $! $ DEFINE = "DEFINE" $ EXIT = "EXIT" $ GOTO = "GOTO" $ IF = "IF" $ return_status = 0 !default is error $! $! Name of parameters $! $ EDIT_COMMAND = P3 $ FILE_NAME = P1 !See comment about P1 below $ START_LINE = P2 !See comment about P2 below $! $! $! Point SYS$INPUT to the terminal, and execute the command $! $ Define Sys$Input 'F$trnlnm("SYS$OUTPUT")' /Nolog $! $! Strip off the leading "$" if there is one $! $ EDIT_COMMAND = f$edit(EDIT_COMMAND, "TRIM,UPCASE") $ IF f$extract(0, 1, EDIT_COMMAND) .EQS. "$" $ THEN $ EDIT_COMMAND = EDIT_COMMAND - "$" $ ENDIF $! $! If this procedure is called to support editor command format strings, $! (typically non-LSE/TPU editors), then the edit command must be checked $! to assure it is complete. $! $! e.g. If only the EDT editor was specified, the input/output filename $! must be appended to the editor command format string. $! $ IF FILE_NAME .NES. "" $ THEN $! $! There is an input/output filename, so the editor command format string $! must be checked for completeness. $! $! Define a symbol for EDT, if one does not already exist, to avoid $! a possible DCL command error. $! $ If "''EDT'" .EQS. "" THEN EDT = "EDIT/EDT" $! $! If the filename wasn't included append the filename to the editing $! command string to complete the DCL command. $! $! If the user specified a 'P1, then DCL will put the filename in for $! us later. If no 'P1 is embedded in the command, then we append the $! filename by hand here. $! $ IF f$locate("'P1",EDIT_COMMAND) .eq. f$length(EDIT_COMMAND) $ THEN $ EDIT_COMMAND = EDIT_COMMAND + " " + FILE_NAME $ ENDIF $! $! An editing command string was specified, let the system's command $! language interpreter perform symbol substitution to build and perform $! the editing command. $! $ ENDIF $! $! Embeded in EDIT_COMMAND is "'P2'". It's substituted for within the next line $! by DCL, as it parses the line twice. ("'P1'" may also be in the edit $! command) $! $ 'EDIT_COMMAND' !execute the DCL editing command $! $ EXIT '$STATUS' $! $! Control-Y handler $! $CTRL_Y_EXIT: $! $ EXIT 0