aboutsummaryrefslogtreecommitdiff
path: root/sys/imfort/imgkwd.x
blob: cd3c679dd5f151c044e2f4234247475ac5237e56 (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
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	"imfort.h"

# IMGKWD -- Return the value of the named header keyword as a double.

procedure imgkwd (im, keyw, dval, ier)

pointer	im			# imfort image descriptor
%       character*(*) keyw
double	dval
int	ier

pointer	sp, kp
double	imgetd()
int	errcode()

begin
	call smark (sp)
	call salloc (kp, SZ_KEYWORD, TY_CHAR)

	call f77upk (keyw, Memc[kp], SZ_KEYWORD)
	iferr (dval = imgetd (im, Memc[kp])) {
	    ier = errcode()
	    call im_seterrop (ier, Memc[kp])
	} else
	    ier = OK

	call sfree (sp)
end