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 /unix/gdev/iism75/zopm75.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'unix/gdev/iism75/zopm75.x')
-rw-r--r-- | unix/gdev/iism75/zopm75.x | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/unix/gdev/iism75/zopm75.x b/unix/gdev/iism75/zopm75.x new file mode 100644 index 00000000..33a9acf8 --- /dev/null +++ b/unix/gdev/iism75/zopm75.x @@ -0,0 +1,32 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <mach.h> +include "m75.h" + +# ZOPM75 -- Open the IIS for binary file i/o. + +procedure zopm75 (device, mode, ifcb) + +char device[ARB] # packed UNIX device name +int mode # access mode +int ifcb # pointer to channel descriptor passed as int + +pointer fcb +int chan + +begin + call calloc (fcb, LEN_FCB, TY_STRUCT) + ifcb = fcb + + FCB_STATUS(fcb) = IIS_INACTIVE + FCB_NBYTES(fcb) = 0 + FCB_STATE(fcb) = READY + + call zopnbf (device, mode, chan) + + if (chan < 0) { + call mfree (fcb, TY_STRUCT) + ifcb = ERR + } else + FCB_CHAN(fcb) = chan +end |