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

Submitted by:  G. Vamsee Krishna <vamsee>
Submitted on:  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>
Project Administrator
Thu 12 Aug 2004 08:00:04 PM UTC, original submission:  
G. Vamsee Krishna <vamsee>


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


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




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.5