From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- sys/imfort/imflsh.x | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sys/imfort/imflsh.x (limited to 'sys/imfort/imflsh.x') 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 -- cgit