From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 14-NOV-1989 05:39
To:	MRGATE::"ARISIA::EVERHART"
Subj:	XEDT  1/1

Received: From SITSRV.STEVENS-TECH.EDU by CRVAX.SRI.COM with TCP; Mon, 13 NOV 89 23:28:40 PDT
Date: Tue, 14 Nov 89 02:06:34 EDT
From: U91_EDERYDER@VAXB.STEVENS-TECH.EDU (Buckaroo Banzai, a.k.a. Ed De Ryder 
 '91)
To: INFO-VAX@SRI.COM
Subject: XEDT  1/1
X-Vms-To: INFOVAX
Message-Id: <8910142635.21606745.U91_EDERYDER>

$! ................... Cut between dotted lines and save. ...................
$!...........................................................................
$! VAX/VMS archive file created by VMS_SHARE V06.10 7-FEB-1989.
$!
$! VMS_SHARE was written by James Gray (Gray:OSBUSouth@Xerox.COM) from
$! VMS_SHAR by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au).
$!
$! To unpack, simply save, concatinate all parts into one file and
$! execute (@) that file.
$!
$! This archive was created by user U91_EDERYDER (U91_EDERYDER@SITVXC)
$! on 14-NOV-1989 02:01:48.00.
$!
$! It contains the following 5 files:
$!        AAAREADME.DOC
$!        EDTINI.TMP
$!        LOGIN.TMP
$!        XEDT.BAS
$!        XLATE.BAS
$!
$!============================================================================
$ SET SYMBOL/SCOPE=( NOLOCAL, NOGLOBAL )
$ VERSION = F$GETSYI( "VERSION" )
$ IF VERSION .GES "V4.4" THEN GOTO VERSION_OK
$ WRITE SYS$OUTPUT "You are running VMS ''VERSION'; ", -
    "VMS_SHARE V06.10 7-FEB-1989 requires VMS V4.4 or higher."
$ EXIT 44 ! SS$_ABORT
$VERSION_OK:
$ GOTO START
$!
$UNPACK_FILE:
$ WRITE SYS$OUTPUT "Creating ''FILE_IS'"
$ DEFINE/USER_MODE SYS$OUTPUT NL:
$ EDIT/TPU/COMMAND=SYS$INPUT/NODISPLAY/OUTPUT='FILE_IS'/NOSECTION -
    VMS_SHARE_DUMMY.DUMMY
b_part := CREATE_BUFFER( "{Part}", GET_INFO( COMMAND_LINE, "file_name" ) )
; s_file_spec := GET_INFO( COMMAND_LINE, "output_file" ); SET( OUTPUT_FILE
, b_part, s_file_spec ); b_errors := CREATE_BUFFER( "{Errors}" ); i_errors 
:= 0; pat_beg_1 := ANCHOR & "-+-+-+ Beginning"; pat_beg_2 := LINE_BEGIN 
& "+-+-+-+ Beginning"; pat_end := ANCHOR & "+-+-+-+-+ End"; POSITION
( BEGINNING_OF( b_part ) ); LOOP EXITIF SEARCH( SPAN( ' ' )@r_trail 
& LINE_END, FORWARD) = 0; POSITION( r_trail ); ERASE( r_trail ); ENDLOOP
; POSITION( BEGINNING_OF( b_part ) ); i_append_line := 0; LOOP EXITIF MARK
( NONE ) = END_OF( b_part ); s_x := ERASE_CHARACTER( 1 )
; IF s_x = '+' THEN r_skip := SEARCH( pat_beg_1, FORWARD, EXACT ); IF r_skip 
<> 0 THEN s_x := ''; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ERASE_LINE; ENDIF
; ENDIF; IF s_x = '-' THEN r_skip := SEARCH( pat_end, FORWARD, EXACT )
; IF r_skip <> 0 THEN s_x := ''; MOVE_HORIZONTAL( -CURRENT_OFFSET ); m_skip 
:= MARK( NONE ); r_skip := SEARCH( pat_beg_2, FORWARD, EXACT ); IF r_skip 
<> 0 THEN POSITION( END_OF( r_skip ) ); MOVE_HORIZONTAL( -CURRENT_OFFSET )
; MOVE_VERTICAL( 1 ); MOVE_HORIZONTAL( -1 ); ELSE POSITION( END_OF( b_part ) 
); ENDIF; ERASE( CREATE_RANGE( m_skip, MARK( NONE ), NONE ) ); ENDIF; ENDIF
; IF s_x = 'V' THEN s_x := ''; IF i_append_line <> 0 THEN APPEND_LINE
; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ENDIF; i_append_line := 1
; MOVE_VERTICAL( 1 ); ENDIF; IF s_x = 'X' THEN s_x := ''; IF i_append_line 
<> 0 THEN APPEND_LINE; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ENDIF
; i_append_line := 0; MOVE_VERTICAL( 1 ); ENDIF; IF s_x <> '' THEN i_errors 
:= i_errors + 1; s_text := CURRENT_LINE; POSITION( b_errors ); COPY_TEXT
( "The following line could not be unpacked properly:" ); SPLIT_LINE
; COPY_TEXT( s_x ); COPY_TEXT( s_text ); POSITION( b_part ); MOVE_VERTICAL
( 1 ); ENDIF; ENDLOOP; POSITION( BEGINNING_OF( b_part ) ); LOOP r_x := SEARCH
( "`", FORWARD, EXACT ); EXITIF r_x = 0; POSITION( r_x ); ERASE_CHARACTER( 1 
); COPY_TEXT( ASCII( INT( ERASE_CHARACTER( 3 ) ) ) ); ENDLOOP
; IF i_errors = 0 THEN SET( NO_WRITE, b_errors, ON ); ELSE POSITION
( BEGINNING_OF( b_errors ) ); COPY_TEXT( FAO
( "The following !UL errors were detected while unpacking !AS", i_errors
, s_file_spec ) ); SPLIT_LINE; SET( OUTPUT_FILE, b_errors, "SYS$COMMAND" )
; ENDIF; EXIT; 
$ DELETE VMS_SHARE_DUMMY.DUMMY;*
$ CHECKSUM 'FILE_IS
$ WRITE SYS$OUTPUT " CHECKSUM ", -
  F$ELEMENT( CHECKSUM_IS .EQ. CHECKSUM$CHECKSUM, ",", "failed!!,passed." )
