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/tbfclo.x | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pkg/tbtables/tbfclo.x (limited to 'pkg/tbtables/tbfclo.x') diff --git a/pkg/tbtables/tbfclo.x b/pkg/tbtables/tbfclo.x new file mode 100644 index 00000000..1b2abf58 --- /dev/null +++ b/pkg/tbtables/tbfclo.x @@ -0,0 +1,28 @@ +include +include "tbtables.h" + +# tbfclo -- close a table in a FITS file +# +# Phil Hodge, 6-Jul-1995 Subroutine created +# Phil Hodge, 1-Jun-1999 Set both TB_FILE and TB_FILE2 to 0. + +procedure tbfclo (tp) + +pointer tp # i: pointer to table descriptor +#-- +int status +errchk tbferr + +begin + if (TB_FILE(tp) == 0) + return + + # Close the file, and free the unit number. + status = 0 + call fsclos (TB_FILE(tp), status) + call fsfiou (TB_FILE(tp), status) + if (status != 0) + call tbferr (status) + TB_FILE(tp) = 0 + TB_FILE2(tp) = 0 +end -- cgit