From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/fio/fputtx.x | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sys/fio/fputtx.x (limited to 'sys/fio/fputtx.x') diff --git a/sys/fio/fputtx.x b/sys/fio/fputtx.x new file mode 100644 index 00000000..0cea6f04 --- /dev/null +++ b/sys/fio/fputtx.x @@ -0,0 +1,22 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include + +# FPUTTX -- Put a line to a text file. Flush output if flag is set. +# Called by FLSBUF, SEEK, FLUSH, etc. to flush an output line. + +procedure fputtx (fd, buf, nchars, status) + +int fd, nchars, status +char buf[ARB] +int and() +include + +begin + fp = fiodes[fd] + call zcall4 (ZPUTTX(fp), FCHAN(fp), buf, nchars, status) + + if (status != ERR && and (FF_FLUSHNL, fflags[fd]) != 0) + call zcall2 (ZFLSTX(fp), FCHAN(fp), status) +end -- cgit