aboutsummaryrefslogtreecommitdiff
path: root/sys/ki/zzrdks.c
blob: 40229d5b115c77bbccc2f1cd5e68b5f9ab6ba04f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);
	}
}