Bug 217649 - Incorrect processing of <funcsynopsisinfo> by docbook2man
Incorrect processing of <funcsynopsisinfo> by docbook2man
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: docbook-utils (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ondrej Vasik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-28 23:48 EST by Sam Varshavchik
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-21 04:13:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Sample Docbook soruce (859 bytes, text/plain)
2006-11-28 23:48 EST, Sam Varshavchik
no flags Details

  None (edit)
Description Sam Varshavchik 2006-11-28 23:48:19 EST
Description of problem:

docbook2man does not correctly convert <funcsynopsisinfo>.

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

0.6.14

How reproducible:

Always

Steps to Reproduce:

1. Run docbook2man on test.sgml, attached to this bug
  
Actual results:

The contents of the output file, example.2, are:

.SH SYNOPSIS
.sp
\fB#include <unistd.h>
#include <sys/types.h>
#include <linux/unistd.h>
#include <errno.h>
_syscall5(int, _llseek, unsigned int, fd, unsigned long, hi,
unsigned long, lo, loff_t *, res, unsigned int, wh)
.sp
int foobar(void);
\fR

Expected results:

.SH SYNOPSIS
.sp
.nf
\fB#include <unistd.h>

#include <sys/types.h>

#include <linux/unistd.h>

#include <errno.h>

_syscall5(int, _llseek, unsigned int, fd, unsigned long, hi,
unsigned long, lo, loff_t *, res, unsigned int, wh)
\fR
.fi
.sp
\fB
int foobar(void);
\fR

Additional info:

"Docbook, The Definitive Guide", says this about the <funcsynopsisinfo> tag:

<<snip>>
Processing expectations
=======================

This element is displayed "verbatim"; whitespace and linebreaks within this
element are significant.
<<snip>>

Whitespace and linebreaks in <funcsynopsisinfo> ARE SIGNIFICANT, therefore it
should be copied verbatim, and no-filled.  The .sp before the .nf, or after the
.fi, may or may not be needed, not sure which way it will looks pretty.

Indeeed, if docbook2man's current output is run through nroff/man, the result is
a predictable mishmash:

SYNOPSIS
       #include  <unistd.h>  #include  <sys/types.h> #include <linux/unistd.h>
       #include <errno.h> _syscall5(int, _llseek, unsigned int,  fd,  unsigned
       long,  hi, unsigned long, lo, loff_t *, res, unsigned int, wh)

Yuck.  The E-mail address listed in the nroff header, Steve Cheng
<steve@ggi-project.org>, appears to be dead, ggi-project.org has no DNS MX or A
records.
Comment 1 Sam Varshavchik 2006-11-28 23:48:19 EST
Created attachment 142363 [details]
Sample Docbook soruce
Comment 2 Petr Mejzlik 2007-04-24 11:03:33 EDT
Committed a fix (in  docbook2man-spec.pl).

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