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/tbfwcd.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/tbtables/tbfwcd.x')
-rw-r--r-- | pkg/tbtables/tbfwcd.x | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pkg/tbtables/tbfwcd.x b/pkg/tbtables/tbfwcd.x new file mode 100644 index 00000000..0953e2ee --- /dev/null +++ b/pkg/tbtables/tbfwcd.x @@ -0,0 +1,38 @@ +include <tbset.h> +include "tbtables.h" + +# tbfwcd -- write column descriptor to FITS table +# This routine updates the column name, units, and print format. +# If the true data type of the column (i.e. in the table) differs from +# the apparent data type, then TSCALi and/or TZEROi will be updated. +# +# Phil Hodge, 6-Jul-1995 Subroutine created +# Phil Hodge, 23-Jun-2000 Call tbfscal. + +procedure tbfwcd (tp, cp) + +pointer tp # i: pointer to table descriptor +pointer cp # i: pointer to column descriptor +#-- +pointer sp +pointer value # for new value of name, units, format +errchk tbfnam, tbfnit, tbffmt, tbfscal + +begin + call smark (sp) + call salloc (value, SZ_FNAME, TY_CHAR) + + call tbcigt (cp, TBL_COL_NAME, Memc[value], SZ_FNAME) + call tbfnam (tp, cp, Memc[value]) + + call tbcigt (cp, TBL_COL_UNITS, Memc[value], SZ_FNAME) + call tbfnit (tp, cp, Memc[value]) + + call tbcigt (cp, TBL_COL_FMT, Memc[value], SZ_FNAME) + call tbffmt (tp, cp, Memc[value]) + + # Update TSCALi and/or TZEROi if the current column uses scaling. + call tbfscal (tp, cp) + + call sfree (sp) +end |