aboutsummaryrefslogtreecommitdiff
path: root/sys/plio/plgsize.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/plio/plgsize.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/plio/plgsize.x')
-rw-r--r--sys/plio/plgsize.x26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/plio/plgsize.x b/sys/plio/plgsize.x
new file mode 100644
index 00000000..40e73ac3
--- /dev/null
+++ b/sys/plio/plgsize.x
@@ -0,0 +1,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