aboutsummaryrefslogtreecommitdiff
path: root/pkg/images/tv/iis/iism70/iisopn.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 /pkg/images/tv/iis/iism70/iisopn.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/images/tv/iis/iism70/iisopn.x')
-rw-r--r--pkg/images/tv/iis/iism70/iisopn.x35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkg/images/tv/iis/iism70/iisopn.x b/pkg/images/tv/iis/iism70/iisopn.x
new file mode 100644
index 00000000..29335c62
--- /dev/null
+++ b/pkg/images/tv/iis/iism70/iisopn.x
@@ -0,0 +1,35 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <mach.h>
+include <knet.h>
+include "iis.h"
+
+# IISOPN -- Open IIS display.
+
+procedure iisopn (devinfo, mode, chan)
+
+char devinfo[ARB] # device info for zopen
+int mode # access mode
+int chan[ARB] # receives IIS descriptor
+
+bool first_time
+data first_time /true/
+include "iis.com"
+
+begin
+ if (first_time) {
+ iisnopen = 0
+ first_time = false
+ }
+
+ # We permit multiple opens but only open the physical device once.
+ if (iisnopen == 0)
+ call zopngd (devinfo, mode, iischan)
+
+ if (iischan == ERR)
+ chan[1] = ERR
+ else {
+ iisnopen = iisnopen + 1
+ chan[1] = iischan
+ }
+end