aboutsummaryrefslogtreecommitdiff
path: root/sys/osb/nmiupk.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/nmiupk.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/osb/nmiupk.x')
-rw-r--r--sys/osb/nmiupk.x29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/osb/nmiupk.x b/sys/osb/nmiupk.x
new file mode 100644
index 00000000..074f74bb
--- /dev/null
+++ b/sys/osb/nmiupk.x
@@ -0,0 +1,29 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <nmi.h>
+
+# NMIUPK -- Unpack a NMI array of type nmi_type into a SPP array of type
+# spp_type. The nmi_types are defined in nmi.h.
+
+procedure nmiupk (nmi, spp, nelems, nmi_datatype, spp_datatype)
+
+int nmi[ARB] #I input NMI format array
+int spp[ARB] #O output SPP format array
+int nelems #I number of integers to be converted
+int nmi_datatype #I NMI datatype code
+int spp_datatype #I SPP datatype code
+
+begin
+ switch (nmi_datatype) {
+ case NMI_BYTE:
+ call nmiupk8 (nmi, spp, nelems, spp_datatype)
+ case NMI_SHORT:
+ call nmiupk16 (nmi, spp, nelems, spp_datatype)
+ case NMI_LONG:
+ call nmiupk32 (nmi, spp, nelems, spp_datatype)
+ case NMI_REAL:
+ call nmiupkr (nmi, spp, nelems, spp_datatype)
+ case NMI_DOUBLE:
+ call nmiupkd (nmi, spp, nelems, spp_datatype)
+ }
+end