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/tbfnll.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/tbtables/tbfnll.x')
-rw-r--r-- | pkg/tbtables/tbfnll.x | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkg/tbtables/tbfnll.x b/pkg/tbtables/tbfnll.x new file mode 100644 index 00000000..14abbf98 --- /dev/null +++ b/pkg/tbtables/tbfnll.x @@ -0,0 +1,42 @@ +include <tbset.h> +include "tbtables.h" + +# tbfnll -- set elements to undefined in a FITS table +# +# Phil Hodge, 6-Jul-1995 Subroutine created + +procedure tbfnll (tp, firstrow, lastrow) + +pointer tp # i: pointer to table descriptor +int firstrow # i: first row to be set to INDEF +int lastrow # i: last row to be set to INDEF +#-- +pointer cp # pointer to column descriptor +int row1, row2 # firstrow, lastrow truncated to 1, nrows +int row, col # loop indexes for row and column numbers +int nelem # number of elements for a column +int status # zero is OK +pointer tbcnum() +int tbcigi() +errchk tbferr + +begin + status = 0 + + row1 = max (1, firstrow) + row2 = min (TB_NROWS(tp), lastrow) + + do row = row1, row2 { + + do col = 1, TB_NCOLS(tp) { + + cp = tbcnum (tp, col) + + nelem = tbcigi (cp, TBL_COL_LENDATA) + + call fspclu (TB_FILE(tp), col, row, 1, nelem, status) + if (status != 0) + call tbferr (status) + } + } +end |