aboutsummaryrefslogtreecommitdiff
path: root/sys/qpoe/qpclose.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/qpoe/qpclose.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/qpoe/qpclose.x')
-rw-r--r--sys/qpoe/qpclose.x26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/qpoe/qpclose.x b/sys/qpoe/qpclose.x
new file mode 100644
index 00000000..eb537622
--- /dev/null
+++ b/sys/qpoe/qpclose.x
@@ -0,0 +1,26 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include "qpoe.h"
+
+# QP_CLOSE -- Close an open QPOE descriptor and file.
+
+procedure qp_close (qp)
+
+pointer qp #I QPOE descriptor
+
+begin
+ # An open/close should produce an empty poefile.
+ if (QP_ACTIVE(qp) == NO) {
+ QP_MODIFIED(qp) = YES
+ call qp_bind (qp)
+ }
+
+ # Update the poefile on disk.
+ call qp_flushpar (qp)
+ call qp_sync (qp)
+
+ # Shut everything down.
+ call stclose (QP_ST(qp))
+ call fm_close (QP_FM(qp))
+ call mfree (qp, TY_STRUCT)
+end