aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/gks/gqchup.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/gks/gqchup.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/gks/gqchup.x')
-rw-r--r--sys/gio/gks/gqchup.x39
1 files changed, 39 insertions, 0 deletions
diff --git a/sys/gio/gks/gqchup.x b/sys/gio/gks/gqchup.x
new file mode 100644
index 00000000..3f12d8c4
--- /dev/null
+++ b/sys/gio/gks/gqchup.x
@@ -0,0 +1,39 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <gset.h>
+include "gks.h"
+
+# GQCHUP -- Inquire character up vector.
+
+procedure gqchup (ierror, chupx, chupy)
+
+int ierror # Error code; ierror = 0 for no error
+real chupx, chupy # Character up vector x and y components
+
+int angle
+real txup
+int gstati()
+include "gks.com"
+
+begin
+ if (gk_std == NULL) {
+ # GKS not in proper state; no active workstations
+ ierror = 7
+ chupx = 0.0
+ chupy = 0.0
+ return
+ } else
+ ierror = 0
+
+ iferr {
+ angle = gstati (gp[gk_std], G_TXUP)
+
+ txup = real (angle) * 3.1415926 / 180.
+ chupx = cos (txup)
+ chupy = sin (txup)
+ } then {
+ ierror = 1
+ chupx = 0.0
+ chupy = 0.0
+ }
+end