diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/fio/fnldir.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
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 |