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/fmio/fmlfbwt.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/fmio/fmlfbwt.x')
-rw-r--r-- | sys/fmio/fmlfbwt.x | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/fmio/fmlfbwt.x b/sys/fmio/fmlfbwt.x new file mode 100644 index 00000000..2310c281 --- /dev/null +++ b/sys/fmio/fmlfbwt.x @@ -0,0 +1,32 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <knet.h> +include "fmio.h" + +# FM_LFBINWAIT -- Wait for i/o on a binary lfile. + +procedure fm_lfbinwait (lf, status) + +pointer lf #I lfile descriptor +int status #O i/o status (nbytes transferred or ERR) + +pointer fm +int chan + +begin + fm = LF_FM(lf) + chan = FM_CHAN(fm) + + # Wait for i/o and increment byte count. + if (and (LF_FLAGS(lf), LFF_IOINPROGRESS) != 0) { + call zawtbf (chan, status) + if (status >= 0) + LF_STATUS(lf) = LF_STATUS(lf) + min(LF_LTSIZE(lf),status) + else + LF_STATUS(lf) = ERR + LF_FLAGS(lf) = and (LF_FLAGS(lf), not(LFF_IOINPROGRESS)) + } + + call fmio_tick (fm) + status = LF_STATUS(lf) +end |