From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p5IHwmWB019259 for ; Sat, 18 Jun 2011 13:58:49 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id p5IHwmcp023529; Sat, 18 Jun 2011 13:58:48 -0400 (EDT) Date: Sat, 18 Jun 2011 13:58:48 -0400 (EDT) Message-Id: <201106181758.p5IHwmcp023529@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Fix two TODOs with one check-in. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Fix two TODOs with one check-in. Both of these relate to vertical space before paragraphs and/or within `RS' blocks. Modified Files: -------------- mdocml: TODO man_html.c man_term.c Revision Data ------------- Index: man_term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_term.c,v retrieving revision 1.110 retrieving revision 1.111 diff -Lman_term.c -Lman_term.c -u -p -r1.110 -r1.111 --- man_term.c +++ man_term.c @@ -198,26 +198,30 @@ a2width(const struct termp *p, const cha return((int)term_hspan(p, &su)); } - +/* + * Printing leading vertical space before a block. + * This is used for the paragraph macros. + * The rules are pretty simple, since there's very little nesting going + * on here. Basically, if we're the first within another block (SS/SH), + * then don't emit vertical space. If we are (RS), then do. If not the + * first, print it. + */ static void print_bvspace(struct termp *p, const struct man_node *n) { - term_newln(p); - - if (n->body && n->body->child && MAN_TBL == n->body->child->type) - return; - if (NULL == n->prev) - return; + term_newln(p); - if (MAN_SS == n->prev->tok) - return; - if (MAN_SH == n->prev->tok) - return; + if (n->body && n->body->child) + if (MAN_TBL == n->body->child->type) + return; + + if (MAN_ROOT == n->parent->type || MAN_RS != n->parent->tok) + if (NULL == n->prev) + return; term_vspace(p); } - /* ARGSUSED */ static int Index: man_html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_html.c,v retrieving revision 1.72 retrieving revision 1.73 diff -Lman_html.c -Lman_html.c -u -p -r1.72 -r1.73 --- man_html.c +++ man_html.c @@ -135,7 +135,6 @@ html_man(void *arg, const struct man *m) printf("\n"); } - static void print_man(MAN_ARGS) { Index: TODO =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v retrieving revision 1.112 retrieving revision 1.113 diff -LTODO -LTODO -u -p -r1.112 -r1.113 --- TODO +++ TODO @@ -278,33 +278,12 @@ see for example named-checkconf(8). - In man(7), the sequence - regular text - .RS - .IP - should have a blank line between the text and the beginning of the - indented paragraph, see for example sudo(1). - -- In man(7), the sequence .SH HEADER .PP regular text should not produce any blank lines between the header and the text, see for example rsync(1). - Reported by naddy@ Mon, 28 Mar 2011 20:45:42 +0200 - -- In man(7), the sequence - regular text - .PP - .RS - indented text - should produce one blank line between the regular and indented texts, - see for example rsync(1), and - .RE - - .PP - .RS - should produce two,not one blank lines. Reported by naddy@ Mon, 28 Mar 2011 20:45:42 +0200 - In man(7), the sequence -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv