aboutsummaryrefslogtreecommitdiff
path: root/pkg/tbtables/tbcinf.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /pkg/tbtables/tbcinf.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/tbtables/tbcinf.x')
-rw-r--r--pkg/tbtables/tbcinf.x36
1 files changed, 36 insertions, 0 deletions
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 <tbset.h>
+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