h01375
s 00000/00000/00064
d D 1.5 83/02/23 11:58:02 mjb 5 4
c g
e
s 00000/00000/00064
d D 1.4 83/02/03 20:07:24 mjb 4 3
c 
e
s 00001/00001/00063
d D 1.3 83/01/27 13:50:09 mjb 3 2
c took care of interface changes
e
s 00018/00043/00046
d D 1.2 83/01/26 16:10:38 mjb 2 1
c fixed for new data menu with no labels (downsized) etc.
e
s 00089/00000/00000
d D 1.1 83/01/20 11:10:36 tes 1 0
c date and time created 83/01/20 11:10:36 by tes
e
u
tes
mjb
U
t
T
I 1
subroutine ggdatt (page)
########################################################################
#                                                                      #
#          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: Get current graph data and put into common             #
#                                                                      #
#     Input Parameters:                                                #
#            page - (integer) page of menu to get data from            #
#                                                                      #
#     Output Parameters:                                               #
#            none                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            qgeta - get alpha data from menu                          #
#            qgetd - get decimal data from menu                        #
#                                                                      #
########################################################################
integer page

D 2
integer item, vitem, k, j1, j2, j3, j4, j5, start, qnull, qgetnl
E 2
I 2
SHORTINT string(CHARxREALxLENGTH)
integer item, iptr, sptr, i, k
E 2

include(`gphcom')

D 2
   start = (page-1)*15 + 1
E 2
I 2
   sptr = (page-1) * 75 + 1   # Initialize pointer depending on page
D 3
   k = iptr
E 3
I 3
   k = sptr
E 3
E 2
   
D 2
   k = (start-1)*5 + 1      # initialize pointers
   j1 = k
   j2 = k
   j3 = k
   j4 = k
   j5 = k

   do item = 1, 15 {      # Re-intialize common values
E 2
I 2
   do i = 1, 15 {      # Re-intialize common values
E 2
      bgdta1(k) = NUL
      bgdta2(k) = NUL
      bgdta3(k) = NUL
      bgdta4(k) = NUL
      bgdta5(k) = NUL
      k = k + 5
      }

D 2
   k = (start-1)*4 + 1
   vitem = 16
   do item = 1, 15 {             

E 2
I 2
   item = 1
   do i = 1, 5 {             
E 2
      # get character string and check if valid for all five curves
D 2
      ntpray(1) =  qgetnl (vitem, bgdta1(j1),j1)
      vitem = vitem + 15
      ntpray(2) =  qgetnl (vitem, bgdta2(j2),j2)
      vitem = vitem + 15
      ntpray(3) =  qgetnl (vitem, bgdta3(j3),j3)
      vitem = vitem + 15
      ntpray(4) =  qgetnl (vitem, bgdta4(j4),j4)
      vitem = vitem + 15
      ntpray(5) =  qgetnl (vitem, bgdta5(j5),j5)
	 
      qnull = max0 (ntpray(1), ntpray(2), ntpray(3), ntpray(4), ntpray(5))
      if (qnull == YES) {              # we have at least one non-null field  
	 call qgeta (item, bglabl(k))  
	 k = k + 4
E 2
I 2

      iptr = (i-1)*375 + sptr

      do k = 1, 15 {
	 # get character string and check if valid
         call qgeta (item, string) 
         if (string(1) != NUL) {
            call qgetd (item, bgdta1(iptr))
            iptr = iptr + 5       # if good data point to next available space
            }
	 item = item + 1
E 2
	 }
D 2
      vitem = vitem - 59
E 2
      }

   call sqshgr                        # eliminate blank values 

return
D 2
end
integer function qgetnl (vitem, idata, ind)
SHORTINT idata(1), string(CHARxREALxLENGTH)
integer vitem, ind

   qgetnl = NO
   call qgeta (vitem, string)    # get character string and check if valid
   if (string(1) != NUL) {
      call qgetd (vitem, idata)
      qgetnl = YES        
      ind = ind + 5             # if good data point to next available space
      }

   return
E 2
end
E 1
