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 /pkg/tbtables/tbfwsi.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
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 |