diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/fmio/fmlfstt.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
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 |