diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/fmio/fmlfstt.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/fmio/fmlfstt.x')
-rw-r--r-- | sys/fmio/fmlfstt.x | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sys/fmio/fmlfstt.x b/sys/fmio/fmlfstt.x new file mode 100644 index 00000000..951c44c2 --- /dev/null +++ b/sys/fmio/fmlfstt.x @@ -0,0 +1,38 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <config.h> +include <mach.h> +include <fio.h> +include "fmio.h" + +# FM_LFSTATI -- Stat an lfile. + +procedure fm_lfstati (lf, param, lvalue) + +pointer lf #I lfile descriptor +int param #I parameter code +long lvalue #O parameter value + +pointer fm +int chan + +begin + fm = LF_FM(lf) + chan = FM_CHAN(fm) + + # Only the file size differs for each lfile. + switch (param) { + case FSTT_FILSIZE: + lvalue = LF_FSIZE(lf) + case FSTT_BLKSIZE: + lvalue = FM_SZBPAGE(fm) + case FSTT_OPTBUFSIZE: + lvalue = FM_OPTBUFSIZE(fm) + case FSTT_MAXBUFSIZE: + lvalue = FM_MAXBUFSIZE(fm) + } + + # For text lfiles, things appear to be SZB_CHAR larger. + if (and (LF_FLAGS(lf), LFF_TEXTFILE) != 0) + lvalue = lvalue * SZB_CHAR +end |