h09445
s 00007/00004/00069
d D 1.5 83/03/28 18:39:32 mjb 5 4
c 
e
s 00001/00001/00072
d D 1.4 83/03/03 18:47:22 mjb 4 3
c put in check for single graph recalls in multi graph mode
e
s 00000/00000/00073
d D 1.3 83/03/03 18:30:36 mjb 3 2
c 
e
s 00001/00000/00072
d D 1.2 83/02/18 18:24:14 mjb 2 1
c 
e
s 00072/00000/00000
d D 1.1 83/01/31 16:23:39 mjb 1 0
c date and time created 83/01/31 16:23:39 by mjb
e
u
mjb
tes
U
t
T
I 1
subroutine mltchk (flag)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: Multiple Chart file checker                            #
#                                                                      #
#     Input Parameters:                                                #
#            None                                                      #
#                                                                      #
#     Output Parameters:                                               #
#            Flag - 1 == all files found and ok, 0 otherwise           #
#                                                                      #
#     Routines Called:                                                 #
#            None                                                      #
#                                                                      #
########################################################################
integer flag

D 5
SHORTINT copen(16), corrpt(24), blanks(24), savflg
E 5
I 5
SHORTINT copen(35), corrpt(43), blanks(43), savflg
E 5
integer row, column, i, j, length, fileck, lflag

include(`gphcom')

data copen /BIGF,LETI,LETL,LETE,SPACE,LETN,LETO,LETT,SPACE,LETF,LETO,
D 5
	    LETU,LETN,LETD,PERIOD,NUL/
E 5
I 5
	    LETU,LETN,LETD,SPACE,LPAREN,LETD,LETE,LETL,LETE,LETT,LETE,
	    SPACE,LETO,LETR,SPACE,LETR,LETE,LETP,LETL,LETA,LETC,LETE,
	    RPAREN,NUL/
E 5

data corrpt /BIGN,LETO,LETT,SPACE,LETA,SPACE,LETV,LETA,LETL,LETI,LETD,
	     SPACE,BIGG,BIGR,BIGA,BIGP,BIGH,SPACE,LETF,LETI,LETL,LETE,
D 5
	     PERIOD,NUL/
E 5
I 5
	     SPACE,LPAREN,LETD,LETE,LETL,LETE,LETT,LETE,SPACE,LETO,LETR,
	     SPACE,LETR,LETE,LETP,LETL,LETA,LETC,LETE,RPAREN,NUL/
E 5

D 5
data blanks /23*SPACE, NUL/
E 5
I 5
data blanks /42*SPACE, NUL/
E 5

   flag = YES

   savflg = multfg               # Set up to fool fileck
   multfg = 1

   row = 14
   column = 34
   j = 1
   do i= 1 ,4 {
D 4
      lflag = fileck (ASCIIxREAD, mfname(j), length)
E 4
I 4
      lflag = fileck (ASCIIxREAD, EITHER, mfname(j), length)
E 4
I 2
      if (length == MULTxSIZE) lflag = CORRUPTxFILExERROR
E 2
      
      call revers (ON)
      if (lflag == CANNOTxOPENxFILExERROR) {
	 flag = lflag
	 call qtext (row, column, copen)
	 }
      else if (lflag == CORRUPTxFILExERROR){
	 flag = lflag
	 call qtext (row, column, corrpt)
	 }
      else {
	 call revers (OFF)
	 call qtext (row, column, blanks)
	 }
      
      j = j + 14
      row = row + 1
      }
   multfg = savflg                # Restore multfg
   call revers (OFF)

   return
end
E 1
