bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #3286] printf "%c" (integer) outputs first digit instead of a cha


From: Eric Blake
Subject: [patch #3286] printf "%c" (integer) outputs first digit instead of a character
Date: Sun, 8 Jan 2006 21:24:38 -0700
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20051012 Netscape/8.0.4

Update of patch #3286 (project coreutils):

                  Status:                    None => Invalid                

    _______________________________________________________

Follow-up Comment #1:

POSIX requires the current behavior, where the argument that matches up to %c
is treated as a string and the first character of that string is printed.  So,
unfortunately, your patch cannot be accepted without violating POSIX semantics
for printf(1).  What would be useful, however, is a documentation patch that
makes this behavior clear in both the info pages and the --help output (right
now, the info pages assume that you already know how printf(3) works, which is
not as useful as it could be; and fails to mention that %c parses its argument
as a string and not a C constant integer).  I'm leaving this patch open as a
reminder that a doc patch is needed.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?func=detailitem&item_id=3286>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]