aboutsummaryrefslogtreecommitdiff
path: root/sys/osb/nmipakr.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/nmipakr.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/osb/nmipakr.x')
-rw-r--r--sys/osb/nmipakr.x42
1 files changed, 42 insertions, 0 deletions
diff --git a/sys/osb/nmipakr.x b/sys/osb/nmipakr.x
new file mode 100644
index 00000000..ac710a2b
--- /dev/null
+++ b/sys/osb/nmipakr.x
@@ -0,0 +1,42 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <mach.h>
+
+# NMIPAKR -- Pack an SPP array of the indicated datatype into an 32 bit
+# IEEE floating format.
+
+procedure nmipakr (spp, nmi, nelems, spp_datatype)
+
+int spp[ARB] #I input array of SPP integers
+real nmi[ARB] #O output NMI format array
+int nelems #I number of integers to be converted
+int spp_datatype #I SPP datatype code
+
+begin
+ if (spp_datatype == TY_REAL)
+ call ieevpakr (spp, nmi, nelems)
+ else {
+ switch (spp_datatype) {
+ case TY_UBYTE:
+ call achtbr (spp, nmi, nelems)
+ case TY_USHORT:
+ call achtur (spp, nmi, nelems)
+ case TY_CHAR:
+ call achtcr (spp, nmi, nelems)
+ case TY_SHORT:
+ call achtsr (spp, nmi, nelems)
+ case TY_INT, TY_POINTER, TY_STRUCT:
+ call achtir (spp, nmi, nelems)
+ case TY_LONG:
+ call achtlr (spp, nmi, nelems)
+ case TY_DOUBLE:
+ call achtdr (spp, nmi, nelems)
+ case TY_COMPLEX:
+ call achtxr (spp, nmi, nelems)
+ default:
+ call amovr (spp, nmi, nelems)
+ }
+
+ call ieevpakr (nmi, nmi, nelems)
+ }
+end