aboutsummaryrefslogtreecommitdiff
path: root/sys/fio/fstats.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/fio/fstats.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/fio/fstats.x')
-rw-r--r--sys/fio/fstats.x29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/fio/fstats.x b/sys/fio/fstats.x
new file mode 100644
index 00000000..469d0cc2
--- /dev/null
+++ b/sys/fio/fstats.x
@@ -0,0 +1,29 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <config.h>
+include <fset.h>
+include <syserr.h>
+include <fio.h>
+
+# FSTATS -- Return a file status value of type string (s).
+
+procedure fstats (fd, what, outstr, maxch)
+
+int fd, what, maxch
+char outstr[ARB]
+pointer ffp
+errchk syserr
+include <fio.com>
+
+begin
+ ffp = fiodes[fd]
+ if (fd <= 0 || ffp == NULL)
+ call syserr (SYS_FILENOTOPEN)
+
+ switch (what) {
+ case F_FILENAME:
+ call strcpy (FNAME(ffp), outstr, maxch)
+ default:
+ call filerr (FNAME(ffp), SYS_FSTATUNKPAR)
+ }
+end