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

include <plset.h>
include	<plio.h>

# PL_GSIZE -- Get the dimensionality and size of a mask.

procedure pl_gsize (pl, naxes, axlen, depth)

pointer	pl			#I mask descriptor
int	naxes			#O number of axes (dimensionality of mask)
long	axlen[ARB]		#O length of each axis
int	depth			#O mask depth, bits

int	i

begin
	naxes = PL_NAXES(pl)
	call amovl (PL_AXLEN(pl,1), axlen, PL_MAXDIM)

	do i = 0, ARB
	    if (2**i > min (I_PVMAX, PL_MAXVAL(pl))) {
		depth = i
		break
	    }
end