aboutsummaryrefslogtreecommitdiff
path: root/sys/osb/iupk32.c
blob: a280b8053d537597a6d3f80c416529c2965ab677 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);
}