diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/fio/fnldir.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/fio/fnldir.x')
-rw-r--r-- | sys/fio/fnldir.x | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/fio/fnldir.x b/sys/fio/fnldir.x new file mode 100644 index 00000000..2bcfbd94 --- /dev/null +++ b/sys/fio/fnldir.x @@ -0,0 +1,22 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# FNLDIR -- Extract the logical directory prefix from a virtual file name, +# e.g., the "ldir$" field in "ldir$root.extn", or the field "ldir$a/b/" +# in the vfn "ldir$a/b/file.xtn". Both logical and OS dependent directory +# prefixes are successfully extracted. The prefix returned is the (logical +# or explicit) file name of the directory containing the named file. If the +# VFN contains no logical directory field, the null string is returned, +# signifying the current directory. The number of chars in the directory +# prefix is returned as the function value. + +int procedure fnldir (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) + return (gstrcpy (vfn[1], outstr, min (maxch, root_offset-1))) +end |