aboutsummaryrefslogtreecommitdiff
path: root/pkg/system/unprotect.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /pkg/system/unprotect.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/system/unprotect.x')
-rw-r--r--pkg/system/unprotect.x23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkg/system/unprotect.x b/pkg/system/unprotect.x
new file mode 100644
index 00000000..c265bbf8
--- /dev/null
+++ b/pkg/system/unprotect.x
@@ -0,0 +1,23 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <protect.h>
+include <error.h>
+
+# UNPROTECT -- Remove protection from a list of files.
+
+procedure t_unprotect()
+
+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, REMOVE_PROTECTION))
+ call erract (EA_WARN)
+
+ call clpcls (list)
+end