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/fio/getci.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/fio/getci.x')
-rw-r--r-- | sys/fio/getci.x | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/fio/getci.x b/sys/fio/getci.x new file mode 100644 index 00000000..64dd6f66 --- /dev/null +++ b/sys/fio/getci.x @@ -0,0 +1,27 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <config.h> +include <fio.h> + +# GETCI -- Get a character (passed as an integer) from a file. + +int procedure getci (fd, ch) + +int fd # input file +int ch # character (output) +int filbuf() +errchk filbuf +include <fio.com> + +begin + if (iop[fd] < bufptr[fd] || iop[fd] >= itop[fd]) + if (filbuf(fd) == EOF) { + ch = EOF + return (EOF) + } + + ch = Memc[iop[fd]] + iop[fd] = iop[fd] + 1 + + return (ch) +end |