From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- vendor/x11iraf/cdl/test/zzdebug.x | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 vendor/x11iraf/cdl/test/zzdebug.x (limited to 'vendor/x11iraf/cdl/test/zzdebug.x') 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 -- cgit