aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/nsppkern/gktcancel.x
diff options
context:
space:
mode:
Diffstat (limited to 'sys/gio/nsppkern/gktcancel.x')
-rw-r--r--sys/gio/nsppkern/gktcancel.x27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/gio/nsppkern/gktcancel.x b/sys/gio/nsppkern/gktcancel.x
new file mode 100644
index 00000000..17679f89
--- /dev/null
+++ b/sys/gio/nsppkern/gktcancel.x
@@ -0,0 +1,27 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <fset.h>
+include "gkt.h"
+
+# GKT_CANCEL -- Cancel any buffered output.
+
+procedure gkt_cancel (dummy)
+
+int dummy # not used at present
+include "gkt.com"
+
+begin
+ if (g_kt == NULL)
+ return
+
+ # First we cancel any output in the FIO stream, then
+ # flush the nspp buffers. This might, of course,
+ # put something in the FIO stream, so we cancel again.
+ # note the Fortran escape for "flush"...spp has a reserved
+ # word of the same name.
+
+ call fseti (g_out, F_CANCEL, OK)
+% call mcflsh
+ call fseti (g_out, F_CANCEL, OK)
+ call gkt_reset()
+end