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/imio/iki/plf/plfcopy.x | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sys/imio/iki/plf/plfcopy.x (limited to 'sys/imio/iki/plf/plfcopy.x') diff --git a/sys/imio/iki/plf/plfcopy.x b/sys/imio/iki/plf/plfcopy.x new file mode 100644 index 00000000..4cfb2b6e --- /dev/null +++ b/sys/imio/iki/plf/plfcopy.x @@ -0,0 +1,38 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include "plf.h" + +# PLF_COPY -- Copy an image. A special operator is provided for fast, blind +# copies of entire images. + +procedure plf_copy (kernel, old_root, old_extn, new_root, new_extn, status) + +int kernel #I IKI kernel +char old_root[ARB] #I old image root name +char old_extn[ARB] #I old image extn +char new_root[ARB] #I new image root name +char new_extn[ARB] #I new extn +int status #O output status + +pointer sp +pointer oldname, newname + +begin + call smark (sp) + call salloc (oldname, SZ_PATHNAME, TY_CHAR) + call salloc (newname, SZ_PATHNAME, TY_CHAR) + + # Get filename of old and new images. + call iki_mkfname (old_root, old_extn, Memc[oldname], SZ_PATHNAME) + call iki_mkfname (new_root, PLF_EXTN, Memc[newname], SZ_PATHNAME) + + # Copy the PLIO mask save file. + iferr (call fcopy (Memc[oldname], Memc[newname])) { + call erract (EA_WARN) + status = ERR + } else + status = OK + + call sfree (sp) +end -- cgit