aboutsummaryrefslogtreecommitdiff
path: root/sys/imio/iki/stf/stfclose.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/imio/iki/stf/stfclose.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/imio/iki/stf/stfclose.x')
-rw-r--r--sys/imio/iki/stf/stfclose.x32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/imio/iki/stf/stfclose.x b/sys/imio/iki/stf/stfclose.x
new file mode 100644
index 00000000..89981578
--- /dev/null
+++ b/sys/imio/iki/stf/stfclose.x
@@ -0,0 +1,32 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <imhdr.h>
+include <imio.h>
+include "stf.h"
+
+# STF_CLOSE -- Close an STF format image. There is little for us to do, since
+# IMIO will already have updated the header if necessary and flushed any pixel
+# output. Neither do we have to deallocate the IMIO descriptor, since it was
+# allocated by IMIO.
+
+procedure stf_close (im, status)
+
+pointer im # image descriptor
+int status
+
+pointer stf
+errchk close
+
+begin
+ stf = IM_KDES(im)
+
+ # Close the pixel file and header file, if open.
+ if (STF_PFD(stf) != NULL)
+ call close (STF_PFD(stf))
+ if (IM_HFD(im) != NULL)
+ call close (IM_HFD(im))
+
+ # Deallocate the STF descirptor.
+ call mfree (IM_KDES(im), TY_STRUCT)
+ status = OK
+end