1 /* tc.c: find character not in table to delimit fields */
7 /* choose funny characters to delimit fields */
8 int had[128], ilin, icol, k;
11 for (icol = 0; icol < 128; icol++)
14 for (ilin = 0; ilin < nlin; ilin++) {
19 for (icol = 0; icol < ncol; icol++) {
20 k = ctype(ilin, icol);
21 if (k == 0 || k == '-' || k == '=')
23 s = table[ilin][icol].col;
26 had[(unsigned char)*s++] = 1;
27 s = table[ilin][icol].rcol;
30 had[(unsigned char)*s++] = 1;
33 /* choose first funny character */
35 s = "\002\003\005\006\007!%&#/?,:;<=>@`^~_{}+-*ABCDEFGHIJKMNOPQRSTUVWXYZabcdefgjkoqrstwxyz";
37 if (had[(unsigned char)*s] == 0) {
38 F1 = (unsigned char)*s;
43 /* choose second funny character */
45 s = "\002\003\005\006\007:_~^`@;,<=>#%&!/?{}+-*ABCDEFGHIJKMNOPQRSTUVWXZabcdefgjkoqrstuwxyz";
47 if (had[(unsigned char)*s] == 0) {
48 F2 = (unsigned char)*s;
52 if (F1 == 0 || F2 == 0)
53 error("couldn't find characters to use for delimiters");
62 return(ss >= 128 || ss < 0);