aboutsummaryrefslogtreecommitdiff
path: root/pkg/tbtables/tbfres.x
blob: d626457d152df0235ace45527ae2ead50c5c598d (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
include <tbset.h>

# tbfres -- is the keyword a FITS reserved keyword?
# If the input keyword is "NAXIS", "TTYPEn", etc, this routine returns YES;
# otherwise NO is returned.
#
# Phil Hodge,  6-Jul-1995  Subroutine created
# Phil Hodge, 13-Nov-1995  Change type from bool to int.

int procedure tbfres (keyword)

char	keyword[ARB]		# i: name of parameter
#--
char	uckey[SZ_KEYWORD]	# keyword converted to upper case
int	strncmp()
bool	streq()

begin
	call strcpy (keyword, uckey, SZ_KEYWORD)
	call strupr (uckey)

	if (streq (uckey, "XTENSION"))
	    return (YES)
	else if (streq (uckey, "BITPIX"))
	    return (YES)
	else if (strncmp (uckey, "NAXIS", 5) == 0)
	    return (YES)
	else if (streq (uckey, "PCOUNT"))
	    return (YES)
	else if (streq (uckey, "GCOUNT"))
	    return (YES)
	else if (streq (uckey, "TFIELDS"))
	    return (YES)
	else if (streq (uckey, "END"))
	    return (YES)
	else if (strncmp (uckey, "TBCOL", 5) == 0)
	    return (YES)
	else if (strncmp (uckey, "TFORM", 5) == 0)
	    return (YES)
	else if (strncmp (uckey, "TTYPE", 5) == 0)
	    return (YES)
	else if (strncmp (uckey, "TUNIT", 5) == 0)
	    return (YES)
	else if (strncmp (uckey, "TSCAL", 5) == 0)
	    return (YES)
	else if (strncmp (uckey, "TZERO", 5) == 0)
	    return (YES)
	else if (strncmp (uckey, "TNULL", 5) == 0)
	    return (YES)
	else if (strncmp (uckey, "TDISP", 5) == 0)
	    return (YES)
	else if (strncmp (uckey, "TDIM", 4) == 0)
	    return (YES)
	else if (streq (uckey, "THEAP"))
	    return (YES)

	return (NO)
end