From:	HENRY::IN%"GREGG%nemo.math.okstate.EDU%relay.cs.net@RCA.COM" 31-OCT-1987 19:20
To:	VI-TO@nemo.math.okstate.edu
Subj:	VI part 3 of 14

....................... Cut between dotted lines and save ......................
$!..............................................................................
$! VAX/VMS archive file created by VMS_SHAR V-4.03 05-Aug-1987
$! which was written by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au)
$! To unpack, simply save and execute (@) this file.
$!
$! This archive was created by GREGG
$!      on Tuesday 20-OCT-1987 22:13:52.28
$!
$! It contains the following 3 files:
$! README. VI.RNT VIDOC.COM
$!==============================================================================
$ Set Symbol/Scope=(NoLocal,NoGlobal)
$ Version=F$GetSYI("VERSION") ! See what VMS version we have here:
$ If Version.ges."V4.4" then goto Version_OK
$ Write SYS$Output "Sorry, you are running VMS ",Version, -
                ", but this procedure requires V4.4 or higher."
$ Exit 44
$Version_OK: CR[0,8]=13
$ Pass_or_Failed="failed!,passed."
$ Goto Start
$Convert_File:
$ Read/Time_Out=0/Error=No_Error1/Prompt="creating ''File_is'" SYS$Command ddd
$No_Error1: Define/User_Mode SYS$Output NL:
$ Edit/TPU/NoSection/NoDisplay/Command=SYS$Input/Output='File_is' -
        VMS_SHAR_DUMMY.DUMMY
