aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/stdgraph/stgreact.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/gio/stdgraph/stgreact.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/gio/stdgraph/stgreact.x')
-rw-r--r--sys/gio/stdgraph/stgreact.x41
1 files changed, 41 insertions, 0 deletions
diff --git a/sys/gio/stdgraph/stgreact.x b/sys/gio/stdgraph/stgreact.x
new file mode 100644
index 00000000..21c2a821
--- /dev/null
+++ b/sys/gio/stdgraph/stgreact.x
@@ -0,0 +1,41 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <gset.h>
+include <ttset.h>
+include "stdgraph.h"
+
+# STG_REACTIVATEWS -- Reactivate the workstation, i.e., enable graphics.
+
+procedure stg_reactivatews (flags)
+
+int flags # action flags (handled by cursor mode)
+
+int junk
+int ttstati(), ttyctrl(), and()
+extern stg_onerror()
+include "stdgraph.com"
+
+begin
+ if (g_active == NO) {
+ junk = ttyctrl (g_out, g_tty, "OW", 1)
+
+ # Post error handler to be called if we abort.
+ call onerror (stg_onerror)
+
+ g_active = YES
+ g_enable = YES
+
+ # Must disable stty ucaseout mode when in graphics mode, else
+ # plotting commands may be modified by the terminal driver.
+
+ g_ucaseout = ttstati (g_out, TT_UCASEOUT)
+ if (g_ucaseout == YES)
+ call ttseti (g_out, TT_UCASEOUT, NO)
+
+ # Clear the graphics screen?
+ if (and (flags, AW_CLEAR) != 0)
+ call stg_clear (0)
+
+ call flush (g_out)
+ }
+end