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/fio/fflsbf.x | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sys/fio/fflsbf.x (limited to 'sys/fio/fflsbf.x') diff --git a/sys/fio/fflsbf.x b/sys/fio/fflsbf.x new file mode 100644 index 00000000..7503609a --- /dev/null +++ b/sys/fio/fflsbf.x @@ -0,0 +1,27 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include +include + +# FFLSBF -- Flush the file buffer. Called by FFAULT to initiate a write +# of the file buffer when a fault occurs. + +procedure fflsbf (fd, bp, maxchars, buffer_offset) + +int fd +pointer bp +int maxchars +long buffer_offset +errchk fwatio +include + +begin + fp = fiodes[fd] + + if (FBUFMODE(fp) != INACTIVE) + call fwatio (fd) + call awrite (fd, Memc[bp], maxchars, buffer_offset) + + FBUFMODE(fp) = WRITE_IN_PROGRESS +end -- cgit