summaryrefslogtreecommitdiff
path: root/ipl/gprocs/ifg.icn
diff options
context:
space:
mode:
Diffstat (limited to 'ipl/gprocs/ifg.icn')
-rw-r--r--ipl/gprocs/ifg.icn33
1 files changed, 33 insertions, 0 deletions
diff --git a/ipl/gprocs/ifg.icn b/ipl/gprocs/ifg.icn
new file mode 100644
index 0000000..433f68f
--- /dev/null
+++ b/ipl/gprocs/ifg.icn
@@ -0,0 +1,33 @@
+############################################################################
+#
+# File: ifg.icn
+#
+# Subject: Procedure to tell if graphics are running
+#
+# Author: Ralph E. Griswold
+#
+# Date: June 14 1994
+#
+############################################################################
+#
+# This file is in the public domain.
+#
+############################################################################
+#
+# ifg() fails if (a) the running version of Icon does not support
+# graphics, or (b) if it is, the graphics system is not running.
+#
+############################################################################
+
+procedure ifg()
+ local win
+
+ if (&features == "graphics") &
+ win := open("", "x", "canvas=hidden") then {
+ close(win)
+ return
+ }
+
+ else fail
+
+end