diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/gio/gdeact.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/gdeact.x')
-rw-r--r-- | sys/gio/gdeact.x | 28 |
1 files changed, 28 insertions, 0 deletions
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 <gio.h> +include <gset.h> + +# 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 |