tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: Christian Neukirchen <chneukirchen@gmail.com>
Cc: tech@mdocml.bsd.lv
Subject: Re: Stray T} in tbl mode
Date: Sun, 19 Apr 2015 22:57:58 +0200	[thread overview]
Message-ID: <20150419205758.GQ32377@athene.usta.de> (raw)
In-Reply-To: <874moqr97b.fsf@gmail.com>

Hi Christian,

Christian Neukirchen wrote on Wed, Apr 08, 2015 at 04:22:32PM +0200:

> The following table, simplified version of Linux socket(2) misrenders:
> 
> \f
> .TH SOCKET 2 2015-03-29 "Linux" "Linux Programmer's Manual"
> .SH SYNOPSIS
> .TS
> tab(:);
> l l l.
> Name:Purpose:Man page
> T{
> .BR AF_UNIX ", " AF_LOCAL
> T}:T{
> Local communication
> T}:T{
> .BR unix (7)
> T}
> T{
> .B AF_INET
> T}:IPv4 Internet protocols:T{
> .BR ip (7)
> T}
> .TE
> \f
> 
> The final T} appears in the output, and ip(7) ends up as first entry
> of line 3, not third entry of line 2, as it should.
> 
> (Moving "IPv4 Internet protocols" into its own line and wrapping it in
> T{...T} helps...)
> 
> Renders OK in tbl/groff and plan9port tbl/nroff.

I just fixed this in OpenBSD and in mdocml.bsd.lv, too.

Thanks again for reporting,
  Ingo



Log Message:
-----------
More than one data field may follow T} on the same input line.
Issue found by Christian Neukirchen <chneukirchen at gmail dot com>
in the socket(2) manual on Linux.
Also fixes major rendering bugs (including partial loss of content)
in XkbChangeControls(3), XkbFreeClientMap(3), XkbGetMap(3), 
XkbKeyNumGroups(3), and XkbSetMap(3).

Modified Files:
--------------
    mdocml:
        tbl_data.c

Revision Data
-------------
Index: tbl_data.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/tbl_data.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -Ltbl_data.c -Ltbl_data.c -u -p -r1.39 -r1.40
--- tbl_data.c
+++ tbl_data.c
@@ -132,7 +132,8 @@ tbl_cdata(struct tbl_node *tbl, int ln, 
 		if (p[pos] == tbl->opts.tab) {
 			tbl->part = TBL_PART_DATA;
 			pos++;
-			getdata(tbl, tbl->last_span, ln, p, &pos);
+			while (p[pos] != '\0')
+				getdata(tbl, tbl->last_span, ln, p, &pos);
 			return(1);
 		} else if (p[pos] == '\0') {
 			tbl->part = TBL_PART_DATA;
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 14:22 Christian Neukirchen
2015-04-19 20:57 ` 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=20150419205758.GQ32377@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).