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/tbfclo.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/tbtables/tbfclo.x')
-rw-r--r-- | pkg/tbtables/tbfclo.x | 28 |
1 files changed, 28 insertions, 0 deletions
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 <tbset.h> +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 |