diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/xtools/gtools/gtcur1.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/xtools/gtools/gtcur1.x')
-rw-r--r-- | pkg/xtools/gtools/gtcur1.x | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pkg/xtools/gtools/gtcur1.x b/pkg/xtools/gtools/gtcur1.x new file mode 100644 index 00000000..edb42299 --- /dev/null +++ b/pkg/xtools/gtools/gtcur1.x @@ -0,0 +1,38 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "gtools.h" + +# GT_GCUR1 -- Interface to clgcur to confirm EOF, map key 'q' to EOF. +# Transposes X and Y if needed. + +int procedure gt_gcur1 (gt, cur, wx, wy, wcs, key, cmd, sz_cmd) + +pointer gt # GTOOLS pointer +char cur[ARB] # Cursor parameter +real wx, wy # Cursor position +int wcs, key # WCS and cursor key +char cmd[sz_cmd] # Command string +int sz_cmd # Size of command string + +int curval, clgcur() +real temp + +begin + curval = clgcur (cur, wx, wy, wcs, key, cmd, sz_cmd) + + if (curval == EOF) { + curval = clgcur (cur, wx, wy, wcs, key, cmd, sz_cmd) + if (curval != EOF) { + if (key == 'q') + curval = EOF + } + } else if (key == 'q') + curval = EOF + + if (GT_TRANSPOSE(gt) == YES) { + temp = wx + wx = wy + wy = temp + } + return (curval) +end |