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/ki/ktzstt.x | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sys/ki/ktzstt.x (limited to 'sys/ki/ktzstt.x') diff --git a/sys/ki/ktzstt.x b/sys/ki/ktzstt.x new file mode 100644 index 00000000..c7ca9463 --- /dev/null +++ b/sys/ki/ktzstt.x @@ -0,0 +1,32 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include +include "ki.h" + +# KT_ZSTT -- Get file status on a text device. We are called only if the +# device does not reside on the local node. + +procedure kt_zstt (device, chan, what, lvalue) + +int device # device driver code +int chan # channel assigned device +int what # file parameter to be returned +long lvalue # receives the parameter value + +int server +int ki_sendrcv() +long ki_decode() +include "kichan.com" +include "kii.com" + +begin + server = k_node[chan] + p_arg[1] = k_oschan[chan] + p_arg[2] = what + + if (ki_sendrcv (server, device, TX_STT) == ERR) + lvalue = ERR + else + lvalue = ki_decode (p_sbuf, NCHARS_LONG) +end -- cgit