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/libc/cfinfo.c | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/libc/cfinfo.c')
-rw-r--r-- | sys/libc/cfinfo.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/libc/cfinfo.c b/sys/libc/cfinfo.c new file mode 100644 index 00000000..7e69e5e0 --- /dev/null +++ b/sys/libc/cfinfo.c @@ -0,0 +1,30 @@ +/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. +*/ + +#define import_spp +#define import_xnames +#define import_finfo +#define import_libc +#include <iraf.h> + + +/* C_FINFO -- FIO get directory info for named file. +*/ +int +c_finfo ( + char *fname, /* name of file to be opened */ + struct _finfo *fi /* finfo structure (output) */ +) +{ + register int status; + + iferr (status = (int) FINFO (c_sppstr(fname), (XLONG *)fi)) { + status = ERR; + } else if (status != XERR) { + c_strpak ((XCHAR *)fi->fi_owner, fi->fi_owner, SZ_OWNERSTR); + status = OK; + } else + status = ERR; + + return (status); +} |