int coltype(string)
char *string;
int colftype (tmpfile, col_type, col_width, separator)
FILE *tmpfile;
int *col_type;
int *col_width;
char separator;
int colbtype (tmpfile, col_type, col_width, separator, dash, comma)
FILE *tmpfile;
int *col_type;
int *col_width;
char separator;
char dash;
char *comma;
colftype and colbtype read entire tables and accumulate information for each column about its datatype and maximum width. tmpfile is a file stream opened for reading and associated with the input table; col_type is an array of integers, one for each column, which contains the datatype of the column (see coltype above); col_width is an array of integers, one for each column, which contains the maximum width of the column; and separator is the column delimiter.
colbtype requires two additional arguments: dash, a boolean which is TRUE if rows of dashes (`-') are to be ignored when determining the data type; and comma, a array of characters, one for each column, set to non-zero for those columns whose output format should have comma-separated thousands for US format or period-separated thousands for European format. This information is used in determining the width of numeric columns. If the data type of column i is non-numeric (col_type[i] < 0), then comma[i] is ignored.
Both colftype and colbtype return the number of columns found in the header row or -1 if the number of columns exceeds MAXCOL (see rdb.h) or if a premature end-of-file is encountered.