aboutsummaryrefslogtreecommitdiff
path: root/pkg/system/protect.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/system/protect.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'pkg/system/protect.x')
-rw-r--r--pkg/system/protect.x23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkg/system/protect.x b/pkg/system/protect.x
new file mode 100644
index 00000000..4ed12db9
--- /dev/null
+++ b/pkg/system/protect.x
@@ -0,0 +1,23 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <protect.h>
+include <error.h>
+
+# PROTECT -- Protect a list of files.
+
+procedure t_protect()
+
+char fname[SZ_FNAME]
+int list, status
+
+int clpopns(), clgfil(), protect()
+
+begin
+ list = clpopns ("files")
+
+ while (clgfil (list, fname, SZ_FNAME) != EOF)
+ iferr (status = protect (fname, SET_PROTECTION))
+ call erract (EA_WARN)
+
+ call clpcls (list)
+end