1: /* tt.c: subroutines for drawing horizontal lines */
2: # include "t..c"
3: ctype(il, ic)
4: {
5: if (instead[il])
6: return(0);
7: if (fullbot[il])
8: return(0);
9: il = stynum[il];
10: return(style[il][ic]);
11: }
12: min(a,b)
13: {
14: return(a<b ? a : b);
15: }
16: fspan(i,c)
17: {
18: c++;
19: return(c<ncol && ctype(i,c)=='s');
20: }
21: lspan(i,c)
22: {
23: int k;
24: if (ctype(i,c) != 's') return(0);
25: c++;
26: if (c < ncol && ctype(i,c)== 's')
27: return(0);
28: for(k=0; ctype(i,--c) == 's'; k++);
29: return(k);
30: }
31: ctspan(i,c)
32: {
33: int k;
34: c++;
35: for(k=1; c<ncol && ctype(i,c)=='s'; k++)
36: c++;
37: return(k);
38: }
39: tohcol(ic)
40: {
41: if (ic==0)
42: fprintf(tabout, "\\h'|0'");
43: else
44: fprintf(tabout, "\\h'(|\\n(%du+|\\n(%du)/2u'", ic+CLEFT, ic+CRIGHT-1);
45: }
46: allh(i)
47: {
48: /* return true if every element in line i is horizontal */
49: /* also at least one must be horizontl */
50: int c, one, k;
51: if (fullbot[i]) return(1);
52: for(one=c=0; c<ncol; c++)
53: {
54: k = thish(i,c);
55: if (k==0) return(0);
56: if (k==1) continue;
57: one=1;
58: }
59: return(one);
60: }
61: thish(i,c)
62: {
63: int t;
64: char *s;
65: struct colstr *pc;
66: if (c<0)return(0);
67: if (i<0) return(0);
68: t = ctype(i,c);
69: if (t=='_' || t == '-')
70: return('-');
71: if (t=='=')return('=');
72: if (t=='^') return(1);
73: if (fullbot[i] )
74: return(fullbot[i]);
75: if (t=='s') return(thish(i,c-1));
76: if (t==0) return(1);
77: pc = &table[i][c];
78: s = (t=='a' ? pc->rcol : pc->col);
79: if (s==0 || (point(s) && *s==0))
80: return(1);
81: if (vspen(s)) return(1);
82: if (t=barent( s))
83: return(t);
84: return(0);
85: }
Defined functions
allh
defined in line
46; used 9 times
ctype
defined in line
3; used 27 times
- in line 19-28(4),
35,
68
- in /usr/src/cmd/tbl/t5.c line
66,
77,
101,
112-115(2),
155
- in /usr/src/cmd/tbl/t6.c line
28
- in /usr/src/cmd/tbl/t7.c line
37
- in /usr/src/cmd/tbl/t8.c line
105,
117,
264
- in /usr/src/cmd/tbl/t9.c line
44,
54
- in /usr/src/cmd/tbl/tb.c line
12
- in /usr/src/cmd/tbl/tc.c line
17
- in /usr/src/cmd/tbl/tg.c line
38
- in /usr/src/cmd/tbl/tu.c line
12-14(2),
174-176(2)
- in /usr/src/cmd/tbl/tv.c line
123
fspan
defined in line
16; used 2 times
lspan
defined in line
21; used 2 times
min
defined in line
12; used 1 times
thish
defined in line
61; used 10 times