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/utilities/nttools/threed/titable/tiupdate.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/utilities/nttools/threed/titable/tiupdate.x')
-rw-r--r-- | pkg/utilities/nttools/threed/titable/tiupdate.x | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkg/utilities/nttools/threed/titable/tiupdate.x b/pkg/utilities/nttools/threed/titable/tiupdate.x new file mode 100644 index 00000000..ebfe9b75 --- /dev/null +++ b/pkg/utilities/nttools/threed/titable/tiupdate.x @@ -0,0 +1,39 @@ +include <tbset.h> + +# TIUPDATE -- Opens an already existing output table for update. +# +# +# +# Revision history: +# ---------------- +# 20-Jan-97 - Task created (I.Busko) +# 17-Mar-97 - Replaced code by tbcnum call (IB) + + +procedure tiupdate (output, otp, cpo, ncpo) + +char output[ARB] # i: table name +pointer otp # o: table descriptor +pointer cpo # o: column descriptor +int ncpo # o: number of columns +#-- +int i + +errchk tbtopn + +pointer tbtopn(), tbcnum() +int tbpsta() + +begin + # Open table and get its size. + otp = tbtopn (output, READ_WRITE, NULL) + ncpo = tbpsta (otp, TBL_NCOLS) + + # Alloc column descriptor array. This + # must be freed by caller. + call malloc (cpo, ncpo, TY_INT) + + # Fill array with column info. + do i = 1, ncpo + Memi[cpo+i-1] = tbcnum (otp, i) +end |