aboutsummaryrefslogtreecommitdiff
path: root/vendor/x11iraf/cdl/test/zzdebug.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 /vendor/x11iraf/cdl/test/zzdebug.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'vendor/x11iraf/cdl/test/zzdebug.x')
-rw-r--r--vendor/x11iraf/cdl/test/zzdebug.x44
1 files changed, 44 insertions, 0 deletions
diff --git a/vendor/x11iraf/cdl/test/zzdebug.x b/vendor/x11iraf/cdl/test/zzdebug.x
new file mode 100644
index 00000000..352b0657
--- /dev/null
+++ b/vendor/x11iraf/cdl/test/zzdebug.x
@@ -0,0 +1,44 @@
+include "../cdlspp.h"
+
+# ZZDEBUG -- Quickie demo tasks of the CDL SPP language binding.
+
+
+task display = t_display,
+ tvmark = t_tvmark,
+ rimcur = t_rimcur
+
+
+procedure t_display ()
+int ier
+begin
+ call cdl_open ("", ier)
+ call cdl_displayIRAF ("/iraf/iraf/dev/pix.imh", 1, 1, 1, 1, ier)
+ call cdl_close ()
+end
+
+procedure t_tvmark ()
+int ier
+begin
+ call cdl_open ("", ier)
+ call cdl_displayIRAF ("/iraf/iraf/dev/pix.imh", 1, 1, 1, 1, ier)
+ call cdl_markCoordsFile ("coords", M_PLUS, 11, C_GREEN, YES, ier)
+ call cdl_close ()
+end
+
+procedure t_rimcur ()
+int ier
+char key
+real x, y
+begin
+ call cdl_open ("", ier)
+ key = 'a'
+ while (key != 'q' && key != EOS) {
+ call cdl_readCursor (0, x, y, key, ier)
+ call printf ("x=%.2g y=%.2g key='%c' ier=%d\n")
+ call pargr (x)
+ call pargr (y)
+ call pargc (key)
+ call pargi (ier)
+ }
+ call cdl_close ()
+end