From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- pkg/tbtables/tbfdel.x | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pkg/tbtables/tbfdel.x (limited to 'pkg/tbtables/tbfdel.x') diff --git a/pkg/tbtables/tbfdel.x b/pkg/tbtables/tbfdel.x new file mode 100644 index 00000000..822590d8 --- /dev/null +++ b/pkg/tbtables/tbfdel.x @@ -0,0 +1,31 @@ +include "tbtables.h" + +# tbfdel -- delete FITS table +# This routine deletes the current HDU in a FITS file, closes the FITS +# file, and frees the memory allocated by the table I/O routines. +# +# Phil Hodge, 6-Jul-1995 Subroutine created + +procedure tbfdel (tp) + +pointer tp # io: pointer to table descriptor +#-- +int status # zero is OK +int hdutype # type of next HDU (ignored) +errchk tbferr + +begin + status = 0 + + # Delete the current HDU. + call fsdhdu (TB_FILE(tp), hdutype, status) + + if (status != 0) + call tbferr (status) + + # Close the FITS file. This sets TB_FILE to NULL. + call tbfclo (tp) + + # Free memory. + call tbtclo (tp) +end -- cgit