aboutsummaryrefslogtreecommitdiff
path: root/sys/ki/zzrdks.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/ki/zzrdks.c
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/ki/zzrdks.c')
-rw-r--r--sys/ki/zzrdks.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/ki/zzrdks.c b/sys/ki/zzrdks.c
new file mode 100644
index 00000000..40229d5b
--- /dev/null
+++ b/sys/ki/zzrdks.c
@@ -0,0 +1,29 @@
+/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+ */
+
+int spoolit = 0;
+int spoolfd = 0;
+
+/* Intercept KS intput and spool in a file for subsequent debugging.
+ * [MACHDEP]. This is a UNIX dependent debugging routine. To get rid of
+ * it, delete the file, edit the Makefile, and change the reference to
+ * zzrdks in irafks.x to zardks.
+ */
+zzrdks_ (chan, buf, maxb, off)
+int *chan;
+short *buf;
+int *maxb;
+int *off;
+{
+ int status;
+
+ zardks_ (chan, buf, maxb, off);
+
+ if (spoolit) {
+ if (spoolfd == 0)
+ spoolfd = creat ("/tmp/ks.in", 0644);
+ zawtks_ (chan, &status);
+ if (status > 0)
+ write (spoolfd, buf, status);
+ }
+}