From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/gio/gdeact.x | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sys/gio/gdeact.x (limited to 'sys/gio/gdeact.x') diff --git a/sys/gio/gdeact.x b/sys/gio/gdeact.x new file mode 100644 index 00000000..f61f4133 --- /dev/null +++ b/sys/gio/gdeact.x @@ -0,0 +1,28 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include + +# GDEACTIVATE -- Deactivate the workstation, i.e., for an interactive device +# (graphics terminal) restore the terminal to text mode. This is similar to +# closing the workstation will gclose, except that the graphics state is +# retained and graphics i/o may be resumed following a subsequent call to +# greactivate. These calls are generally no-ops for noninteractive devices. + +procedure gdeactivate (gp, flags) + +pointer gp # graphics descriptor +int flags # action flags + +int and() +errchk gflush +errchk gki_deactivatews + +begin + if (and (GP_GFLAGS(gp), GF_WSOPEN) != 0) { + call gflush (gp) + call gki_deactivatews (GP_FD(gp), flags) + if (and (GP_GFLAGS(gp), GF_WSACTIVE) != 0) + GP_GFLAGS(gp) = GP_GFLAGS(gp) - GF_WSACTIVE + } +end -- cgit