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/etc/nmireadb.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/etc/nmireadb.x')
-rw-r--r-- | sys/etc/nmireadb.x | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/etc/nmireadb.x b/sys/etc/nmireadb.x new file mode 100644 index 00000000..dc23866c --- /dev/null +++ b/sys/etc/nmireadb.x @@ -0,0 +1,32 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <nmi.h> + + +# NMI_READB -- Read a block of data stored externally in NMI format. +# Data is returned in the format of the local host machine. + +int procedure nmi_readb (fd, spp, maxelem) + +int fd #I input file +bool spp[ARB] #O receives data +int maxelem # max number of data elements to be read + +pointer sp, bp +int pksize, nchars, nelem +int nminelem(), read() +errchk read() + +long note() + +begin + pksize = nminelem (maxelem, NMI_INT) + nelem = EOF + + # Read data into user buffer and unpack in place. + nchars = read (fd, spp, pksize) + if (nchars != EOF) + nelem = min (maxelem, pksize) + + return (nelem) +end |