aboutsummaryrefslogtreecommitdiff
path: root/noao/astcat/src/agetcat/atrcsym.x
blob: 268ea86b6e20ff4398b171d1120eeb70e1a3722b (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
include "../../lib/astrom.h"

# AT_RCSYM -- Return the symbol for the specified field nymber.

pointer procedure at_rcsym (at, fieldno)

pointer	at		#I the astrometry package descriptor
int	fieldno		#I the region whose symbol is to be locate

pointer	sp, symname, st, sym
pointer	at_statp(), stfind()

begin
	st = at_statp (at, RCST)
	if (st == NULL)
	    return (NULL)

	call smark (sp)
	call salloc (symname, SZ_FNAME, TY_CHAR)

	call sprintf (Memc[symname], SZ_FNAME, "%s%d")
	    call pargstr (DEF_RCST_ROOTNAME)
	    call pargi (fieldno)
	sym = stfind (st, Memc[symname])

	call sfree (sp)

	return (sym)
end