aboutsummaryrefslogtreecommitdiff
path: root/sys/osb/iupk32.c
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/iupk32.c
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/osb/iupk32.c')
-rw-r--r--sys/osb/iupk32.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/osb/iupk32.c b/sys/osb/iupk32.c
new file mode 100644
index 00000000..a280b805
--- /dev/null
+++ b/sys/osb/iupk32.c
@@ -0,0 +1,23 @@
+#define import_spp
+#define import_knames
+#include <iraf.h>
+
+
+/* IUPK32 - Unpack 32-bit int into and array of 64-bit int.
+ */
+void
+IUPK32 (void *a, void *b, XINT *nelems)
+{
+ XINT i, *tmp;
+ XINT *op = (XINT *) calloc (*nelems, sizeof (XINT));
+ int *ip = (int *) a;
+
+
+ tmp = op;
+ for (i=0; i < *nelems; i++) {
+ *tmp++ = *ip++;
+ }
+ memmove (b, op, *nelems * sizeof (XINT));
+
+ free (op);
+}