aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/gks/gdawk.x
blob: 23eaff149a6c2c61772ff6e0e49cd3ce4d28411c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	"gks.h"

# GDAWK -- Deactivate workstation.

procedure gdawk (wkid)

int	wkid		# Workstation identifier
int	i
include	"gks.com"

begin
	# This procedure sets the status flag to INACTIVE for a particular
	# device.  Because this workstation may have been the reference
	# workstation, gk_std, it may also necessary to update gk_std.
	# In this case, the reference workstation will be the one with the
	# lowest workstation id number.

	gk_status[wkid] = INACTIVE

	if (wkid == gk_std) {
	    gk_std = NULL
	    # Find next activated workstation, if any
	    do i = 1, NDEV {
	        if (gk_status[i] == ACTIVE) {
		    gk_std = i
		    break
		}
	    }
	}
end