aboutsummaryrefslogtreecommitdiff
path: root/pkg/images/tv/imexamine/ieimname.x
blob: 3b1bd5e96e5ff5bff8e4544cacae554cd11775a1 (plain) (blame)
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
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

# IE_IMNAME -- Get the name of the image displayed in a display frame.

procedure ie_imname (ds, frame, imname, maxch)

pointer	ds			#I display descriptor
int	frame			#I display frame
char	imname[maxch]		#O image name
int	maxch			#I max chars out

int	snx, sny, dx, dy, dnx, dny, status, imd_query_map()
real	sx, sy
pointer	sp, reg, dname, iw
pointer	iw_open()
errchk	imd_query_map, iw_open

begin
	call smark (sp)
	call salloc (reg, SZ_FNAME, TY_CHAR)
	call salloc (dname, SZ_FNAME, TY_CHAR)

	if (imd_query_map (frame, Memc[reg], sx, sy, snx, sny, dx, dy, dnx, dny,
	    Memc[dname]) == ERR) {
	    iw = iw_open (ds, frame/100, Memc[dname], SZ_FNAME, status)
	    call iw_close (iw)
	}

	# call imgimage (Memc[dname], imname, maxch)
	call strcpy (Memc[dname], imname, maxch)

	call sfree (sp)
end