aboutsummaryrefslogtreecommitdiff
path: root/noao/onedspec/smw/smwmultispec.x
blob: 18e2dbd055912730ce01e1bd0583be81153028d3 (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
include	<smw.h>


# SMW_MULTISPEC -- Setup the MULTISPEC SMW parameters.

procedure smw_multispec (im, smw)

pointer	im			#I IMIO pointer
pointer	smw			#U MWCS pointer input SMW pointer output

int	i, j, k
pointer	sp, key, val, mw
errchk	smw_open, smw_saxes, smw_sapid

begin
	call smark (sp)
	call salloc (key, SZ_FNAME, TY_CHAR)
	call salloc (val, SZ_LINE, TY_CHAR)

	call smw_open (smw, NULL, im)
	do i = 1, SMW_NSPEC(smw) {
	    call smw_mw (smw, i, 1, mw, j, k)
	    call sprintf (Memc[key], SZ_FNAME, "APID%d")
		call pargi (j)
	    ifnoerr (call imgstr (im, Memc[key], Memc[val], SZ_LINE))
		call smw_sapid (smw, i, 1, Memc[val])
	}

	call sfree (sp)
end