aboutsummaryrefslogtreecommitdiff
path: root/sys/imfort/imgkwb.x
blob: 8aad973aab32b5560f738b75c2006f2207a33de0 (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"

# IMGKWB -- Return the value of the named header keyword as a boolean.

procedure imgkwb (im, keyw, bval, ier)

pointer	im			# imfort image descriptor
%       character*(*) keyw
bool	bval
int	ier

pointer	sp, kp
bool	imgetb()
int	errcode()

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

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

	call sfree (sp)
end