$ RETURN
$!
$START: 
$ FILE_IS = "AAAREADME.DOC"
$ CHECKSUM_IS = 942758417
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X
X
X                              EDT Spawner
X
X
V       The following files allow you to SPAWN out of EDT into DCL, instead of
X`032
XEXiting and saving the file.
X
X       LOGIN.TMP
X       EDTINI.TMP
X       XEDT.BAS
X       XLATE.BAS
X
V       In order to accomplish the feat of SPAWNing out of EDT follow these`03
X2
Xinstructions:
X
X       First, we will make the program which allows all of this:
X
XBASIC XEDT,XLATE
XLINK /NOTRACE XEDT,XLATE
X
X       Place the file just created, XEDT.EXE, in your SYS$LOGIN directory.
X
V       Edit your LOGIN.COM. Enter Ctrl-Z without typing QUIT or EXIT. Type`03
X2
X
XINCLUDE LOGIN.TMP
XEXIT
X
V       Then edit your EDTINI.EDT file. If you don't have one, this will creat
Xe`032
Xone. Then hit Ctrl-Z without EXIT or QUIT. Then:
X
XINCLUDE EDTINI.TMP
XEXIT
X
V       Now comes the fun part. If you look at your LOGIN.COM you will see tha
Xt`032
Vyou now have two more logicals, EDT and EDTINI defined. I have defined them f
Xor`032
VSYS$LOGIN. Feel free to relocate the files, EDTINI.EDT and XEDT.EXE, and chan
Xge`032
Xthe logical definitions to your own specifications. I also have defined:
X
XED*IT   :==   EDIT /EDT
X
V       You can change this to any command of your choice. The EDIT /EDT is`03
X2
Vimportant to make this run. It looks for the EDT logical first, and finds it`
X032
Xin the form of XEDT.EXE. This subsequently runs actual EDT.
X
V       If you also want you can edit the XLATE.BAS program to change the resu
Xlt`032
Xmessages located in the quotes in BASIC line 100. Where it says`032
V"EDT Spawned -->" you can substitute your own prompt. Just be sure to recompi
Xle`032
Xand relink the programs as defined in the instructions above.
X
X       FInal note: You will be running Xedt, according to FINGER. You can`032
X
XRENAME XEDT.EXE EDT.EXE`032
X
Xin order to be seen in EDT.
X
V       To actually SPAWN, enter Ctrl-Z and type SPAWN at the * prompt. Then`0
X32
XLOGOUT to return to editing.
X
V       If you have any questions please direct them to me whenever you feel`0
X32
Xlike. Signing off...
X
X`009`009`009`009`009Buckaroo Banzai
X`009`009`009`009`009a.k.a.
X`009`009`009`009`009Ed De Ryder '91
X`009`009`009`009`009U91_EDERYDER@STEVENS.BITnet
X`009`009`009`009`009U91_EDERYDER@VAXC.STEVENS-TECH.EDU
X
VP.S.  This comes from the old VAXTOOLS magazine.  It is a summary of the thre
Xe`032
X      separate articles on spawning out of EDT.
X
$ GOSUB UNPACK_FILE

