aboutsummaryrefslogtreecommitdiff
path: root/sys/osb/miipak8.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/osb/miipak8.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/osb/miipak8.x')
-rw-r--r--sys/osb/miipak8.x34
1 files changed, 34 insertions, 0 deletions
diff --git a/sys/osb/miipak8.x b/sys/osb/miipak8.x
new file mode 100644
index 00000000..ea4e16ea
--- /dev/null
+++ b/sys/osb/miipak8.x
@@ -0,0 +1,34 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# MIIPAK8 -- Pack an SPP array of the indicated datatype into an 8 bit
+# unsigned MII array.
+
+procedure miipak8 (spp, mii, nelems, spp_datatype)
+
+int spp[ARB] #I input array of SPP integers
+int mii[ARB] #O output MII format array
+int nelems #I number of integers to be converted
+int spp_datatype #I SPP datatype code
+
+begin
+ switch (spp_datatype) {
+ case TY_UBYTE:
+ call achtbb (spp, mii, nelems)
+ case TY_USHORT:
+ call achtub (spp, mii, nelems)
+ case TY_CHAR:
+ call achtcb (spp, mii, nelems)
+ case TY_SHORT:
+ call achtsb (spp, mii, nelems)
+ case TY_INT, TY_POINTER, TY_STRUCT:
+ call achtib (spp, mii, nelems)
+ case TY_LONG:
+ call achtlb (spp, mii, nelems)
+ case TY_REAL:
+ call achtrb (spp, mii, nelems)
+ case TY_DOUBLE:
+ call achtdb (spp, mii, nelems)
+ case TY_COMPLEX:
+ call achtxb (spp, mii, nelems)
+ }
+end