diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/osb/nmipksize.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/osb/nmipksize.x')
-rw-r--r-- | sys/osb/nmipksize.x | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/osb/nmipksize.x b/sys/osb/nmipksize.x new file mode 100644 index 00000000..8ccd8297 --- /dev/null +++ b/sys/osb/nmipksize.x @@ -0,0 +1,17 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <mach.h> + +# NMIPKSIZE -- Determine the size in SPP chars of the array required to store +# nelems of type nmi_type in NMI packed form. The nmi_type codes are defined +# in nmi.h; we assume here that the integer codes are the sizes of the NMI +# types in bits. + +int procedure nmipksize (nelems, nmi_type) + +int nelems #I number of NMI elements of type nmi_type +int nmi_type #I <nmi.h> type code (=8,16,32,-32,-64) + +begin + return ((nelems * abs(nmi_type) / NBITS_BYTE + SZB_CHAR-1) / SZB_CHAR) +end |