diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/osb/ipak16.c | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/osb/ipak16.c')
-rw-r--r-- | sys/osb/ipak16.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/osb/ipak16.c b/sys/osb/ipak16.c new file mode 100644 index 00000000..94670857 --- /dev/null +++ b/sys/osb/ipak16.c @@ -0,0 +1,20 @@ +#define import_spp +#define import_knames +#include <iraf.h> + +/* IPAK16 - Pack an array of native ints into and array of 16-bit short. + */ +void +IPAK16 (void *a, void *b, XINT *nelems) +{ + /* MACHDEP - Works only for little-endian systems (e.g. x86) + */ + int i = 0; + int *ip = (int *) a; + short *op = (short *) b; + + for (i=0; i < *nelems; i++) { + *op = (int) *ip; + op++, ip++; + } +} |