Article 1411 of vmsnet.sources:
Submitted-by: "Phil Ottewell Yezerski Roper Ltd." <phil@yrsk.demon.co.uk>
Posting-number: Volume 8, Issue 2
Archive-name: pgp_tpu/part01

Having  posted  a  message about  PGP-ing  from within  the  TPU  Editor  to
comp.os.vms  , I  have received  mails from several people suggesting that I
post the sources to vmsnet.sources and  vmsnet.tpu, so  here they are.  They
work  with PGP  2.6.3i  which  is,  I  believe, the latest  version for VMS.

  One correspondent, Michael  Lemke,  suggested  that  I call the  procedure
eve_pgp  to  allow,  in addition  to  the <Ctrl>P key  activation,  <Do> PGP
rather than <Do> TPU PGP . This works  nicely, but my understanding was that
eve_  names are  reserved  to  Digital.  Also,  I can't remember  why I used
READ_KEY  rather than READ_CHAR  ! Perhaps a TPU wizard can  comment  on and
improve my procedure. I'm still inclined to use EDT (I  can remember when it
used to take  3 days to load your section file on a  MicroVAX II :-) so this
is one of my first forays into TPU macro writing.
                             ________

  Here are the  files I created for using  PGP  from  TPU. I assume that you
know  how to use a TPU  section file, e.g. EDIT/TPU/SECTION=my.TPU$SECTION .
See  the VMS documentation set ,  or  try  HELP EDIT /TPU  /SECTION  if  you
aren't too familiar with this.  This has been tested with PGP 2.6.3i, and it
will _not_ work with PGP 2.6ui.

There are two files in this mail:

1) SETUP.COM
   ---------
  This  command  procedure  lives  in   the   same  directory  as  the   PGP
  executables. I keep the VAX and Alpha versions in the same directory, with
  file  types .EXE and .EXE_ALPHA respectively.  Users can @  this SETUP.COM
  from their LOGIN.COM, and  it  will set up the PGP symbol to  point to the
  correct image.
  
    You  may  also  want  to  define  PGPPATH  to  point  to  your  own  PGP
  initialization files. The PGP$LIBRARY logical  should be  defined to point
  at  the  PGP [.DOC]  directory, either system  wide or in your LOGIN.COM .

2) PGP.TPU
   -------
  The  second file, a TPU procedure, works with  EDIT/TPU (the  default  VMS
  editor) used from either a DECterm, or via the DECwindows Motif interface.
  I'm  still  clinging on to EDT,  so please excuse any TPU sloppiness  -  I
  don't claim to be  an expert  ! I had to write  my own routine to hide the
  pass  phrase, and the  prompt doesn't appear on the very bottom line where
  the message asking you to type it in is displayed.
  
    This  procedure lets you encrypt, decrypt, or simply sign a  message  by
  pressing <Ctrl>P and  following the prompts. It assumes  that you have the
  PGP  command  symbol  and  associated  logical names set  up already. When
  you encrypt a message, it is also signed by you,  so you will  be prompted
  for your pass phrase even though  you have asked to use  Joe Bloggs public
  key for the encryption.


  Extract the two files, then EDIT/TPU PGP.TPU and follow the guidelines  at
the top of the file to 'compile' the  procedures,  define the <Ctrl>P action
and save the  new  section.  If you  are  going  to  use  this  on  a  mixed
architecture/version cluster, compile the procedure on  the _lowest_ version
of VMS so that you will be able to use the section file on all the machines.

  Hope you find this  stuff useful, and please let me know  if you  think of
some good improvements !

                       Cheers,
                                Phil Ottewell
