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/ki/kcldir.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/ki/kcldir.x')
-rw-r--r-- | sys/ki/kcldir.x | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sys/ki/kcldir.x b/sys/ki/kcldir.x new file mode 100644 index 00000000..8f85f82f --- /dev/null +++ b/sys/ki/kcldir.x @@ -0,0 +1,44 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <mach.h> +include <config.h> +include "ki.h" + +# KCLDIR -- Close a directory file. + +procedure kcldir (chan, status) + +int chan # channel descriptor +int status # answer; ok or err + +int server +int ki_sendrcv() +include "kichan.com" +include "kii.com" + +begin + # Possible if an abort occurs during the open. + if (chan <= 0) { + status = OK + return + } + + server = k_node[chan] + + if (server == NULL) { + call zcldir (k_oschan[chan], status) + + } else { + p_arg[1] = k_oschan[chan] + p_sbuflen = 0 + + if (ki_sendrcv (server, KI_ZCLDIR, 0) == ERR) + status = ERR + else + status = p_arg[1] + + call mfree (k_bufp[chan], TY_STRUCT) + } + + call ki_freechan (chan) +end |