aboutsummaryrefslogtreecommitdiff
path: root/pkg/images/tv/display/dsmap.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/images/tv/display/dsmap.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'pkg/images/tv/display/dsmap.x')
-rw-r--r--pkg/images/tv/display/dsmap.x33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkg/images/tv/display/dsmap.x b/pkg/images/tv/display/dsmap.x
new file mode 100644
index 00000000..4a5f7e9c
--- /dev/null
+++ b/pkg/images/tv/display/dsmap.x
@@ -0,0 +1,33 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <mach.h>
+include <imset.h>
+include <fset.h>
+
+# DSMAP -- Map the display, i.e., open the display device as an imagefile.
+
+pointer procedure dsmap (frame, mode, color, chan)
+
+int frame
+int mode
+int color
+int chan[ARB]
+
+pointer ds
+char device[SZ_FNAME]
+
+int imstati(), fstati(), envgets(), imdopen()
+extern imdopen()
+pointer imdmap()
+errchk imdmap
+
+begin
+ if (envgets ("stdimage", device, SZ_FNAME) == 0)
+ call error (1, "variable `stdimage' not defined in environment")
+
+ ds = imdmap (device, mode, imdopen)
+ chan[1] = fstati (imstati (ds, IM_PIXFD), F_CHANNEL)
+ chan[2] = color
+
+ return (ds)
+end