tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Cc: Christian Neukirchen <chneukirchen@gmail.com>
Subject: Re: .TP/.HP inconsistent indentation with .br?
Date: Sun, 19 Apr 2015 21:51:45 +0200	[thread overview]
Message-ID: <20150419195145.GO32377@athene.usta.de> (raw)
In-Reply-To: <878ue2r9lq.fsf@gmail.com>

Hi Christian,

Christian Neukirchen wrote on Wed, Apr 08, 2015 at 04:13:53PM +0200:

> The following is a minimal example from a bug found in Linux dmsetup(8):
> 
> \f
> .SH SYNOPSIS
> .TP
> .B mirror
> .br
> Mirrors data across two or more devices.
> .HP
> .B multipath
> .br
> Mediates access through multiple paths to the same device.
> \f
> 
> In groff-1.22.3 and plan9port nroff both sentences are indented 5
> spaces, in mdocml-1.13.3 the second sentence is not indented at all.

I just committed a fix to both OpenBSD and mdocml.bsd.lv.

Thanks for reporting!
  Ingo


Log Message:
-----------
If an explicit line break request (.br or .sp) occurs within an .HP block,
the next line doesn't hang, but is simply indented.
Issue found by Christian Neukirchen <chneukirchen at gmail dot com>
in the dmsetup(8) manual on Linux.
This patch also improves the indentation of XDGA(3) and XrmGetResource(3).

Modified Files:
--------------
    mdocml:
        man_term.c

Revision Data
-------------
Index: man_term.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man_term.c,v
retrieving revision 1.182
retrieving revision 1.183
diff -Lman_term.c -Lman_term.c -u -p -r1.182 -r1.183
--- man_term.c
+++ man_term.c
@@ -482,6 +482,17 @@ pre_sp(DECL_ARGS)
 		for (i = 0; i < len; i++)
 			term_vspace(p);
 
+	/*
+	 * Handle an explicit break request in the same way
+	 * as an overflowing line.
+	 */
+
+	if (p->flags & TERMP_BRIND) {
+		p->offset = p->rmargin;
+		p->rmargin = p->maxrmargin;
+		p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND);
+	}
+
 	return(0);
 }
 
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

      reply	other threads:[~2015-04-19 19:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 14:13 Christian Neukirchen
2015-04-19 19:51 ` Ingo Schwarze [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150419195145.GO32377@athene.usta.de \
    --to=schwarze@usta.de \
    --cc=chneukirchen@gmail.com \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).