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/libc/cfinfo.c | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
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); +} |