From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 27-JUL-1990 22:11:04.93
To:	MRGATE::"ARISIA::EVERHART"
CC:	
Subj:	SHOW/REMOTE type.inc

Received:  by crdgw1.ge.com (5.57/GE 1.70)
	 id AA22453; Fri, 27 Jul 90 21:51:08 EDT
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Fri, 27 JUL 90 15:44:46 PDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA02659; Fri, 27 Jul 90 15:34:52 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 27 Jul 90 22:28:58 GMT
From: sdd.hp.com!uakari.primate.wisc.edu!uflorida!rex!samsung!umich!vela!tarcea@ucsd.edu  (The OUTLAWS)
Organization: Oakland University, Rochester MI
Subject: SHOW/REMOTE type.inc
Message-Id: <2267@vela.acs.oakland.edu>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com


  Well it looks like I messed up my first program post to the net :-).
  Apparently I left out the file TYPE.INC. Well here it is, my apologies to
  all!

   -- glenn

tarcea@vela.acs.oakland.edu

$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 7.1-004  3-AUG-1989
$!   On 27-JUL-1990 18:12:59.09   By user TARCEA 
$!
$! This VMS_SHARE Written by:
$!    Andy Harper, Kings College London UK
$!
$! Acknowledgements to:
$!    James Gray       - Original VMS_SHARE
$!    Michael Bednarek - Original Concept and implementation
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE  (  @name  )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$!       1. TYPE.INC;1
$!
$set="set"
$set symbol/scope=(nolocal,noglobal)
$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
$e="write sys$error  ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if f$trnlnm("SHARE_LOG") then $ w = "!"
$ if f$getsyi("version") .ges. "V4.4" then $ goto START
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$UNPACK: SUBROUTINE ! P1=filename, P2=checksum
$ if f$search(P1) .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped."
$ delete/nolog 'f'*
$ exit
$file_absent:
$ 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/nolog 'f'*
$ exit
$dirok:
$ w "-I-PROCESS, Processing file ''P1'."
$ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");
buff:=CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(buff))
;LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
BEGINNING_OF(buff));g:=0;LOOP EXITIF MARK(NONE)=END_OF(buff);x:=
ERASE_CHARACTER(1);IF g = 0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x=
"V" THEN APPEND_LINE;MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;
IF x="+" THEN g:=1;ERASE_LINE;ENDIF;ELSE IF x="-" THEN g:=0;ENDIF;ERASE_LINE;
ENDIF;ENDLOOP;p:="`";POSITION(BEGINNING_OF(buff));LOOP r:=SEARCH(p,FORWARD);
EXITIF r=0;POSITION(r);ERASE(r);COPY_TEXT(ASCII(INT(ERASE_CHARACTER(3))));
ENDLOOP;o:=GET_INFO(COMMAND_LINE,"output_file");WRITE_FILE(buff,o);
ENDPROCEDURE;Unpacker;EXIT;
$ delete/nolog 'f'*
$ CHECKSUM 'P1'
$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ ENDSUBROUTINE
$START:
$ create/nolog 'f'
X
Xtype
X word        = `091word`093 0..65535;
X byte        = `091byte`093 0..255;
X word_signed = `091word`093 -32768..32767 ;
X
X quota_rec = record
X case integer of
X1:( flags    : unsigned;
X    uic      : unsigned;
X    usage    : unsigned;
X    perm     : unsigned;
X    over     : unsigned;
X    reserved : array`0911..3`093 of unsigned);
X2:( raw`009     : array`0911..8`093 of unsigned);
X end;
X
X item_list_rec = record
X  buflen : word;
X  code   : word;
X  bufadr : integer;
X  retlen : integer;
X end;
X
X acp_descr = record
X  count : word;
X  spare : word;
X  addr  : unsigned;
X end;
X
X io_block = record
X  io_stat : word;
X  count   : word;
X  dev_info: integer
X end;
X
X uic_rec = record
X case integer of
X 1:( member  : word;
X     group   : word);
X 2:( user    : `091bit(2),pos(30)`093 0..3);
X 3:( raw     : unsigned);
X end;
X
X quadword = record
X  lo : unsigned;
X  hi : integer;
X end;
X
X string = varying`091256`093 of char;
X
X message_vector = record
X   arg_count  : word;
X   def_opts   : word;
X   code       : unsigned;
X   rms_status : unsigned;
X end;
X
X
X exit_handler_block = record
X   forward_link : unsigned;
X   exit_handler : unsigned;
X   arg_count    : unsigned;
X   addr_of_cond : unsigned;
X   arg0`009 `009: unsigned;
X   condition    : `091volatile`093 unsigned;`032
X end;
X
X node_name = array `0911..8`093 of char ;
X
X task_name = array `0911..15`093 of char ;
X
X network_connect_block = record
X    node           `123* node name we are connecting to *`125
X                   : node_name ;
X    `032
X    task_delimiter `123* " or what *`125
X                   : char ;
X
X    task           `123* task to be executed on remote node *`125
X                   : task_name ;
X
X    reserved       : word_signed ;
X
X    ncb_end        : char ;
X
X end ;
X
X item_list = record`032
X               case integer of
X                  1: (
X                       buffer_length  :  `091WORD`093 0..65535 ;
X                       item_code      :  `091WORD`093 0..65535 ;
X                       buffer_address :  unsigned ;
X                       return_address :  unsigned`032
X                     ) ;
X                  2: ( terminator     :  unsigned ) ;
X             end ;
X
X item_list_template(count : integer) = array `0911..count`093 of item_list ;
V   `032
X
X dsc$descriptor_s = record
X
X      dsc$w_length   : word ;
X
X      dsc$b_dtype    : byte ;
X
X      dsc$b_class    : byte ;
X
X      dsc$a_pointer  : unsigned ;
X`032
X end ;
X   `032
X
$ CALL UNPACK TYPE.INC;1 540555796
$ v=f$verify(v)
$ EXIT

