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/etc/xerpue.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/etc/xerpue.x')
-rw-r--r-- | sys/etc/xerpue.x | 32 |
1 files changed, 32 insertions, 0 deletions
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 <config.h> +include <mach.h> +include <fio.h> + +# 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 <fio.com> + +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 |