From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- sys/fio/fstats.x | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sys/fio/fstats.x (limited to 'sys/fio/fstats.x') 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 +include +include +include + +# 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 + +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 -- cgit