aboutsummaryrefslogtreecommitdiff
path: root/unix/gdev/iism75/zwtm75.x
diff options
context:
space:
mode:
Diffstat (limited to 'unix/gdev/iism75/zwtm75.x')
-rw-r--r--unix/gdev/iism75/zwtm75.x29
1 files changed, 29 insertions, 0 deletions
diff --git a/unix/gdev/iism75/zwtm75.x b/unix/gdev/iism75/zwtm75.x
new file mode 100644
index 00000000..491b0f50
--- /dev/null
+++ b/unix/gdev/iism75/zwtm75.x
@@ -0,0 +1,29 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <mach.h>
+include "m75.h"
+
+# ZWTM75 -- Wait for i/o completion and return the number of bytes read or
+# written or ERR. Repetitive calls return the same value.
+
+procedure zwtm75 (ifcb, status)
+
+int ifcb # pointer to channel descriptor passed as int
+int status # nbytes transferred or ERR
+
+pointer fcb
+
+begin
+ fcb = ifcb
+
+ switch (FCB_STATUS(fcb)) {
+ case ERR:
+ status = ERR
+ case IIS_INACTIVE:
+ status = FCB_NBYTES(fcb)
+
+ default:
+ call zawtbf (FCB_CHAN(fcb), status)
+ FCB_STATUS(fcb) = IIS_INACTIVE
+ }
+end