h32940
s 00000/00000/00062
d D 1.2 83/03/31 12:27:59 mmm 2 1
c 
e
s 00062/00000/00000
d D 1.1 83/03/15 21:35:12 tes 1 0
c date and time created 83/03/15 21:35:12 by tes
e
u
4
U
t
T
I 1
subroutine gclwk (wkid)
########################################################################
#                                                                      #
#          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: Close workstation                                      #
#                                                                      #
#     Input Parameters:                                                #
#            wkid - workstation identifier                             #
#      Output Parameters:                                              #
#            none                                                      #
#                                                                      #
#     Errors:                                                          #
#        7 GKS not in proper state:  GKS must be in one of the states  #
#          WSOP, WSAC or SGOP                                          #
#       20 Specified workstation identifier is invalid                 #
#       25 Specified workstation is not open                           #
#       28 Specified workstation is active                             #
#                                                                      #
#     Routines Called:                                                 #
#            gzatt  - internal routine to call gzddop                  #
#            gioini - initialize I/O for console                       #
#            errchk - perform appropriate error checking               #
#                                                                      #
########################################################################
integer wkid

integer idummy

ifdef(`ERROR_ON',`
   integer errchk, errind, ierdum
   ')

include(`gkscom')

ifdef(`ERROR_ON',`
      rounum = GCLWK
      errind = errchk(wkid, ierdum)
      ')

   call gzatt (CLOSExWORKSTATION, idummy, idummy)

   # Delete workstation identifier from workstation state list
   wrkid = 0
   # Delete workstation identifier from GKS state list
   wrkopn = 0
   # Set GKS to GKS open state if no workstations remain open
   gksopr = GKOP

   # Open console IO for error ckecking
   ifdef(`ERROR_ON',`
      call gioini (0)
      ')

  return
end
E 1
