From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- pkg/tbtables/tbcinf.x | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkg/tbtables/tbcinf.x (limited to 'pkg/tbtables/tbcinf.x') diff --git a/pkg/tbtables/tbcinf.x b/pkg/tbtables/tbcinf.x new file mode 100644 index 00000000..30194984 --- /dev/null +++ b/pkg/tbtables/tbcinf.x @@ -0,0 +1,36 @@ +include +include "tbtables.h" + +# tbcinf -- get info about a column +# This procedure finds information about a column. For numeric and Boolean +# data types the value of datatype will be the SPP data type, but for a +# character string of length N the datatype will be -N. +# For the time being the value of lendata is just one. +# +# Phil Hodge, 10-Aug-87 Set lendata=1 and datatype = -n for char string. +# Phil Hodge, 7-Oct-87 Call tbcig[it] for each item. +# Phil Hodge, 8-Jun-92 Change order of declarations, and get colnum first. + +procedure tbcinf (colptr, + colnum, colname, colunits, colfmt, datatype, lendata, lenfmt) + +pointer colptr # i: Pointer to a column descriptor +int colnum # o: Column number +char colname[ARB] # o: Column name +char colunits[ARB] # o: Units for column +char colfmt[ARB] # o: Print format for display of column +int datatype # o: Data type of column (SPP type or -n) +int lendata # o: Number of elements (=1) +int lenfmt # o: Bytes for print format +#-- +int tbcigi() + +begin + colnum = tbcigi (colptr, TBL_COL_NUMBER) + call tbcigt (colptr, TBL_COL_NAME, colname, SZ_COLNAME) + call tbcigt (colptr, TBL_COL_UNITS, colunits, SZ_COLUNITS) + call tbcigt (colptr, TBL_COL_FMT, colfmt, SZ_COLFMT) + datatype = tbcigi (colptr, TBL_COL_DATATYPE) + lendata = tbcigi (colptr, TBL_COL_LENDATA) + lenfmt = tbcigi (colptr, TBL_COL_FMTLEN) +end -- cgit