aboutsummaryrefslogtreecommitdiff
path: root/sys/osb/miiupk.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/miiupk.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/osb/miiupk.x')
-rw-r--r--sys/osb/miiupk.x29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/osb/miiupk.x b/sys/osb/miiupk.x
new file mode 100644
index 00000000..bb536987
--- /dev/null
+++ b/sys/osb/miiupk.x
@@ -0,0 +1,29 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <mii.h>
+
+# MIIUPK -- Unpack a MII array of type mii_type into a SPP array of type
+# spp_type. The mii_types are defined in mii.h.
+
+procedure miiupk (mii, spp, nelems, mii_datatype, spp_datatype)
+
+int mii[ARB] #I input MII format array
+int spp[ARB] #O output SPP format array
+int nelems #I number of integers to be converted
+int mii_datatype #I MII datatype code
+int spp_datatype #I SPP datatype code
+
+begin
+ switch (mii_datatype) {
+ case MII_BYTE:
+ call miiupk8 (mii, spp, nelems, spp_datatype)
+ case MII_SHORT:
+ call miiupk16 (mii, spp, nelems, spp_datatype)
+ case MII_LONG:
+ call miiupk32 (mii, spp, nelems, spp_datatype)
+ case MII_REAL:
+ call miiupkr (mii, spp, nelems, spp_datatype)
+ case MII_DOUBLE:
+ call miiupkd (mii, spp, nelems, spp_datatype)
+ }
+end