Bug 12840 - printf(1) man page misformatted
printf(1) man page misformatted
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: sh-utils (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: bero
:
: 17046 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-06-23 03:09 EDT by Theodore C. Belding
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-07-15 09:42:41 EDT
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 Theodore C. Belding 2000-06-23 03:09:43 EDT
I typed "man printf" by mistake instead of "man 3 printf" and noticed that
the printf(1) man page from sh-utils-2.0-5 isn't formatted correctly. This
seems to be because backslashes aren't escaped correctly in the man page
source. The man page is apparently generated by help2man 1.012, so I guess
this may actually be a help2man error. I know that GNU doesn't maintain man
pages, but I thought I'd bring this up anyway.

The section with the bad formatting is:

       FORMAT  controls  the  output as in C printf.  Interpreted
       sequences are:


       double quote

        NNN   character with octal value NNN (0 to 3 digits)

       b      backslash
       a
       c....  alert (BEL)
       k
       s.TP   produce no further output
       p
       a
       form feed
       e

       new line
              carriage return


              horizontal tab

       vertical tab

       N      character with hexadecimal value NNN (1 to  3  dig-
              its)


I also get the following error messages: 
<standard input>:44: a newline character is not allowed in an escape name
<standard input>:47: a newline character is not allowed in an escape name
<standard input>:56: cannot use newline as a starting delimiter
<standard input>:59: warning: numeric expression expected (got `N')

The relevant section of the source seems to be:

FORMAT controls the output as in C printf.  Interpreted sequences are:
.TP \" double quote
.TP \0NNN character with octal value NNN (0 to 3 digits)
.TP \\ backslash
.TP \a alert (BEL)
.TP
\b
backspace
.TP
\c
produce no further output
.TP
\f
form feed
.TP
\n
new line
.TP
\r
carriage return
.TP
\t
horizontal tab
.TP
\v
vertical tab
.TP
\xNNN
character with hexadecimal value NNN (1 to 3 digits)
Comment 1 Pekka Savola 2000-07-15 09:42:39 EDT
Still is still an issue (in Rawhide).

The problem here is the too old version of help2man.  A newer version obtained
from ftp://ftp.gnu.org/gnu/help2man/ can escape backslashes properly.

Comment 2 Jeff Johnson 2001-01-06 07:26:11 EST
Fixed in sh-utils-2.0-12.
Comment 3 Jeff Johnson 2001-01-06 07:27:13 EST
*** Bug 17046 has been marked as a duplicate of this bug. ***

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