aboutsummaryrefslogtreecommitdiff
path: root/sys/osb/miiupk.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/osb/miiupk.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
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