$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
$!
$! This archive created:
$!  Name : pgp_tpu
$!  By   : mark.berryman@mvb.saic.com
$!  Date : 11-JUN-1996 16:54:23.64
$!  Using: VMS_SHARE 8.5-1, (C) 1993 Andy Harper, Kings College London UK
$!
$! Credit is due to these people for their original ideas:
$!    James Gray, Michael Bednarek 
$!
$! To unpack this archive:
$!    Minimum of VMS 4.4 (VAX) / OpenVMS 1.0 (Alpha) is required.
$!    Remove the headers of the first part, up to `cut here' line.
$!    Execute file as a command procedure.
$!
$! The following file(s) will be created after unpacking:
$!       1. PGP.TPU;1
$!       2. SETUP.COM;1
$!
$ set="set"
$ set symbol/scope=(nolocal,noglobal)
$ f="SYS$SCRATCH:."+f$getjpi("","PID")+";"
$ if f$trnlnm("SHARE_UNPACK") .nes. "" then $ -
 f=f$parse("SHARE_UNPACK_TEMP",f)
$ e="write sys$error  ""%UNPACK"", "
$ w="write sys$output ""%UNPACK"", "
$ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
$ if f$getsyi("CPU") .gt. 127 then $ goto start
$ ve=f$getsyi("version")
$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto start
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$unpack:subroutine!P1=file,P2=chksum,P3=attrib,P4=size,P5=fileno,P6=filetotal
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'"
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn' File skipped"
$ delete 'f'*
$ exit
$dirok:
$ x=f$search(P1)
$ if x .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped"
$ delete 'f'*
$ exit
$file_absent:
$ w "-I-UNPACK, Unpacking ", P5, " of ", P6, " - ", P1, " - ", P4, " Blocks"
$ n=P1
$ if P3 .nes. "" then $ n=f
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT/NOJOURNAL 'f'/OUT='n'
PROCEDURE GetHex(s,p)LOCAL x1,x2;x1:=INDEX(t,SUBSTR(s,p,1))-1;x2:=INDEX(t,
SUBSTR(s,p+1,1))-1;RETURN 16*x1+x2;ENDPROCEDURE;PROCEDURE SkipPartsep LOCAL m;
LOOP m:=MARK(NONE);EXITIF m=END_OF(CURRENT_BUFFER);DELETE(m);EXITIF INDEX(
ERASE_LINE,"-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;
PROCEDURE ProcessLine LOCAL c,s,l,b,n,p;s := ERASE_LINE;c := SUBSTR(s,1,1);s :=
 s-c;IF c = "X" THEN SPLIT_LINE; ENDIF;MOVE_HORIZONTAL(-1);l := LENGTH(s);p :=
 1;LOOP EXITIF p > l;c := SUBSTR(s,p,1);p := p+1;CASE c FROM ' ' TO '`' ['`']
: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[' ']: p:=p+1;[INRANGE,OUTRANGE]
: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE;PROCEDURE Decode(b)LOCAL m;
POSITION(BEGINNING_OF(b));LOOP m:=MARK(NONE);EXITIF m=END_OF(b);DELETE(m);
IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=1 THEN SkipPartSep;ELSE ProcessLine;
MOVE_HORIZONTAL(1);ENDIF;ENDLOOP;ENDPROCEDURE;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);t:="0123456789ABCDEF";f:=GET_INFO(
COMMAND_LINE,"file_name");o:=CREATE_BUFFER(f,f);Decode(o);WRITE_FILE(o,
GET_INFO(COMMAND_LINE,"output_file"));QUIT;
$ if p3 .eqs. "" then $ goto dl
$ open/write fdl &f
$ write fdl "RECORD"
$ write fdl P3
$ close fdl
$ w "-I-CONVRFM, Converting record format to ", P3
$ convert/fdl='f' 'f'-1 'f'
$ fa=f$getdvi(f$parse(f),"ALLDEVNAM")
$ Pa=f$getdvi(f$parse(P1),"ALLDEVNAM")
$ if fa .eqs. Pa then $ rename &f 'f$parse(P1)'
$ if fa .nes. Pa then $ copy &f 'f$parse(P1)'
$dl: delete 'f'*
$ checksum 'P1'
$ if checksum$checksum .nes. P2 then $ -
  e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ exit
$ endsubroutine
$start:
$!
$ create 'f'
X!`20PGP.TPU
X!
X!`20Author:`20Phil`20Ottewell,`2015-May-1996,`20phil@yrsk.demon.co.uk`20(work)
V
X!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20phil@pottsoft.demon.co.uk`20(home)
X!
X!`20How`20to`20use`20this`20file`20to`20get`20PGP`20encrypt/decrypt`20or`20sig
Vning`20from`20TPU`20editor:
X!
X!`201.`20Enter`20TPU`20and`20get`20this`20file,`20eg.`20EDIT/TPU/NOINIT`20this
V_file
X!`20`20`20`20if`20you`20want`20to`20start`20from`20scratch
X!`202.`20Get`20TPU`20command`20line,`20by`20hitting`20<Do>`20key,
X!`203.`20EXTEND`20TPU`20*
X!`204.`20TPU`20DEFINE_PGP_KEY
X!`205.`20@`5Byour_dir.whatever`5DEVE$INIT.EVE`20!`20to`20get`20your`20other`20
Vdefinitions,`20if`20any
X!`206.`20SAVE`20EXTENDED`20TPU`20your.TPU$SECTION
X!
X!`20Use`20<Ctrl>P`20to`20PGP`20sign`20or`20encrypt,`20and`20answer`20the`20que
Vstions.
X!
X!`20This`20procedure`20creates`20and`20deletes`20files`20in`20your`20SYS$LOGIN
V:`20with`20names
X!`20like`20_PGP_MAIL.ASC`20and`20.TMP,`20so`20dont`20use`20these`20names`20for
V`20your`20own`20files.
X!
XPROCEDURE`20pgp
X!
X`20`20LOCAL`20orig_buffer,
X`20`20`20`20`20`20`20`20orig_mode,
X`20`20`20`20`20`20`20`20sel_range,
X`20`20`20`20`20`20`20`20dcl_subprocess,
X`20`20`20`20`20`20`20`20temp_buffer,
X`20`20`20`20`20`20`20`20dcl_buffer,
X`20`20`20`20`20`20`20`20sign_answer,
X`20`20`20`20`20`20`20`20encrypt_answer,
X`20`20`20`20`20`20`20`20sign_answer_string,
X`20`20`20`20`20`20`20`20plain_text_copy,
X`20`20`20`20`20`20`20`20recipients_keyname,
X`20`20`20`20`20`20`20`20encrypt_answer_string,
X`20`20`20`20`20`20`20`20pgp_command,
X`20`20`20`20`20`20`20`20selection_saved;
X!`20Error`20handler`20(eg.`20CTRL-C)
X`20`20ON_ERROR
X`20`20`20`20`5BTPU$_READABORTED`5D:
X`20`20`20`20`20`20MESSAGE("PGP`20operation`20cancelled.");
X!`20`20`20`20`20Set`20current`20buffer`20and`20cursor`20position`20to`20origin
Val`20buffer
X`20`20`20`20`20`20SET(orig_mode,orig_buffer);
X`20`20`20`20`20`20POSITION(orig_buffer);
X`20`20`20`20`20`20IF`20(selection_saved`20=`20"TRUE")
X`20`20`20`20`20`20THEN
X!`20`20`20`20`20`20`20Include`20the`20selection`20from`20saved`20text`20file
X`20`20`20`20`20`20`20`20READ_FILE("SYS$LOGIN:_PGP_MAIL.TMP;");
X`20`20`20`20`20`20ENDIF;
X!`20`20`20`20`20Get`20rid`20of`20temporary`20buffers
X`20`20`20`20`20`20IF`20(GET_INFO(BUFFER,"find_buffer","DCL_BUFFER")`20<>`200)
V
X`20`20`20`20`20`20THEN
X`20`20`20`20`20`20`20`20DELETE(dcl_buffer);
X`20`20`20`20`20`20ENDIF;
X`20`20`20`20`20`20IF`20(GET_INFO(BUFFER,"find_buffer","PGP_BUFFER")`20<>`200)
V
X`20`20`20`20`20`20THEN
X`20`20`20`20`20`20`20`20DELETE(temp_buffer);
X`20`20`20`20`20`20ENDIF;
X`20`20`20`20`20`20RETURN;
X`20`20`20`20`5BTPU$_CONTROLC`5D:
X`20`20`20`20`20`20MESSAGE("PGP`20`20aborted`20by`20CTRL-C.");
X!`20`20`20`20`20Set`20current`20buffer`20and`20cursor`20position`20to`20origin
Val`20buffer
X`20`20`20`20`20`20SET(orig_mode,orig_buffer);
X`20`20`20`20`20`20POSITION(orig_buffer);
X`20`20`20`20`20`20IF`20(selection_saved`20=`20"TRUE")
X`20`20`20`20`20`20THEN
X!`20`20`20`20`20`20`20Include`20the`20selection`20from`20saved`20text`20file
X`20`20`20`20`20`20`20`20READ_FILE("SYS$LOGIN:_PGP_MAIL.TMP;");
X`20`20`20`20`20`20ENDIF;
X!`20`20`20`20`20Get`20rid`20of`20temporary`20buffers
X`20`20`20`20`20`20IF`20(GET_INFO(BUFFER,"find_buffer","DCL_BUFFER")`20<>`200)
V
X`20`20`20`20`20`20THEN
X`20`20`20`20`20`20`20`20DELETE(dcl_buffer);
X`20`20`20`20`20`20ENDIF;
X`20`20`20`20`20`20IF`20(GET_INFO(BUFFER,"find_buffer","PGP_BUFFER")`20<>`200)
V
X`20`20`20`20`20`20THEN
X`20`20`20`20`20`20`20`20DELETE(temp_buffer);
X`20`20`20`20`20`20ENDIF;
X`20`20`20`20`20`20RETURN;
X`20`20`20`20`5BOTHERWISE`5D:
X!`20`20`20`20`20Copy`20contents`20of`20dcl_buffer`20to`20end`20of`20MESSAGES
V`20system`20buffer
X`20`20`20`20`20`20POSITION(END_OF(MESSAGE_BUFFER));
X`20`20`20`20`20`20COPY_TEXT(dcl_buffer);
X!`20`20`20`20`20Set`20current`20buffer`20and`20cursor`20position`20to`20origin
Val`20buffer
X`20`20`20`20`20`20SET(orig_mode,orig_buffer);
X`20`20`20`20`20`20POSITION(orig_buffer);
X`20`20`20`20`20`20IF`20(selection_saved`20=`20"TRUE")
X`20`20`20`20`20`20THEN
X!`20`20`20`20`20`20`20Include`20the`20deleted`20text
X`20`20`20`20`20`20`20`20READ_FILE("SYS$LOGIN:_PGP_MAIL.TMP;");
X`20`20`20`20`20`20ENDIF;
X!`20`20`20`20`20Get`20rid`20of`20temporary`20buffers
X`20`20`20`20`20`20IF`20(GET_INFO(BUFFER,"find_buffer","DCL_BUFFER")`20<>`200)
V
X`20`20`20`20`20`20THEN
X`20`20`20`20`20`20`20`20DELETE(dcl_buffer);
X`20`20`20`20`20`20ENDIF;
X`20`20`20`20`20`20IF`20(GET_INFO(BUFFER,"find_buffer","PGP_BUFFER")`20<>`200)
V
X`20`20`20`20`20`20THEN
X`20`20`20`20`20`20`20`20DELETE(temp_buffer);
X`20`20`20`20`20`20ENDIF;
X`20`20`20`20`20`20MESSAGE("PGP`20error.`20Check`20system`20buffer`20MESSAGES
V`20for`20more`20information");
X`20`20`20`20`20`20RETURN;
X`20`20ENDON_ERROR;
X!`20Get`20current`20buffer`20name
X`20`20orig_buffer:=`20GET_INFO(BUFFERS,"current");
X!`20Get`20mode`20(insert/overwrite)
X`20`20orig_mode:=`20GET_INFO(CURRENT_BUFFER,"mode");
X!`20Get`20the`20select`20range
X`20`20selection_saved`20:=`20"FALSE";
X`20`20sel_range`20:=`20CREATE_RANGE`20(BUFFER_BEGIN,`20BUFFER_END);
X!`20Create`20a`20temporary`20buffer`20to`20receive`20the`20text
X`20`20temp_buffer:=`20`20CREATE_BUFFER("PGP_BUFFER");
X`20`20POSITION(temp_buffer);
X`20`20MOVE_TEXT(sel_range);
X`20`20selection_saved`20:=`20"TRUE";
X`20`20WRITE_FILE(temp_buffer,"SYS$LOGIN:_PGP_MAIL.TMP;");
X!`20Delete`20temporary`20buffer
X`20`20DELETE(temp_buffer);
X!`20Get`20text`20and`20margin`20size
X`20`20encrypt_answer_string`20:=`20READ_LINE("Encrypt/Decrypt/Sign`20(E/D/S)
V`20?`20`5BS`5D:");
X`20`20EDIT(encrypt_answer_string,TRIM);
X`20`20EDIT(encrypt_answer_string,UPPER);
X`20`20IF`20encrypt_answer_string`20=`20""
X`20`20THEN
X`20`20`20`20encrypt_answer_string`20:=`20"S";
X`20`20ENDIF;
X!
X`20`20IF`20SUBSTR(encrypt_answer_string,1,1)`20=`20"S"
X`20`20THEN
X`20`20`20`20encrypt_answer_string`20:=`20"";
X`20`20`20`20recipients_keyname`20:=`20"";
X`20`20ELSE
X`20`20`20`20IF`20SUBSTR(encrypt_answer_string,1,1)`20=`20"E"
X`20`20`20`20THEN
X`20`20`20`20`20`20recipients_keyname`20:=`20READ_LINE("Name`20to`20uniquely`20
Videntify`20public`20encryption`20key:");
X`20`20`20`20`20`20recipients_keyname`20:=`20"`20"""`20+`20recipients_keyname
V`20+`20"""";
X`20`20`20`20`20`20encrypt_answer_string`20:=`20"et";
X`20`20`20`20ELSE
X`20`20`20`20`20`20recipients_keyname`20:=`20"";
X`20`20`20`20`20`20encrypt_answer_string`20:=`20"D";
X`20`20`20`20ENDIF;
X`20`20ENDIF;
X!
X`20`20IF`20encrypt_answer_string`20=`20"D"
X`20`20THEN
X`20`20`20`20encrypt_answer_string`20:=`20"";
X`20`20`20`20sign_answer_string:=`20"";
X`20`20ELSE
X`20`20`20`20sign_answer_string:=`20"-sa";
X`20`20ENDIF;
X!
X`20`20MESSAGE("Enter`20your`20passphrase`20on`20this`20line`20-`20it`20will`20
Vnot`20be`20echoed");
X`20`20pass_phrase`20:=`20get_passphrase();
X`20`20pass_phrase:=`20"`20-z`20"""`20+`20pass_phrase`20+`20"""";
X!
X`20`20pgp_command:=`20"pgp`20+batchmode`20+force`20"`20+`20sign_answer_string
V
X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+`20encrypt_answer_st
Vring
X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+`20"`20sys$login:_PG
VP_MAIL.TMP`20-o`20sys$login:_PGP_MAIL.ASC"
X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+`20pass_phrase
X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+`20recipients_keynam
Ve;
X!`20Create`20a`20temporary`20buffer`20to`20receive`20DCL`20output
X`20`20dcl_buffer:=`20`20CREATE_BUFFER("DCL_BUFFER");
X`20`20MESSAGE("PGP-ing`20now`20...");
X`20`20dcl_subprocess:=`20CREATE_PROCESS(dcl_buffer,pgp_command);
X!`20Set`20current`20buffer`20and`20cursor`20position`20to`20original`20buffer
V
X`20`20SET(orig_mode,orig_buffer);
X`20`20POSITION(orig_buffer);
X!`20Include`20the`20PGP-ed`20file
X`20`20READ_FILE("SYS$LOGIN:_PGP_MAIL.ASC;");
X`20`20selection_saved`20:=`20"FALSE";
X`20`20IF`20SUBSTR(encrypt_answer_string,1,1)`20=`20"e"
X`20`20THEN
X!`20`20`20Check`20if`20user`20would`20like`20a`20plain`20text`20copy`20for`20t
Vhemselves
X`20`20`20`20plain_text_copy`20:=`20READ_LINE("Mail`20yourself`20a`20plain`20te
Vxt`20copy`20?`20`5BN`5D:");
X`20`20`20`20EDIT(plain_text_copy,TRIM);
X`20`20`20`20EDIT(plain_text_copy,UPPER);
X`20`20`20`20IF`20SUBSTR(plain_text_copy,1,1)`20=`20"Y"
X`20`20`20`20THEN
X`20`20`20`20`20`20SEND("MAIL/SUBJECT=""Plaintext`20of`20PGP`20mail""`20SYS$LOG
VIN:_PGP_MAIL.TMP`20'F$GETJPI("""",""USERNAME"")'",dcl_subprocess);
X`20`20`20`20ENDIF;
X`20`20ENDIF;
X!`20Delete`20the`20two`20temporary`20files
X`20`20SEND("IF`20F$SEARCH(""SYS$LOGIN:_PGP_MAIL.TMP"").NES.""""`20THEN`20$`20D
VELETE`20SYS$LOGIN:_PGP_MAIL.TMP;*",dcl_subprocess);
X`20`20SEND("IF`20F$SEARCH(""SYS$LOGIN:_PGP_MAIL.ASC"").NES.""""`20THEN`20$`20D
VELETE`20SYS$LOGIN:_PGP_MAIL.ASC;*",dcl_subprocess);
X!`20Delete`20subprocess
X`20`20dcl_subprocess:=`200;
X!`20Delete`20DCL`20buffer
X`20`20DELETE(dcl_buffer);
X`20`20MESSAGE("Text`20PGP-ed")
X!`20ENDIF;
XENDPROCEDURE;
X!
X!`20Set`20up`20key`20definition
X!`20
XPROCEDURE`20define_pgp_key
X`20`20DEFINE_KEY("PGP",`20CTRL_P_KEY,`20"PGP",eve$x_user_keys);
X`20`20MESSAGE`20(`20"CTRL-P`20=`20PGP"`20);
XENDPROCEDURE;
X!
X!`20Get`20pass`20phrase`20without`20echoing`20it
X!
XPROCEDURE`20get_passphrase
XLOCAL`20the_key,`20string,`20shadow,`20the_len;
X`20`20string`20:=`20"";
X`20`20shadow`20:=`20"";
X`20`20the_len`20:=`200;
X`20`20LOOP
X`20`20`20`20the_key`20:=`20read_key;
X`20`20`20`20exitif`20the_key`20=`20RET_KEY;
X`20`20`20`20exitif`20the_len`20>`20132;
X`20`20`20`20IF`20the_key`20<>`20DEL_KEY
X`20`20`20`20THEN
X`20`20`20`20`20`20shadow`20:=`20shadow`20+`20"*";
X`20`20`20`20`20`20string`20:=`20string`20+`20ascii(the_key);
X`20`20`20`20`20`20the_len`20:=`20the_len`20+`201;
X`20`20`20`20ELSE
X`20`20`20`20`20`20IF`20the_len`20>`201
X`20`20`20`20`20`20THEN
X`20`20`20`20`20`20`20`20the_len`20:=`20the_len`20-`201;
X`20`20`20`20`20`20`20`20string`20:=`20SUBSTR(`20string,`201,`20the_len`20);
X`20`20`20`20`20`20`20`20shadow`20:=`20SUBSTR(`20shadow,`201,`20the_len`20);
X`20`20`20`20`20`20ELSE
X`20`20`20`20`20`20`20`20the_len`20:=`200;
X`20`20`20`20`20`20`20`20string`20:=`20"";
X`20`20`20`20`20`20`20`20shadow`20:=`20"";
X`20`20`20`20`20`20ENDIF;
X`20`20`20`20ENDIF;
X`20`20`20`20MESSAGE(shadow);
X`20`20ENDLOOP;
X`20`20RETURN(`20string`20);
XENDPROCEDURE;
$ call unpack PGP.TPU;1 1359529536 "" 15 1 2
$!
$ create 'f'
X$!`20Setup`20up`20PGP`20symbol`20and`20logical
X$!`20This`20assumes`20that`20the`20executables`20live`20in`20PDS$DISK:`5BPDS.P
VGP263II.SRC`5D
X$!`20so`20change`20this`20to`20suit`20your`20system.
X$!
X$!`20Phil`20Ottewell`20-`20<phil@yrsk.demon.co.uk>`20-`2015-May-1996
X$!
X$!`20You`20may`20wish`20to`20define`20something`20similar`20to`20the`20followi
Vng`20in`20your
X$!`20LOGIN.COM`20to`20point`20to`20location`20for`20CONFIG.TXT`20and`20LANGUAG
VE.TXT
X$!
X$!`20DEFINE/JOB/NOLOG`20PGPPATH`20DEV$DISK:`5Byour_dir.INITS`5D
X$!
X$!`20You`20should`20also`20have`20PGP$LIBRARY`20defined`20to`20point`20at`20th
Ve
X$!`20PGP`20`5B.DOC`5D`20directory
X$!
X$`20is_alpha`20=`20F$EXTRACT(0,4,F$GETSY("NODE_HWTYPE")).EQS."ALPH"
X$!`20Get`20correct`20EXEs
X$`20IF`20is_alpha
X$`20THEN
X$`20`20`20exe`20=`20"EXE_ALPHA"
X$`20ELSE
X$`20`20`20exe`20=`20"EXE"
X$`20ENDIF
X$!`20Help`20documents
X$`20DEFINE/NOLOG`20PGP$LIBRARY`20PDS$DISK:`5BPDS.PGP263II.DOC`5D
X$!`20Foreign`20command`20symbol
X$`20IF`20F$TYPE(PGP).EQS.""
X$`20THEN
X$`20`20`20IF`20F$SEARCH("PDS$DISK:`5BPDS.PGP263II.SRC`5DPGP.''exe'").NES.""
X$`20`20`20THEN
X$`20`20`20`20`20PGP:==$PDS$DISK:`5BPDS.PGP263II.SRC`5DPGP.'exe'
X$`20`20`20ENDIF
X$`20ENDIF
X$!
X$`20EXIT
$ call unpack SETUP.COM;1 1901602052 "" 2 2 2
$ v=f$verify(v)
$ exit


