* Re: Stray T} in tbl mode
2015-04-08 14:22 Stray T} in tbl mode Christian Neukirchen
@ 2015-04-19 20:57 ` Ingo Schwarze
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Schwarze @ 2015-04-19 20:57 UTC (permalink / raw)
To: Christian Neukirchen; +Cc: tech
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
^ permalink raw reply [flat|nested] 2+ messages in thread