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/kfprot.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/ki/kfprot.x')
-rw-r--r-- | sys/ki/kfprot.x | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sys/ki/kfprot.x b/sys/ki/kfprot.x new file mode 100644 index 00000000..d2338d8f --- /dev/null +++ b/sys/ki/kfprot.x @@ -0,0 +1,33 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <mach.h> +include "ki.h" + +# KFPROT -- Set or query file protection. + +procedure kfprot (osfn, protflag, status) + +char osfn[ARB] # packed os filename +int protflag # set/query flag +int status # answer; yes or no + +int server +int ki_connect(), ki_sendrcv() +include "kii.com" + +begin + server = ki_connect (osfn) + + if (server == NULL) { + call strpak (p_sbuf[p_arg[1]], p_sbuf, SZ_SBUF) + call zfprot (p_sbuf, protflag, status) + + } else { + p_arg[2] = protflag + + if (ki_sendrcv (server, KI_ZFPROT, 0) == ERR) + status = ERR + else + status = p_arg[1] + } +end |