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 /pkg/tbtables/tbfwsi.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/tbtables/tbfwsi.x')
-rw-r--r-- | pkg/tbtables/tbfwsi.x | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pkg/tbtables/tbfwsi.x b/pkg/tbtables/tbfwsi.x new file mode 100644 index 00000000..985eb27c --- /dev/null +++ b/pkg/tbtables/tbfwsi.x @@ -0,0 +1,33 @@ +include <tbset.h> +include "tbtables.h" + +# tbfwsi -- write size info +# If the current HDU is a table, this routine writes the number of rows and +# the number of columns as FITS keywords NAXIS2 and TFIELDS respectively. +# +# Phil Hodge, 6-Jul-1995 Subroutine created +# Phil Hodge, 2-Feb-1996 Check that current HDU is a table. +# Phil Hodge, 7-Jun-1999 Use TB_SUBTYPE instead of TB_HDUTYPE. + +procedure tbfwsi (tp) + +pointer tp # i: pointer to table descriptor +#-- +int status # zero is OK +errchk tbferr + +begin + status = 0 + + if (TB_SUBTYPE(tp) == TBL_SUBTYPE_BINTABLE || + TB_SUBTYPE(tp) == TBL_SUBTYPE_ASCII) { + + call fsmkyj (TB_FILE(tp), "NAXIS2", TB_NROWS(tp), "", status) + if (status != 0) + call tbferr (status) + + call fsmkyj (TB_FILE(tp), "TFIELDS", TB_NCOLS(tp), "", status) + if (status != 0) + call tbferr (status) + } +end |