From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- sys/imio/iki/ikimkfn.x | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sys/imio/iki/ikimkfn.x (limited to 'sys/imio/iki/ikimkfn.x') diff --git a/sys/imio/iki/ikimkfn.x b/sys/imio/iki/ikimkfn.x new file mode 100644 index 00000000..a224f728 --- /dev/null +++ b/sys/imio/iki/ikimkfn.x @@ -0,0 +1,26 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "iki.h" + +# IKI_MKFNAME -- Manufacture a filename from the root and extension fields +# given. + +procedure iki_mkfname (root, extn, fname, maxch) + +char root[ARB] #I root filename +char extn[ARB] #I filename extension +char fname[maxch] #O output filename +int maxch #I max chars out + +int op +int gstrcpy() +bool fnullfile() + +begin + op = gstrcpy (root, fname, maxch) + 1 + if (extn[1] != EOS && !fnullfile (root)) { + fname[op] = '.' + op = op + 1 + call strcpy (extn, fname[op], maxch-op+1) + } +end -- cgit