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/fio/fnextn.x | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sys/fio/fnextn.x (limited to 'sys/fio/fnextn.x') diff --git a/sys/fio/fnextn.x b/sys/fio/fnextn.x new file mode 100644 index 00000000..47e73a08 --- /dev/null +++ b/sys/fio/fnextn.x @@ -0,0 +1,21 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# FNEXTN -- Extract the file name extension from a virtual file name (or a +# machine dependent file name. If the VFN contains no extension field, the +# null string is returned. The number of chars in the extension string is +# returned as the function value. + +int procedure fnextn (vfn, outstr, maxch) + +char vfn[ARB], outstr[maxch] +int maxch +int root_offset, extn_offset +int gstrcpy() + +begin + call zfnbrk (vfn, root_offset, extn_offset) + if (vfn[extn_offset] != EOS) + extn_offset = extn_offset + 1 + + return (gstrcpy (vfn[extn_offset], outstr, maxch)) +end -- cgit