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/putci.x | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sys/fio/putci.x (limited to 'sys/fio/putci.x') diff --git a/sys/fio/putci.x b/sys/fio/putci.x new file mode 100644 index 00000000..eeedb30e --- /dev/null +++ b/sys/fio/putci.x @@ -0,0 +1,26 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include + +# PUTCI -- Put a character constant (passed as an integer) to a file. + +procedure putci (fd, ch) + +int fd # output file +int ch # character to be output +int and() +errchk flsbuf +include + +begin + if (iop[fd] < bufptr[fd] || iop[fd] >= otop[fd]) + call flsbuf (fd, 0) + + Memc[iop[fd]] = ch + iop[fd] = iop[fd] + 1 + + if (ch == '\n') # end of line of text? + if (and (FF_FLUSH, fflags[fd]) != 0) + call flsbuf (fd, 0) +end -- cgit