/* tu.c: draws horizontal lines */
shortl
= (table
[i
][c
].col
[0]=='\\');
if (c
>0 && !shortl
&& thish(i
,c
-1) == type
)return;
for(cr
=c
; cr
< ncol
&& (ctype(i
,cr
)=='s'||type
==thish(i
,cr
)); cr
++);
for(cr
=c
+1; cr
<ncol
&& ctype(i
,cr
)=='s'; cr
++);
drawline(i
, c
, cr
-1, lintype
, 0, shortl
);
fprintf(tabout
, ".nr %d \\n(.v\n.vs \\n(.vu-\\n(.sp\n", SVS
);
while (i
>0 && vspand(prev(i
),cl
,1))
for(cr
=cl
; cr
<ncol
; cr
++)
if (i
>0 && vspand(prev(i
),cr
,1))
drawline(i
,cl
,(cr
<ncol
?cr
-1:cr
),lintype
,1,0);
fprintf(tabout
, ".vs \\n(%du\n", SVS
);
drawline(i
, cl
, cr
, lintype
, noheight
, shortl
)
int lcount
, ln
, linpos
, oldpos
, nodata
, lnch
;
case '-': lcount
=1;break;
case '=': lcount
= pr1403
? 1 : 2; break;
case SHORTLINE
: lcount
=1; break;
nodata
= cr
-cl
>=ncol
|| noheight
|| allh(i
);
fprintf(tabout
, "\\v'-.5m'");
for(ln
=oldpos
=0; ln
<lcount
; ln
++)
linpos
= 2*ln
- lcount
+1;
fprintf(tabout
, "\\v'%dp'", linpos
-oldpos
);
case TOP
: exhl
= ln
==0 ? "1p" : "-1p"; break;
case BOT
: exhl
= ln
==1 ? "1p" : "-1p"; break;
case THRU
: exhl
= "1p"; break;
fprintf(tabout
, "\\h'%s'", exhl
);
case TOP
: case BOT
: exhl
= "-1p"; break;
case THRU
: exhl
= "1p"; break;
fprintf(tabout
, "\\h'%s'", exhl
);
case TOP
: exhr
= ln
==0 ? "-1p" : "+1p"; break;
case BOT
: exhr
= ln
==1 ? "-1p" : "+1p"; break;
case THRU
: exhr
= "-1p"; break;
case TOP
: case BOT
: exhr
= "+1p"; break;
case THRU
: exhr
= "-1p"; break;
fprintf(tabout
, "\\h'|\\n(%du'", cl
+CLEFT
);
fprintf(tabout
, "\\s\\n(%d",LSIZE
);
fprintf(tabout
, "\\v'-\\n(%dp/6u'", LSIZE
);
fprintf(tabout
, "\\l'|\\n(%du'", cr
+CRIGHT
);
lnch
= lintype
==2 ? "=" : "\\(ru";
fprintf(tabout
, "\\l'|\\n(TWu%s%s'", exhr
,lnch
);
fprintf(tabout
, "\\l'(|\\n(%du+|\\n(%du)/2u%s%s'", cr
+CRIGHT
,
fprintf(tabout
, "\\v'\\n(%dp/6u'", LSIZE
);
fprintf(tabout
, "\\v'%dp'", -oldpos
);
fprintf(tabout
, "\\v'+.5m'");
if (k
>=0 && linestop
[k
]==0)
if (boxflg
|| allflg
|| dboxflg
)
/* returns -1 if no line to left */
/* returns number of line where it starts */
/* stores into lwid the kind of line */
if (lefdata(next(i
),c
)== kind
) return(-1);
while (i
>=0 && lefdata(i
,c
)==kind
)
for(lj
= i
+1; lj
<li
; lj
++)
if (instead
[lj
] && strcmp(instead
[lj
], ".TH")==0)
for(ck
=c
; ctype(i
,ck
)=='s'; ck
--);
if (dboxflg
&& c
==0) return(2);
if (boxflg
&& c
==0) return(1);
if (!fullbot
[i
] && !instead
[i
]) break;
while (--i
>=0 && (fullbot
[i
] || instead
[i
]))