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