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 1bcead4d; for ; Sun, 5 Apr 2015 09:44:06 -0500 (EST) Date: Sun, 5 Apr 2015 09:44:06 -0500 (EST) Message-Id: <17240295639639433173.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: Arguments to end macros of broken partial explicit blocks must X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Arguments to end macros of broken partial explicit blocks must go inside the breaking block. For example, in .It Ic cmd Oo .Ar optional_arg Oc Ar mandatory_arg the mandatory_arg is still inside the .It block. Used for example by mutella(1). Modified Files: -------------- mdocml: mdoc_macro.c Revision Data ------------- Index: mdoc_macro.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mdoc_macro.c,v retrieving revision 1.185 retrieving revision 1.186 diff -Lmdoc_macro.c -Lmdoc_macro.c -u -p -r1.185 -r1.186 --- mdoc_macro.c +++ mdoc_macro.c @@ -256,7 +256,9 @@ rew_last(struct mdoc *mdoc, const struct { struct roff_node *n, *np; - assert(to); + if (to->flags & MDOC_VALID) + return; + mdoc->next = MDOC_NEXT_SIBLING; while (mdoc->last != to) { /* @@ -625,10 +627,8 @@ blk_exp_close(MACRO_PROT_ARGS) for (j = 0; ; j++) { lastarg = *pos; - if (j == maxargs && n != NULL) { - rew_pending(mdoc, n); - n = NULL; - } + if (j == maxargs && n != NULL) + rew_last(mdoc, n); ac = mdoc_args(mdoc, line, pos, buf, tok, &p); if (ac == ARGS_PUNCT || ac == ARGS_EOLN) @@ -643,10 +643,8 @@ blk_exp_close(MACRO_PROT_ARGS) continue; } - if (n != NULL) { - rew_pending(mdoc, n); - n = NULL; - } + if (n != NULL) + rew_last(mdoc, n); mdoc->flags &= ~MDOC_NEWLINE; mdoc_macro(mdoc, ntok, line, lastarg, pos, buf); break; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv