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/tbcdef1.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/tbtables/tbcdef1.x')
-rw-r--r-- | pkg/tbtables/tbcdef1.x | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkg/tbtables/tbcdef1.x b/pkg/tbtables/tbcdef1.x new file mode 100644 index 00000000..0844ddf9 --- /dev/null +++ b/pkg/tbtables/tbcdef1.x @@ -0,0 +1,36 @@ +include <tbset.h> + +# tbcdef1 -- define a column +# Define (create) one table column. This just calls tbcdef. +# +# Phil Hodge, 21-Aug-1995 Subroutine created. + +procedure tbcdef1 (tp, colptr, colname, colunits, colfmt, datatype, nelem) + +pointer tp # i: pointer to table descriptor +pointer colptr # o: pointer to new column +char colname[SZ_COLNAME] # i: name of column +char colunits[SZ_COLUNITS] # i: units for column +char colfmt[SZ_COLFMT] # i: print format for column +int datatype # i: data types of column +int nelem # i: number of elements for column +#-- +pointer cp[1] # pointer to new column +char cname[SZ_COLNAME,1] # name of column +char cunits[SZ_COLUNITS,1] # units for column +char cfmt[SZ_COLFMT,1] # print format for column +int dtype[1] # datatype +int larray[1] # nelem +errchk tbcdef + +begin + call strcpy (colname[1], cname[1,1], SZ_COLNAME) + call strcpy (colunits[1], cunits[1,1], SZ_COLUNITS) + call strcpy (colfmt[1], cfmt[1,1], SZ_COLFMT) + dtype[1] = datatype + larray[1] = nelem + + call tbcdef (tp, cp, cname, cunits, cfmt, dtype, larray, 1) + + colptr = cp[1] +end |