aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/calcomp/ccpclose.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/calcomp/ccpclose.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/gio/calcomp/ccpclose.x')
-rw-r--r--sys/gio/calcomp/ccpclose.x22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/gio/calcomp/ccpclose.x b/sys/gio/calcomp/ccpclose.x
new file mode 100644
index 00000000..3d433eb0
--- /dev/null
+++ b/sys/gio/calcomp/ccpclose.x
@@ -0,0 +1,22 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include "ccp.h"
+
+# CCP_CLOSE -- Close the calcomp kernel. Free up storage.
+
+procedure ccp_close()
+
+include "ccp.com"
+
+begin
+ # Signal end of plot.
+ call plot (0, 0, 999)
+ # call plots (0, 0, CCP_DEVCHAN(g_cc)) #do we really want to do this?
+ # (calcomp may get into funny state without, but may mess up APPEND
+
+ # Free kernel data structures.
+ call mfree (CCP_SBUF(g_cc), TY_CHAR)
+ call mfree (g_cc, TY_STRUCT)
+
+ g_cc = NULL
+end