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/tbtflu.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/tbtables/tbtflu.x')
-rw-r--r-- | pkg/tbtables/tbtflu.x | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkg/tbtables/tbtflu.x b/pkg/tbtables/tbtflu.x new file mode 100644 index 00000000..145c6930 --- /dev/null +++ b/pkg/tbtables/tbtflu.x @@ -0,0 +1,34 @@ +include <tbset.h> +include "tbtables.h" +include "tblerr.h" + +# tbtflu -- call flush +# This routine writes the size-information record (in case the number of +# rows or columns has changed) and then flushes the fio buffer for the table. +# +# Phil Hodge, 2-Nov-1988 Subroutine created. +# Phil Hodge, 14-Jan-1992 Add option for text table type. +# Phil Hodge, 20-Jun-1995 Add option for FITS tables. + +procedure tbtflu (tp) + +pointer tp # i: pointer to table descriptor +#-- + +begin + if (TB_TYPE(tp) == TBL_TYPE_TEXT) + return # don't do anything for text file + + if (TB_TYPE(tp) == TBL_TYPE_FITS) + return # don't do anything for FITS file + + if (TB_FILE(tp) == NULL) + call error (ER_TBNOTOPEN, "tbtflu: table is not open") + + if (TB_READONLY(tp)) + call error (ER_TBREADONLY, "tbtflu: table is readonly") + + call tbtwsi (tp) # write size-info record + + call flush (TB_FILE(tp)) +end |