* mandoc: do not print horizontal lines inside vertical spans
@ 2018-08-19 19:32 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-08-19 19:32 UTC (permalink / raw)
To: source
Log Message:
-----------
do not print horizontal lines inside vertical spans
Modified Files:
--------------
mandoc:
tbl_term.c
Revision Data
-------------
Index: tbl_term.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/tbl_term.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -Ltbl_term.c -Ltbl_term.c -u -p -r1.58 -r1.59
--- tbl_term.c
+++ tbl_term.c
@@ -460,13 +460,11 @@ tbl_hrule(struct termp *tp, const struct
const struct tbl_cell *cp, *cpn, *cpp;
const struct roffcol *col;
int vert;
- char line, cross;
+ char cross, line, stdcross, stdline;
- line = (kind < 2 && TBL_SPAN_DHORIZ == sp->pos) ? '=' : '-';
- cross = (kind < 3) ? '+' : '-';
+ stdline = (kind < 2 && TBL_SPAN_DHORIZ == sp->pos) ? '=' : '-';
+ stdcross = (kind < 3) ? '+' : '-';
- if (kind)
- term_word(tp, "+");
cp = sp->layout->first;
cpp = kind || sp->prev == NULL ? NULL : sp->prev->layout->first;
if (cpp == cp)
@@ -474,8 +472,18 @@ tbl_hrule(struct termp *tp, const struct
cpn = kind > 1 || sp->next == NULL ? NULL : sp->next->layout->first;
if (cpn == cp)
cpn = NULL;
+ if (kind)
+ term_word(tp,
+ cpn == NULL || cpn->pos != TBL_CELL_DOWN ? "+" : "|");
for (;;) {
col = tp->tbl.cols + cp->col;
+ if (cpn == NULL || cpn->pos != TBL_CELL_DOWN) {
+ line = stdline;
+ cross = stdcross;
+ } else {
+ line = ' ';
+ cross = (kind < 3) ? '|' : ' ';
+ }
tbl_char(tp, line, col->width + col->spacing / 2);
vert = cp->vert;
if ((cp = cp->next) == NULL)
@@ -490,6 +498,11 @@ tbl_hrule(struct termp *tp, const struct
vert = cpn->vert;
cpn = cpn->next;
}
+ if (cpn == NULL || cpn->pos != TBL_CELL_DOWN) {
+ line = stdline;
+ cross = stdcross;
+ } else
+ line = ' ';
if (sp->opts->opts & TBL_OPT_ALLBOX && !vert)
vert = 1;
if (col->spacing)
@@ -500,7 +513,8 @@ tbl_hrule(struct termp *tp, const struct
tbl_char(tp, line, (col->spacing - 3) / 2);
}
if (kind) {
- term_word(tp, "+");
+ term_word(tp,
+ cpn == NULL || cpn->pos != TBL_CELL_DOWN ? "+" : "|");
term_flushln(tp);
}
}
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-19 19:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-19 19:32 mandoc: do not print horizontal lines inside vertical spans schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).