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/etc/xerpue.x | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sys/etc/xerpue.x (limited to 'sys/etc/xerpue.x') diff --git a/sys/etc/xerpue.x b/sys/etc/xerpue.x new file mode 100644 index 00000000..9cc995ee --- /dev/null +++ b/sys/etc/xerpue.x @@ -0,0 +1,32 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include +include + +# XER_PUTLINE -- Put a line to the output file (STDERR), using only low level +# routines. It is important to use run time indirection through the device +# table here, to avoid linking the entire IPC and KI into non-IRAF programs +# that use error handlers, e.g., HSI or IMFORT programs. + +procedure xer_putline (fd, text) + +int fd +char text[ARB] + +long offset +int nchars, junk +int strlen() +include + +begin + nchars = strlen (text) + fp = fiodes[fd] + + if (FTYPE(fp) == BINARY_FILE) { + offset = 0 + call zcall4 (ZAWRBF(fp), FCHAN(fp), text, nchars * SZB_CHAR, offset) + call zcall2 (ZAWTBF(fp), FCHAN(fp), junk) + } else + call zcall4 (ZPUTTX(fp), FCHAN(fp), text, nchars, junk) +end -- cgit