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/fstatl.x | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sys/fio/fstatl.x (limited to 'sys/fio/fstatl.x') diff --git a/sys/fio/fstatl.x b/sys/fio/fstatl.x new file mode 100644 index 00000000..3b4fdd26 --- /dev/null +++ b/sys/fio/fstatl.x @@ -0,0 +1,31 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include +include +include +include + +# FSTATL -- Return a file status value of type long integer (l). + +long procedure fstatl (fd, what) + +int fd, what +int ffilsz() +include + +begin + fp = fiodes[fd] + if (fd <= 0 || fp == NULL) + iferr (call syserr (SYS_FILENOTOPEN)) + call erract (EA_FATAL) + + switch (what) { + case F_FILESIZE: + FILSIZE(fp) = ffilsz (fd) + return (FILSIZE(fp)) + default: + iferr (call filerr (FNAME(fp), SYS_FSTATUNKPAR)) + call erract (EA_FATAL) + } +end -- cgit