From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id b017c3fd; for ; Fri, 6 Mar 2015 10:49:23 -0500 (EST) Date: Fri, 6 Mar 2015 10:49:23 -0500 (EST) Message-Id: <9805837699756876558.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Fix vertical spacing at the beginning of tables. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Fix vertical spacing at the beginning of tables. man(7) always prints a blank line, mdoc(7) doesn't. Problem in mdoc(7) reported by kristaps@. mdoc(7) part of the patch tested by kristaps@. Modified Files: -------------- mdocml: man_term.c mdoc_term.c tbl_term.c Revision Data ------------- Index: man_term.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/man_term.c,v retrieving revision 1.168 retrieving revision 1.169 diff -Lman_term.c -Lman_term.c -u -p -r1.168 -r1.169 --- man_term.c +++ man_term.c @@ -945,12 +945,8 @@ print_man_node(DECL_ARGS) p->flags |= TERMP_NOSPACE; return; case MAN_TBL: - /* - * Tables are preceded by a newline. Then process a - * table line, which will cause line termination, - */ - if (n->span->prev == NULL) - term_newln(p); + if (p->tbl.cols == NULL) + term_vspace(p); term_tbl(p, n->span); return; default: Index: tbl_term.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/tbl_term.c,v retrieving revision 1.39 retrieving revision 1.40 diff -Ltbl_term.c -Ltbl_term.c -u -p -r1.39 -r1.40 --- tbl_term.c +++ tbl_term.c @@ -66,9 +66,6 @@ term_tbl(struct termp *tp, const struct size_t rmargin, maxrmargin, tsz; int ic, horiz, spans, vert; - if (tp->tbl.cols == NULL) - term_flushln(tp); - rmargin = tp->rmargin; maxrmargin = tp->maxrmargin; Index: mdoc_term.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mdoc_term.c,v retrieving revision 1.312 retrieving revision 1.313 diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.312 -r1.313 --- mdoc_term.c +++ mdoc_term.c @@ -348,6 +348,8 @@ print_mdoc_node(DECL_ARGS) p->flags |= TERMP_NOSPACE; break; case MDOC_TBL: + if (p->tbl.cols == NULL) + term_newln(p); term_tbl(p, n->span); break; default: -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv