diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/gio/nsppkern/gktclose.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/nsppkern/gktclose.x')
-rw-r--r-- | sys/gio/nsppkern/gktclose.x | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sys/gio/nsppkern/gktclose.x b/sys/gio/nsppkern/gktclose.x new file mode 100644 index 00000000..9ab73c34 --- /dev/null +++ b/sys/gio/nsppkern/gktclose.x @@ -0,0 +1,35 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "gkt.h" + +# GKT_CLOSE -- Close the nspp translation kernel. Close the spool file so +# the output is finally plotted. Free up storage. + +procedure gkt_close() + +include "gkt.com" + +begin + # If there is anything in the metafile, flush it and add a frame + # advance if required for the device. + + if (g_ndraw > 0 || g_nframes > 0) { + # Does this device require a frame advance at end of metafile? + if (GKT_ENDFRAME(g_kt) == YES) + call frame() + + # The call to the NSPP flush procedure must be escaped to avoid + # interpretation as the FIO flush procedure. + +% call mcflsh + } + + # Close output metafile, disposing of it to the host system. + call close (g_out) + + # Free kernel data structures. + call mfree (GKT_SBUF(g_kt), TY_CHAR) + call mfree (g_kt, TY_STRUCT) + + g_kt = NULL +end |