Hi, admittedly, this is a small bug, but i like to keep our groff in sync with patches that i submitted upstream to fix issues in OpenBSD base or ports and that have been merged upstream. That helps groff-mandoc comparisions.
When checking whether there is another argument to a Bl macro, do not inspect the argument list because it is never cleaned and may contain arguments from previous macro invocations. Instead, inspect the argument count which is always up to date. This fixes e.g. mutella(1) from ports when formatted with groff instead of mandoc. OK? Ingo Index: Makefile =================================================================== RCS file: /cvs/ports/textproc/groff/Makefile,v retrieving revision 1.28 diff -u -p -r1.28 Makefile --- Makefile 16 Feb 2015 15:45:11 -0000 1.28 +++ Makefile 16 Apr 2015 23:19:33 -0000 @@ -4,7 +4,7 @@ COMMENT = GNU troff typesetter VERSION = 1.22.3 SUBST_VARS = VERSION DISTNAME = groff-${VERSION} -REVISION = 0 +REVISION = 1 CATEGORIES = textproc DPB_PROPERTIES = parallel Index: patches/patch-tmac_doc_tmac =================================================================== RCS file: /cvs/ports/textproc/groff/patches/patch-tmac_doc_tmac,v retrieving revision 1.4 diff -u -p -r1.4 patch-tmac_doc_tmac --- patches/patch-tmac_doc_tmac 6 Nov 2014 22:15:23 -0000 1.4 +++ patches/patch-tmac_doc_tmac 16 Apr 2015 23:19:33 -0000 @@ -1,7 +1,17 @@ $OpenBSD: patch-tmac_doc_tmac,v 1.4 2014/11/06 22:15:23 schwarze Exp $ -Always format .Pa the same way, as requested by jmc@ (local change). ---- tmac/doc.tmac.orig Sun Oct 12 23:00:09 2014 -+++ tmac/doc.tmac Sun Oct 12 23:27:06 2014 +chunk 1: Trailing -width/-offset must not pick up old args (merged upstream). +chunk 2: Always format .Pa the same way, as requested by jmc@ (local change). +--- tmac/doc.tmac.orig Tue Nov 4 09:38:35 2014 ++++ tmac/doc.tmac Fri Apr 17 01:03:11 2015 +@@ -3126,7 +3126,7 @@ + . + . \" avoid a warning message in case e.g. `-offset' has no parameter + . nr doc-reg-dBla (\n[doc-arg-ptr] + 1) +-. if !d doc-arg\n[doc-reg-dBla] \ ++. if (\n[doc-arg-limit] < \n[doc-reg-dBla]) \ + . ds doc-arg\n[doc-reg-dBla] + . + . nr doc-reg-dBla 1 @@ -3765,8 +3765,6 @@ . . if \n[doc-in-files-section] \{\