Bug 64561 - man2html problems with mandoc tables
man2html problems with mandoc tables
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: man (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-07 19:34 EDT by DaveG
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-14 00:13:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description DaveG 2002-05-07 19:35:00 EDT
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 00:13:21 EST
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.