From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o7KMpTp1001380 for ; Fri, 20 Aug 2010 18:51:29 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o7KMpT4F020687; Fri, 20 Aug 2010 18:51:29 -0400 (EDT) Date: Fri, 20 Aug 2010 18:51:29 -0400 (EDT) Message-Id: <201008202251.o7KMpT4F020687@krisdoz.my.domain> 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: .Bl -column phrases ignore spacing rules for trailing X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- .Bl -column phrases ignore spacing rules for trailing punctuation and render it just like normal text. Minimal fix of a formatting bug in operator(7) reported by ray@. Modified Files: -------------- mdocml: TODO mdoc_term.c Revision Data ------------- Index: TODO =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v retrieving revision 1.41 retrieving revision 1.42 diff -LTODO -LTODO -u -p -r1.41 -r1.42 --- TODO +++ TODO @@ -56,6 +56,13 @@ - explicitly disallow nested `Bl -column', which would clobber internal flags defined for struct mdoc_macro +- inside `.Bl -column' phrases, punctuation is handled like normal + text, e.g. `.Bl -column .It Fl x . Ta ...' should give "-x -." + +- inside `.Bl -column' phrases, TERMP_IGNDELIM handling by `Pf' + is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab." + but should give "ab ." + - set a meaningful default if no `Bl' list type is assigned - have a blank `It' head for `Bl -tag' not puke Index: mdoc_term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v retrieving revision 1.181 retrieving revision 1.182 diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.181 -r1.182 --- mdoc_term.c +++ mdoc_term.c @@ -842,6 +842,8 @@ termp_it_pre(DECL_ARGS) if (MDOC_BODY == n->prev->type) p->flags |= TERMP_NOLPAD; + p->flags |= TERMP_IGNDELIM; + break; case (LIST_diag): if (MDOC_HEAD == n->type) @@ -1000,6 +1002,13 @@ termp_it_post(DECL_ARGS) p->flags &= ~TERMP_TWOSPACE; p->flags &= ~TERMP_NOLPAD; p->flags &= ~TERMP_HANG; + + /* + * TERMP_IGNDELIM is also set by `Pf', but it is safe + * to clear it here because `Pf' cannot contain `It'. + */ + + p->flags &= ~TERMP_IGNDELIM; } @@ -1804,6 +1813,10 @@ static void termp_pf_post(DECL_ARGS) { + /* + * XXX Resetting TERMP_IGNDELIM here is not safe + * because `Pf' can be used inside `Bl -column'. + */ p->flags &= ~TERMP_IGNDELIM; p->flags |= TERMP_NOSPACE; } -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv