From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/ki/kfprot.x | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sys/ki/kfprot.x (limited to 'sys/ki/kfprot.x') 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 +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 -- cgit