aboutsummaryrefslogtreecommitdiff
path: root/sys/imfort/imflsh.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/imfort/imflsh.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/imfort/imflsh.x')
-rw-r--r--sys/imfort/imflsh.x33
1 files changed, 33 insertions, 0 deletions
diff --git a/sys/imfort/imflsh.x b/sys/imfort/imflsh.x
new file mode 100644
index 00000000..5ae36b2f
--- /dev/null
+++ b/sys/imfort/imflsh.x
@@ -0,0 +1,33 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include "imfort.h"
+
+# IMFLSH -- Flush any buffered image data, i.e., synchronize the in-core
+# version of an image with that on disk.
+
+procedure imflsh (im, ier)
+
+pointer im # image descriptor
+int ier
+
+int status
+int bfflsh()
+
+begin
+ ier = OK
+
+ # Flush any buffered output pixel data.
+ status = bfflsh (IM_PIXFP(im))
+ if (status == ERR)
+ ier = IE_FLUSH
+
+ # Update the image header if it has been modified.
+ if (IM_HDRFP(im) != NULL) {
+ if (IM_UPDATE(im) == YES) {
+ call imf_updhdr (im, status)
+ if (status == ERR && ier == OK)
+ ier = IE_UPDHDR
+ }
+ } else if (IM_UPDATE(im) == YES && ier == OK)
+ ier = IE_UPDRO
+end