diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/ki/ksaread.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/ki/ksaread.x')
-rw-r--r-- | sys/ki/ksaread.x | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/ki/ksaread.x b/sys/ki/ksaread.x new file mode 100644 index 00000000..824b1a67 --- /dev/null +++ b/sys/ki/ksaread.x @@ -0,0 +1,21 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "ki.h" + +# KS_AREAD -- Read from the kernel server device driver given the node +# descriptor of a kernel server channel. If the error bit is set on the +# node return error w/o doing any i/o, since the channel will have been closed. + +procedure ks_aread (server, buf, maxbytes) + +int server # node descriptor index of server +char buf[ARB] # i/o buffer +int maxbytes # maxbytes to read + +int and() +include "kinode.com" + +begin + if (and (n_status[server], F_IOERR) == 0) + call zardks (n_kschan[server], buf, maxbytes, long(0)) +end |