From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- 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