aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/gpagefile.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/gio/gpagefile.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/gpagefile.x')
-rw-r--r--sys/gio/gpagefile.x29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/gio/gpagefile.x b/sys/gio/gpagefile.x
new file mode 100644
index 00000000..df950e71
--- /dev/null
+++ b/sys/gio/gpagefile.x
@@ -0,0 +1,29 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <error.h>
+include <gset.h>
+include <gio.h>
+
+# GPAGEFILE -- File pager which works in or out of cursor mode. If in graphics
+# mode, the workstation is deactivated, the file paged, and graphics mode later
+# restored.
+
+procedure gpagefile (gp, fname, prompt)
+
+pointer gp # graphics descriptor
+char fname[ARB] # name of file to be paged
+char prompt[ARB] # user prompt string
+
+bool wsactive
+int and()
+
+begin
+ wsactive = (and (GP_GFLAGS(gp), GF_WSACTIVE) != 0)
+
+ if (wsactive)
+ call gdeactivate (gp, 0)
+ iferr (call pagefile (fname, prompt))
+ call erract (EA_WARN)
+ if (wsactive)
+ call greactivate (gp, AW_PAUSE)
+end