diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/osb/miipksize.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/osb/miipksize.x')
-rw-r--r-- | sys/osb/miipksize.x | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/osb/miipksize.x b/sys/osb/miipksize.x new file mode 100644 index 00000000..16791e95 --- /dev/null +++ b/sys/osb/miipksize.x @@ -0,0 +1,17 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <mach.h> + +# MIIPKSIZE -- Determine the size in SPP chars of the array required to store +# nelems of type mii_type in MII packed form. The mii_type codes are defined +# in mii.h; we assume here that the integer codes are the sizes of the MII +# types in bits. + +int procedure miipksize (nelems, mii_type) + +int nelems #I number of MII elements of type mii_type +int mii_type #I <mii.h> type code (=8,16,32,-32,-64) + +begin + return ((nelems * abs(mii_type) / NBITS_BYTE + SZB_CHAR-1) / SZB_CHAR) +end |