f:=Get_Info(Command_Line,"File_Name");b:=Create_Buffer("",f);
o:=Get_Info(Command_Line,"Output_File");Set (Output_File,b,o);
Position (Beginning_of(b));Loop x:=Erase_Character(1); Loop ExitIf x<>"V";
Move_Vertical(1);x:=Erase_Character(1);Append_Line;Move_Horizontal
(-Current_Offset);EndLoop;Move_Vertical(1);ExitIf Mark(None)=End_of(b)
EndLoop;Exit;
$ Delete VMS_SHAR_DUMMY.DUMMY;*
$ Checksum 'File_is
$ Success=F$Element(Check_Sum_is.eq.CHECKSUM$CHECKSUM,",",Pass_or_Failed)+CR
$ Read/Time_Out=0/Error=No_Error2/Prompt=" CHECKSUM ''Success'" SYS$Command ddd
$No_Error2: Return
$Start:
$ File_is="[.DOC]README."
$ Check_Sum_is=241714188
$ if f$search("DOC.DIR;1") .eqs. "" then -
     CREATE/LOG/DIRECTORY [.DOC]
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
XThere are 13 parts to the distribution of VI written in TPU.  The first,
Xthis file, is a plain text file.  The remainder, are DCL command files.
XFiles 2-13 should each be executed as DCL procedures in sequence.  Below
Xis a sequence of steps that should allow you to get VI up and running.
X
X    1)  You should pick a directory to place VI under, and place all 13 files
X        in that directory.  Then, you can begin extracting.  Three directories
X        will be created, [.SRC], [.EXE], and [.DOC].  The directory names
X        should reveal the purposes of these directories. 
X
X    2)  Place all 13 of the VI parts into the directory chosen in step 1.
X        For each part, 2 through 13, execute the file as a command procedure
X        using the command "@<filename>", where <filename> is the name of
X        the file to execute (e.g. @VI_2.COM, followed by @VI_3.COM, etc).
X
X    3)  After executing the 13th command file, you should set default to the
X        [.SRC] directory, and use the commands "$ @make exe", and "$ @make
X        tpusubs" to create the VI.EXE executable, and the CALL_USER routines
X        for VI to use. 
X
X    4)  Next, set default to [-.DOC] (from the SRC directory), and execute
X        the command "$ VIDOC", and "$ @VIDOC HELP" to create a printable
X        version of the current documentation, as well as a HELP file
X        that VI can use.  When asked the question:
X
X            Name of library to install HELP files in?
X
X        you should probably answer with the full path to the current
X        directory.  VI.TPU contains the path VI$ROOT:[DOC]VI.HLB as the place
X        where it will work from, so if you do not place the help file in this
X        library (It will automatically be created for you), then you must
X        edit VI.TPU to contain the proper path.
X
X    5)  Here you have a decision to make.  I have written a interface to
X        callable TPU, [-.SRC]VI.MAR.  If you wish to use this interface,
X        then there must be a CLD definition for it installed in DCLTABLES.
X        This is really only necessary for using VI as a SUB-process, but
X        I find it conveinent to install the CLD so that I do not have
X        to wait for SET COMMAND to complete when I log in.  If do not
X        wish to use the callable TPU interface then go to the next step NOW,
X        otherwise hang tight.
X
X        The CLD definition that needs to be installed is in [-.EXE]VI.CLD.  If
X        you do not have sufficient privileges to install a new DCLTABLES you
X        should get prepared to do so, or find someone that will do it for you
X        (now is not entirely necessary, as you can skip to step 6, and do this
X        later). 
X
X        a)  Take the time to examine the CLD, and make sure it is ok for
X            your installation.  If you are on a cluster, then there is
X            some extra work that I won't describe here since I have never
X            done it.  Basically you need to do the following set of commands.
X            (the dollar signs are provide by DCL in case it wasn't obvious).
X
X            $ SET COMMAND [-.EXE]VI.CLD/TABLE=SYS$SHARE:DCLTABLES.EXE/OUT=-
X            _$ SYS$SHARE:DCLTABLES.EXE
X            $ MCR INSTALL
X            INSTALL>SYS$SHARE:DCLTABLES/REPLACE
X            INSTALL>EXIT
X
X        b)  This should be all that single CPU sites need to do.  If you
X            have a different arrangement at your sight that requires
X            something different, then you would know that better than I.
X            Remeber that you MUST logout and log back in to have the updated
X            DCLTABLES available to your process.  Step 8, below, can not be
X            done unless you either 1) do not do (c) below, or 2) you logout and
X            log back in after reinstalling DCLTABLES.
X
X        c)  [-.EXE]VI.COM, and [-.EXE]VISETUP.COM contain uses of the symbol,
X            "VI".  This symbol is normally equated to "EDIT/TPU".  Once you
X            have made the changes necessary to update DCLTABLES, then these
X            references should be changed.  In [-.EXE]VI.COM, change VI to
X            be "VI", instead of "EDIT/TPU".  In [-.EXE]VISETUP.COM, delete
X            the assignment to the variable VI, as the comment there says
X            to.
X
X    6)  Next, set default to [-.EXE] (from [.DOC]), and edit the file
X        VISETUP.COM.  This file must be executed by each user wishing to
X        use VI before they can use it.  You should change the definition of
X        VI$ROOT to be the parent directory of the directory you are in NOW.
X        E.g. if you are in the directory DUA0:[PUBLIC.VI.DOC], then VI$ROOT
X        should be defined to be DUA0:[PUBLIC.VI.].  Note that this file
X        potentially defines 3 symbols.  VI allows normal use of VI, VIS
X        allows use of the VI.COM procedure to run VI in a subprocess, and
X        VIEW allows READONLY editing of a file (as in UNIX).
X
X    7)  The command file VI.COM is used to envoke VI in a sub-process
X        so that a minimal amount of overhead for image activation will
X        be incurred by the system.  In the VI.COM that you have, there
X        are invocations of a SUSPEND, and a RESUME command.  I use these
X        commands to suspend kept editors while they are not it use so that
X        they will be swapped out or trimmed by the SWAPPER in a more timely
X        manner.  This will allow their memory to be put to use by other
X        processes whenever possible.  If you do not wish to do this and/or
X        do not have these facilities available to you, then you should comment
X        out these command lines.
X
X    8)  Next, you should be ready to give VI a trial run.  Execute the
X        VISETUP.COM procedure in [.EXE].  Then type VI, and hit return.
X        You should be off and running.
$ GoSub Convert_File
$ File_is="[.DOC]VI.RNT"
$ Check_Sum_is=1579303003
$ if f$search("DOC.DIR;1") .eqs. "" then -
     CREATE/LOG/DIRECTORY [.DOC]
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X.! DSRTOC version V2.1-09
X.! RUNOFF/CONTENTS/OUT=VI.RNT VI.BRN
X.SAVE
X.NO FLAGS ALL
X.NO FLAGS BREAK		.NO FLAGS CAPITALIZE	.NO FLAGS ENDFOOTNOTE
X.NO FLAGS HYPHENATE	.NO FLAGS INDEX		.NO FLAGS PERIOD
X.NO FLAGS SPACE		.NO FLAGS SUBSTITUTE
X.FLAGS ACCEPT _		.FLAGS BOLD *		.FLAGS COMMENT !
X.FLAGS LOWERCASE \	.FLAGS OVERSTRIKE %	.FLAGS UNDERLINE &
X.FLAGS UPPERCASE ^
X.FLAGS ALL
X.NO FILL		.NO JUSTIFY
X.LEFT MARGIN 8		.RIGHT MARGIN 70	.PAGE SIZE , 70
X.CENTER;CONTENTS
X.BLANK
X.TEST PAGE 2
X
X1       Table of contents  . . . . . . . . . . . . . . . . . 2
X.ifnot global
X2       Purpose of this document . . . . . . . . . . . . . . 4
X.endif global
X.ifnot global
X3       Introduction to VI . . . . . . . . . . . . . . . . . 4
X.endif global
X.ifnot global
X4       Extensions to VI . . . . . . . . . . . . . . . . . . 4
X.endif global
X.ifnot global
X5       Using an initialization file . . . . . . . . . . . . 5
X.endif global
X.ifnot global
X6       Supported EX mode commands . . . . . . . . . . . . . 5
X.endif global
X.if global
X6_.1       Abort edit . . . . . . . . . . . . . . . . . . . . 6
X.endif global
X.ifnot global
X6_.2       Change output file . . . . . . . . . . . . . . . . 6
X.endif global
X.ifnot global
X6_.3       Compile TPU  . . . . . . . . . . . . . . . . . . . 6
X.endif global
X.ifnot global
X6_.4       Copy lines . . . . . . . . . . . . . . . . . . . . 7
X.endif global
X.ifnot global
X6_.5       Create buffers . . . . . . . . . . . . . . . . . . 7
X.endif global
X.ifnot global
X6_.6       Create key macro . . . . . . . . . . . . . . . . . 7
X.endif global
X.ifnot global
X6_.7       Delete buffers . . . . . . . . . . . . . . . . . . 7
X.endif global
X.ifnot global
X6_.8       Delete lines . . . . . . . . . . . . . . . . . . . 8
X.endif global
X.ifnot global
X6_.9       Edit new file  . . . . . . . . . . . . . . . . . . 8
X.endif global
X.ifnot global
X6_.10      Execute command file . . . . . . . . . . . . . . . 8
X.endif global
X.ifnot global
X6_.11      Fill text region . . . . . . . . . . . . . . . . . 8
X.endif global
X.ifnot global
X6_.12      Goto Line  . . . . . . . . . . . . . . . . . . . . 8
X.endif global
X.ifnot global
X6_.13      Goto tag in file . . . . . . . . . . . . . . . . . 9
X.endif global
X.ifnot global
X6_.14      Help . . . . . . . . . . . . . . . . . . . . . . . 9
X.endif global
X.ifnot global
X6_.15      Invert case  . . . . . . . . . . . . . . . . . . . 9
X.endif global
X.ifnot global
X6_.16      Learn Key Strokes  . . . . . . . . . . . . . . . . 9
X.endif global
X.ifnot global
X6_.17      Lower case . . . . . . . . . . . . . . . . . . .  10
X.endif global
X.ifnot global
X6_.18      Message buffer . . . . . . . . . . . . . . . . .  10
X.endif global
X.ifnot global
X6_.19      Move lines . . . . . . . . . . . . . . . . . . .  10
X.endif global
X.ifnot global
X6_.20      Next file  . . . . . . . . . . . . . . . . . . .  10
X.endif global
X.ifnot global
X6_.21      Perform Macros . . . . . . . . . . . . . . . . .  10
X.endif global
X.ifnot global
X6_.22      Previous file  . . . . . . . . . . . . . . . . .  10
X.endif global
X.ifnot global
X6_.23      Read file into buffer  . . . . . . . . . . . . .  11
X.endif global
X.ifnot global
X6_.24      Rewind file list . . . . . . . . . . . . . . . .  11
X.endif global
X.ifnot global
X6_.25      Select regions . . . . . . . . . . . . . . . . .  11
X.endif global
X.ifnot global
X6_.26      Set default dir  . . . . . . . . . . . . . . . .  11
X.endif global
X.ifnot global
X6_.27      Set options  . . . . . . . . . . . . . . . . . .  11
X.endif global
X.ifnot global
X6_.28      Show buffers . . . . . . . . . . . . . . . . . .  12
X.endif global
X.ifnot global
X6_.29      Show file list . . . . . . . . . . . . . . . . .  12
X.endif global
X.ifnot global
X6_.30      Show Tags  . . . . . . . . . . . . . . . . . . .  12
X.endif global
X.ifnot global
X6_.31      Spawn command  . . . . . . . . . . . . . . . . .  12
X.endif global
X.ifnot global
X6_.32      Spawn subprocess . . . . . . . . . . . . . . . .  13
X.endif global
X.ifnot global
X6_.33      Substitution . . . . . . . . . . . . . . . . . .  13
X.endif global
X.ifnot global
X6_.34      Text Abbreviations . . . . . . . . . . . . . . .  13
X.endif global
X.ifnot global
X6_.35      Unmap key macros . . . . . . . . . . . . . . . .  13
X.endif global
X.ifnot global
X6_.36      Upper case . . . . . . . . . . . . . . . . . . .  14
X.endif global
X.ifnot global
X6_.37      Write buffer . . . . . . . . . . . . . . . . . .  14
X.endif global
X.ifnot global
X6_.38      Write and exit . . . . . . . . . . . . . . . . .  14
X.endif global
X.ifnot global
X7       Set options  . . . . . . . . . . . . . . . . . . .  15
X.endif global
X.ifnot global
X7_.1       Auto Send to DCL . . . . . . . . . . . . . . . .  15
X.endif global
X.ifnot global
X7_.2       Auto line wrap . . . . . . . . . . . . . . . . .  15
X.endif global
X.ifnot global
X7_.3       Auto write . . . . . . . . . . . . . . . . . . .  15
X.endif global
X.ifnot global
X7_.4       Case insensitive search  . . . . . . . . . . . .  16
X.endif global
X.ifnot global
X7_.5       Change file list . . . . . . . . . . . . . . . .  16
X.endif global
X.ifnot global
X7_.6       Error Bells  . . . . . . . . . . . . . . . . . .  16
X.endif global
X.ifnot global
X7_.7       Expand tabs  . . . . . . . . . . . . . . . . . .  16
X.endif global
X.ifnot global
X7_.8       Line report  . . . . . . . . . . . . . . . . . .  16
X.endif global
X.ifnot global
X7_.9       No write . . . . . . . . . . . . . . . . . . . .  17
X.endif global
X.ifnot global
X7_.10      Paragraph delimiters . . . . . . . . . . . . . .  17
X.endif global
X.ifnot global
X7_.11      Regular expression use . . . . . . . . . . . . .  17
X.endif global
X.ifnot global
X7_.12      Screen length  . . . . . . . . . . . . . . . . .  17
X.endif global
X.ifnot global
X7_.13      Screen width . . . . . . . . . . . . . . . . . .  18
X.endif global
X.ifnot global
X7_.14      Scroll amount  . . . . . . . . . . . . . . . . .  18
X.endif global
X.ifnot global
X7_.15      Section delimiters . . . . . . . . . . . . . . .  18
X.endif global
X.ifnot global
X7_.16      Shift width  . . . . . . . . . . . . . . . . . .  18
X.endif global
X.ifnot global
X7_.17      Tab stops  . . . . . . . . . . . . . . . . . . .  19
X.endif global
X.ifnot global
X7_.18      Tag Case . . . . . . . . . . . . . . . . . . . .  19
X.endif global
X.ifnot global
X7_.19      Tags files . . . . . . . . . . . . . . . . . . .  19
X.endif global
X.ifnot global
X7_.20      Type ahead . . . . . . . . . . . . . . . . . . .  19
X.endif global
X.ifnot global
X7_.21      Undo and maps  . . . . . . . . . . . . . . . . .  20
X.endif global
X.ifnot global
X7_.22      Wrap on search . . . . . . . . . . . . . . . . .  20
X.endif global
X.ifnot global
X8       Additional key strokes . . . . . . . . . . . . . .  20
X.endif global
X.ifnot global
X8_.1       Key pad keys used  . . . . . . . . . . . . . . .  20
X.endif global
X.ifnot global
X8_.2       Keyboard keys used . . . . . . . . . . . . . . .  21
X.endif global
X.ifnot global
X9       Windows and buffers  . . . . . . . . . . . . . . .  22
X.endif global
X.ifnot global
X10      Display differences  . . . . . . . . . . . . . . .  22
X.endif global
X.ifnot global
X11      Tag files  . . . . . . . . . . . . . . . . . . . .  22
X.endif global
X.ifnot global
X12      Kept Editors . . . . . . . . . . . . . . . . . . .  23
X.endif global
X.ifnot global
X13      Other TPU's  . . . . . . . . . . . . . . . . . . .  23
X.endif global
X.ifnot global
X14      The DCL buffer . . . . . . . . . . . . . . . . . .  23
X.endif global
X.RESTORE
$ GoSub Convert_File
$ File_is="[.DOC]VIDOC.COM"
$ Check_Sum_is=1013860670
$ if f$search("DOC.DIR;1") .eqs. "" then -
     CREATE/LOG/DIRECTORY [.DOC]
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X$ ! This command procedure builds copies of the various
X$ ! VI documentation files
X$ !
X$ DO="@[-.EXE]DO"
X$ IF F$LOGICAL ("VI$ROOT") .NES. "" THEN DO="@[EXE]DO"
X$ !
X$ RM=""
X$ IF P2 .NES. "" THEN RM=P2
X$ IF P1 .NES. "" THEN GOTO 'P1'
X$ !
X$ ! Build the printable manual by default
X$ !
X$ MANUAL:
X$	VARS="MANUAL" ! Actually there is no such variant, but something is needed
X$	EXT="MEM"
X$	IF RM .EQS. "" THEN RM=8
X$	GOTO PROCESS
X$ !
X$ ! Build the on-line help manual
X$ !
X$ HELP:
X$	VARS="SYSTEM"
X$	EXT="HLP"
X$	IF RM .EQS. "" THEN RM=0
X$	GOTO FINAL
X$ !
X$ PROCESS:
X$ !
X$	DO RUNOFF/LOG/OUT=NLA0:/RIGHT='RM'/INTERMEDIATE/MESS=USER/VAR='VARS' -
X           VI.RNO
X$ !
X$ ! Do the table of contents
X$ !
X$	DO RUNOFF/CONTENTS/OUT=VI.RNT VI.BRN
X$ !
X$ FINAL:
X$	DO RUNOFF/LOG/OUT=VI.'EXT'/RIGHT='RM'/MESS=USER/VAR='VARS' VI.RNO
X$	DO PURGE VI.'EXT',VI.RNT
X$ !
X$	DO DELETE VI.BRN;*
X$ !
X$	IF P1 .NES. "HELP" THEN EXIT
X$ !
X$ INSTALL_HELP:
X$ !
X$ ! Reinstall help file
X$ !
X$	WRITE SYS$OUTPUT " "
X$   IF F$SEARCH("VI.HLB") .EQS. "" THEN DO LIB/LOG/CREATE/HELP VI
X$	INQUIRE/NOPUNCT HELPLIB "Name of library to install HELP files in? "
X$	DO LIB/REPLACE/HELP 'HELPLIB' VI.'EXT'
X$	EXIT
X$ !
X$ ! Just install the HELP file
X$ !
X$ HELPINST:
X$	EXT="HLP"
X$	VARS="HELP"
X$	GOTO INSTALL_HELP
$ GoSub Convert_File
$ Exit
