From:	CRDGW2::CRDGW2::MRGATE::"SMTP::IRUCCVAX.UCC.IE::CBSY8001" 29-NOV-1989 14:47
To:	MRGATE::"ARISIA::EVERHART"
Subj:	BRUREAD - 3 of 3

Message-Id:  <8911291933.AA18834@crdgw1.ge.com>
Received: from IRUCCIBM.BITNET by CUNYVM.CUNY.EDU (IBM VM SMTP R1.2.2MX) with BSMTP id 6198; Wed, 29 Nov 89 14:23:12 EDT
Received: from IRUCCVAX.UCC.IE (CBSY8001) by IRUCCIBM.BITNET (Mailer R2.05)
 with BSMTP id 7673; Wed, 29 Nov 89 19:19:44 IST
Date: Wed, 29 Nov 89 19:18 GMT
From: JFM%IRUCCVAX.UCC.IE@CUNYVM.CUNY.EDU
Subject: BRUREAD - 3 of 3
Sender: CBSY8001%IRUCCVAX.UCC.IE@CUNYVM.CUNY.EDU
To: everhart@arisia.DECNET
X-Vms-To: IN%"everhart@arisia.dnet.ge.com"

-+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+
X`009`009      end;
X`009`009      with dates do begin
X`009`009`009arvno := rvno;
X`009`009`009arday := rday;
X`009`009`009armon := rmon;
X`009`009`009aryea := ryea;
X`009`009`009arhou := rhou;
X`009`009`009armin := rmin;
X`009`009`009arsec := rsec;
X
X`009`009`009acday := cday;
X`009`009`009acmon := cmon;
X`009`009`009acyea := cyea;
X`009`009`009achou := chou;
X`009`009`009acmin := cmin;
X`009`009`009acsec := csec;
X`009`009      end;
X`009`009      aesqn := esqn;`009`123 Ext. sequence number `125
X`009`009      aefnu := efnu;`009`123 Ext. file number `125
X`009`009      if efnu <> 0 Then Begin
X`009`009`009ExtensionHeader := FindHeader (efnu);
X`009`009`009ExtensionHeader`094.Back := CurrentFileHeader;
X`009`009      End;
X`009`009      ause := use div 2;`009`123 Number of pointers in use `125
X`009`009      For b := 1 To Ause Do With Artrv`091b`093,rtrv`091b`093 Do Beg
Vin
X`009`009`009asize := Size;
X`009`009`009albn := lbnh*65536+lbnl;
X`009`009      End;
X`009`009    End;
X
X`009`009    writev (line,c5ta(fnam`0911`093),c5ta(fnam`0912`093),c5ta(fnam`0
V913`093),'.',
X`009`009`009c5ta(ftyp),';',fver:5);
X`009`009    collapse (line,line);
X`009`009    If FlagList then write (listfile,line,'  ');
X`009`009    block_size := hibh*65536+hibk;
X`009`009    writev (line,block_size:7,'. ');`032
X`009`009    collapse (line,line);
X`009`009    if FlagList then writeln (listfile,line,
X`009`009`009cday,'-',cmon,'-',cyea,' ',chou,':',cmin,':',csec);
X`009`009  end;
X`009`009  pos := pos+512;
X`009`009until pos >= l;
X`009`009end;
X`009data : begin
X`009`009datbuf := substr (buf,1,48);
X`009`009pos := 0;
X`009`009bufpos := 48;
X`009`009repeat
X`009`009  pos := pos + 1;
X`009`009  with datbuf`091pos`093 do
X`009`009  if fnum = 0 then pos := 8
X`009`009  else begin
X`009`009    add_to_file (fnum, size+1, lbnh*65536+lbnl);
X`009`009    bufpos := bufpos + (size+1)* 512;
X`009`009  end;
X`009`009until pos = 8;
X`009`009end;
X      end`123case`125;
X    end;
X  end;
X  repeat
X    ReadTape;
X    if FlagDebug then writeln (buf:10,buf.length)
X  until buf.length = 0;
X  close (Brudat);
X  If tape then $dassgn (TapeChannel);
X
X  Cleanup; `123 Remove all 'CurrentFileHeader' entries `125
X
XEnd`123Process`125;
X`012
XFunction GetList ( What : Packed Array `091l..u:integer`093 Of Char; Var Lis
Vt : Lptr )
X`009: Boolean;
XVar
X  FileSpec : Varying `09130`093 Of Char;
X  Next : LPtr;
XBegin
X  GetList := False;
X  If $Present ( What ) Then Begin
X    GetList := True;
X    List := Nil;
X    While Odd ( $GetValue (What,FileSpec.body, FileSpec.length) ) Do Begin
X      If List = Nil Then Begin
X`009New (List);
X`009Next := List;
X      End Else Begin
X`009New (Next`094.Link);
X`009Next := Next`094.Link;
X      End;
X      With Next`094 Do Begin
X`009Link := Nil;
X`009Name := FileSpec;
X      End;
X    End;
X  End;
XEnd;
X`012
XBegin `123Main`125
X  Establish ( Handler );
X  FlagExclude := GetList  ('EXCLUDE',Exclude);
X  FlagCopy    := $Present ('COPY');
X  FlagDebug   := $Present ('DEBUG');
X  FlagLog     := $Present ('LOG');
X  FlagList    := $Present ('LIST');
X  FlagRewind  := $Present ('REWIND');
X  FlagSelect  := GetList  ('SELECT',Select);
X  FlagTotal   := $Present ('TOTAL');
X  If FlagList then FlagCopy := False; `123 Remove default `125
X
X  If FlagList then begin
X    $GetValue ('LIST',Listspec.body, Listspec.length);
X    open (listfile,listspec,new,default := '.LIS');
X    rewrite (listfile);
X  end;
X
X  St1 := 1;
X  While odd (st1) do begin
X    St1 := $GetValue ('TAPE',Filespec.body, Filespec.length);
X    if odd (St1) then begin
X      St2 := 1;
X      while odd (st2) do begin
X`009st2 := $FindFile (Filespec, Resultspec, Context, '.DOS', UserFlags := 2)
V;
X`009if odd (st2) then begin
X`009  fab := Context :: FabPointer;
X`009  DevInfo := fab`094.fab$L_DEV :: Dev$Type;
X`009  with devinfo do begin
X`009    if not DEV$V_FOD then $Signal (BRUREAD$_IVDEV)
X`009    else if not DEV$V_MNT then $Signal (BRUREAD$_NOTMOUNTED)
X`009    else if dev$v_sqd and not dev$v_for then $Signal (BRUREAD$_NOTFOREIG
VN)
X`009    else begin
X`009      Tape := dev$v_sqd;
X`009      $Signal (BRUREAD$_WORKING,1,VDesc(Resultspec));
X`009      Process;
X`009    end;
X`009  end;
X`009end;
X      end`123While more files`125;
X      if st2 <> RMS$_NMF then
X`009$Signal (BRUREAD$_FNF, 1,VDesc(ResultSpec),St2 );
X    end;
X  end;
Xend.
X$ Type Sys$Input
X
X`009Now compiling BRUREAD.PAS
X
X$ Pascal BRUREAD
X$ Message/Object BRUMSG
X$ Link BRUREAD,BRUMSG
X$ Set Command BRU
$ CALL UNPACK BRUREAD.COM;1 503450978
$ v=f$verify(v)
$ EXIT
