File: zzdebug.x

package info (click to toggle)
x11iraf 1.2-4
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 13,168 kB
  • ctags: 14,531
  • sloc: ansic: 143,143; makefile: 964; perl: 549; csh: 249; yacc: 247; fortran: 238; tcl: 199; lex: 125; lisp: 88; sh: 23; sed: 6
file content (44 lines) | stat: -rw-r--r-- 867 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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