$ FILE_IS = "EDTINI.TMP"
$ CHECKSUM_IS = 724323086
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
XDEFINE MACRO SPAWN
XINSERT=SPAWN;CHANGE;XLATE SPAWN `026EX
XFIND = MAIN.
$ GOSUB UNPACK_FILE

$ FILE_IS = "LOGIN.TMP"
$ CHECKSUM_IS = 1176841250
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X$ ! ********************************************************************
X
X$ ED*IT   :==   EDIT /EDT
X
X$ DEFINE /NOLOG EDT SYS$LOGIN:XEDT.EXE
X$ DEFINE /NOLOG EDTINI SYS$LOGIN:EDTINI.EDT
X
X$ ! ********************************************************************
$ GOSUB UNPACK_FILE

$ FILE_IS = "XEDT.BAS"
$ CHECKSUM_IS = 327104992
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X1`009EXTERNAL INTEGER FUNCTION `009CLI$GET_VALUE,`009`009&
X`009`009`009`009`009CLI$PRESENT,`009`009&
X`009`009`009`009`009EDT$EDIT
X
X`009EXTERNAL INTEGER CONSTANT`009CLI$_NEGATED,`009`009&
X`009`009`009`009`009CLI$_PRESENT,`009`009&
X`009`009`009`009`009EDT$M_NOCOMMAND,`009&
X`009`009`009`009`009EDT$M_NOCREATE,`009`009&
X`009`009`009`009`009EDT$M_NOJOURNAL,`009&
X`009`009`009`009`009EDT$M_NOOUTPUT,`009`009&
X`009`009`009`009`009EDT$M_RECOVER,`009`009&
X`009`009`009`009`009SS$_NORMAL
X
X`009EXTERNAL INTEGER`009`009XLATE_ROUTINE
X
X`009DIMENSION INTEGER`009`009PASS_XLATE_ROUTINE(1%)
X
X100`009IF CLI$PRESENT("INPUT") = CLI$_PRESENT
X`009   THEN CALL CLI$GET_VALUE ("INPUT", INPUT_FILE$)
X
X110`009IF CLI$PRESENT("COMMAND") = CLI$_NEGATED
X`009   THEN OPTIONS% = OPTIONS% OR EDT$M_NOCOMMAND
X`009   ELSE CALL CLI$GET_VALUE("COMMAND",COMMAND_FILE$)
X
X120`009IF CLI$PRESENT("CREATE") = CLI$_NEGATED
X`009   THEN OPTIONS% = OPTIONS% OR EDT$M_NOCREATE
X
X130`009IF CLI$PRESENT("JOURNAL") = CLI$_NEGATED
X`009   THEN OPTIONS% = OPTIONS% OR EDT$M_NOJOURNAL
X`009   ELSE CALL CLI$GET_VALUE("JOURNAL",JOURNAL_FILE$)
X
X140`009IF CLI$PRESENT("OUTPUT") = CLI$_NEGATED
X`009   THEN OPTIONS% = OPTIONS% OR EDT$M_NOOUTPUT
X`009   ELSE CALL CLI$GET_VALUE("OUTPUT",OUTPUT_FILE$)
X
X150`009IF CLI$PRESENT("READ_ONLY") = CLI$_PRESENT
X`009   THEN OPTIONS% = OPTIONS% OR EDT$M_NOJOURNAL OR EDT$M_NOOUTPUT
X
X160`009IF CLI$PRESENT("RECOVER") = CLI$_PRESENT
X`009   THEN OPTIONS% = OPTIONS% OR EDT$M_RECOVER
X
X500`009PASS_XLATE_ROUTINE(0%) = LOC(XLATE_ROUTINE)
X`009STATUS% = EDT$EDIT(INPUT_FILE$,OUTPUT_FILE$,COMMAND_FILE$,`009&
X`009`009  JOURNAL_FILE$,OPTIONS%, , ,PASS_XLATE_ROUTINE(0%) BY REF)
X`009CALL LIB$STOP(STATUS% BY VALUE)`009`009IF STATUS% <> SS$_NORMAL
X
X32767   END
$ GOSUB UNPACK_FILE

$ FILE_IS = "XLATE.BAS"
$ CHECKSUM_IS = 325209684
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X1`009!+
X`009!      XLATE_ROUTINE Ver. 1.0
X`009!-
X
X`009FUNCTION LONG XLATE_ROUTINE(COMMAND$)
X
X`009EXTERNAL INTEGER FUNCTION`009`009`009LIB$SPAWN
X
X`009EXTERNAL INTEGER CONSTANT`009`009`009SS$_NORMAL
X
X100`009SELECT EDIT$(COMMAND$,128%+32%+8%)
X
X`009CASE "SPAWN"
X
X`009`009CALL SMG$CREATE_PASTEBOARD(PASTEBOARD_ID%)
X`009`009CALL SMG$DELETE_PASTEBOARD(PASTEBOARD_ID%)
X`009`009CALL LIB$PUT_OUTPUT("Spawning to DCL...")
X`009`009CALL LIB$PUT_OUTPUT(" ")
X`009`009STATUS% = LIB$SPAWN(,"SYS$COMMAND:","SYS$OUTPUT:",`009&
X`009`009`009  , , , , , , , "EDT Spawned --> ",)
X`009`009IF (STATUS% AND SS$_NORMAL) <> SS$_NORMAL
X`009`009   THEN CALL LIB$PUT_OUTPUT("Error spawning subprocess.")
X`009`009`009CALL LIB$GET_INPUT(ASK$,"Press Enter to continue...")
X`009`009END IF
X`009`009COMMAND$ = "REF"
X
X`009CASE ELSE
X`009`009COMMAND$ = "BELL"
X
X`009END SELECT
X
X `009XLATE_ROUTINE = SS$_NORMAL
X`009EXIT FUNCTION
X
X32767   END FUNCTION
$ GOSUB UNPACK_FILE
$ EXIT
------------

