Bug 64561 - man2html problems with mandoc tables
Summary: man2html problems with mandoc tables
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: man
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-07 23:34 UTC by DaveG
Modified: 2007-04-18 16:42 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-14 05:13:21 UTC
Embargoed:


Attachments (Terms of Use)

Description DaveG 2002-05-07 23:35:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 95)

Description of problem:
man2html has problems with some tables in manual pages e.g. fetchmail

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Install and set up man2html component of man-1.5i2
2.zcat /usr/share/man/man1/fetchmail.1.gz|man2html or use CGI.

Actual Results:  Trouble after "Here are the legal global options:"
HTML table bears no resemblance to mandoc source or man(1) output.

Expected Results:  Formatted HTML table.

Additional info:

Problem located in man2html.c:
TBL specification states that the column width indication, "w", should be 
followed by a width in parentheses. But:
	"If the width specification is a unitless integer, the parentheses may 
be omitted." (TBL)
man2html ASSUMES that the parentheses exist.

Here is my PATCH, works OK, minimal changes...
--- man-1.5i2/man2html/man2html.c.orig  Thu May  2 10:57:23 2002
+++ man-1.5i2/man2html/man2html.c       Tue May  7 23:39:10 2002
@@ -748,7 +748,14 @@
            break;
        case 'v': case 'V':
        case 'w': case 'W':
-           c=scan_expression(c+2,&curfield->width);
+           c++;
+           if (*c == '(') {
+               c=scan_expression(c+1,&curfield->width);
+           } else {
+               i=0;
+               while (isdigit(*c)) i=i*10+(*c++)-'0';
+               curfield->width=i;
+           }
            break;
        case '|':
            if (curfield->align) curfield->vleft++;

Comment 1 Eido Inoue 2003-01-14 05:13:21 UTC
this appears to be fixed in man-1.5k-2.



Note You need to log in before you can comment on or make changes to this bug.