aboutsummaryrefslogtreecommitdiff
path: root/sys/fmio/fmlfstat.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/fmio/fmlfstat.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/fmio/fmlfstat.x')
-rw-r--r--sys/fmio/fmlfstat.x31
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/fmio/fmlfstat.x b/sys/fmio/fmlfstat.x
new file mode 100644
index 00000000..a5829de0
--- /dev/null
+++ b/sys/fmio/fmlfstat.x
@@ -0,0 +1,31 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <fmlfstat.h>
+include "fmio.h"
+
+# FMLFSTAT.H -- Query the attributes of an lfile.
+
+int procedure fm_lfstat (fm, lfile, statbuf)
+
+pointer fm #I FMIO descriptor
+int lfile #I lfile number
+int statbuf[ARB] #O receives status
+
+pointer lf
+errchk fmio_bind, fmio_errchk
+
+begin
+ call fmio_bind (fm)
+ call fmio_errchk (fm)
+
+ # Verify input.
+ if (lfile < 0 || lfile > FM_NLFILES(fm))
+ return (ERR)
+
+ # Copy out the lfile status.
+ lf = FM_FTABLE(fm) + lfile * LEN_FTE
+ LFU_SIZE(statbuf) = LF_FSIZE(lf)
+ LFU_FLAGS(statbuf) = LF_FLAGS(lf)
+
+ return (OK)
+end