patchGNU Core Utilities - Patches: patch #3286, printf "%c" (integer)...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #3286: printf "%c" (integer) outputs first digit instead of a character

Submitter:  G. Vamsee Krishna <vamsee>
Submitted:  Thu 12 Aug 2004 08:00:04 PM UTC
   
 
Category:  None Priority:  1 - Later
Status:  Invalid Privacy:  Public
Assigned to:  None Open/Closed:  Open

Mon 09 Jan 2006 04:24:38 AM UTC, 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.

Eric Blake <ericb>
Group administrator
Thu 12 Aug 2004 08:00:04 PM UTC, original submission:  


G. Vamsee Krishna <vamsee>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #7758:  printf.patch added by vamsee (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-01-09 ericb StatusNone Invalid
2004-08-12 vamsee Attached File- Added printf.patch, #3562

Back to the top

Powered by Savane 3.13-cf05.
Corresponding source code