aboutsummaryrefslogtreecommitdiff
path: root/sys/ki/ksawrite.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/ki/ksawrite.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/ki/ksawrite.x')
-rw-r--r--sys/ki/ksawrite.x21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/ki/ksawrite.x b/sys/ki/ksawrite.x
new file mode 100644
index 00000000..20c815f5
--- /dev/null
+++ b/sys/ki/ksawrite.x
@@ -0,0 +1,21 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include "ki.h"
+
+# KS_AWRITE -- Write to 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_awrite (server, buf, nbytes)
+
+int server # node descriptor index of server
+char buf[ARB] # i/o buffer
+int nbytes # nbytes to write
+
+int and()
+include "kinode.com"
+
+begin
+ if (and (n_status[server], F_IOERR) == 0)
+ call zawrks (n_kschan[server], buf, nbytes, long(0))
+end