1 /* tv.c: draw vertical lines */
5 drawvert(int start, int end, int c, int lwid)
7 char *exb = 0, *ext = 0;
8 int tp = 0, sl, ln, pos, epb, ept, vm;
12 /* note: nr 35 has value of 1m outside of linesize */
15 for (ln = 0; ln < lwid; ln++) {
17 pos = 2 * ln - lwid + 1;
19 Bprint(&tabout, "\\h'%dp'", pos - tp);
22 if (fullbot[end] || (!instead[end] && allh(end)))
25 switch (midbar(end, c)) {
36 switch (interh(end, c)) {
41 epb += (ln == 0 ? 1 : -1);
44 epb += (ln == 1 ? 1 : -1);
48 switch (interh(end, c)) {
59 while (sl >= 0 && instead[sl])
61 if (sl >= 0 && (fullbot[sl] || allh(sl)))
64 switch (midbar(sl, c)) {
78 } else if (start == 0 && allh(0)) {
83 switch (interh(start, c)) {
88 ept += (ln == 0 ? 1 : -1);
91 ept += (ln == 1 ? 1 : -1);
95 switch (interh(start, c)) {
105 Bprint(&tabout, "\\v'%s'", exb);
107 Bprint(&tabout, "\\v'%dp'", epb);
108 Bprint(&tabout, "\\s\\n(%d", LSIZE);
110 Bprint(&tabout, "\\v'-\\n(%dp/6u'", LSIZE);
111 Bprint(&tabout, "\\h'-\\n(#~u'"); /* adjustment for T450 nroff boxes */
112 Bprint(&tabout, "\\L'|\\n(#%cu-%s", linestop[start] + 'a' - 1,
113 vm == 'v' ? "1v" : "\\n(35u");
115 Bprint(&tabout, "-(%s)", ext);
117 Bprint(&tabout, "-(%s)", exb);
120 Bprint(&tabout, "%s%dp", pos >= 0 ? "+" : "", pos);
121 /* the string #d is either "nl" or ".d" depending
122 on diversions; on GCOS not the same */
123 Bprint(&tabout, "'\\s0\\v'\\n(\\*(#du-\\n(#%cu+%s",
124 linestop[start] + 'a' - 1, vm == 'v' ? "1v" : "\\n(35u");
126 Bprint(&tabout, "+%s", ext);
128 Bprint(&tabout, "%s%dp", (-ept) > 0 ? "+" : "", (-ept));
129 Bprint(&tabout, "'");
131 Bprint(&tabout, "\\v'\\n(%dp/6u'", LSIZE);
143 k = midbcol(i, c - 1);
149 midbcol(int i, int c)
153 while ( (ct = ctype(i, c)) == 's')
155 if (ct == '-' || ct == '=')
157 if (ct = barent(table[i][c].col))