After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 508483 - wrong c-format "% 5d"?
wrong c-format "% 5d"?
Status: RESOLVED FIXED
Product: gnome-utils
Classification: Deprecated
Component: baobab
2.28.x
Other All
: Normal normal
: ---
Assigned To: Fabio Marzocca
gnome-utils Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-10 11:02 UTC by dooteo
Modified: 2009-11-09 07:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28



Description dooteo 2008-01-10 11:02:00 UTC
Please describe the problem:
In the POT file, appears next plural string:

#: ../baobab/src/baobab.c:318
#, c-format
msgid "% 5d item"
msgid_plural "% 5d items"
msgstr[0] ""
msgstr[1] ""

I guest it should be something like

msgid "%d item"
msgid_plural "%d items"

Where there aren't space between '%' char and 'd' char.

So, could you fix them if they're wrong?

Thanks



Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Paolo Borelli 2008-01-14 15:38:01 UTC
I think that the '5' is intentional... it means how the number should be formatted (see man 3 printf for details). However the space looks wrong the format should probably be %5d: can someone test it?
Comment 2 dooteo 2008-01-14 15:51:55 UTC
using bash shell, I make a test with "% 5d"

$ printf "% 5d" 123456
 123456

So it puts a space at the begining of the line, but it doesn't show 5 digits, it shows all digits. Printf uses .2 to show the first 2 decimals in float point values, but it does not affect to integers.

Next test is without space:
$ printf "%5d" 123456
123456

Thanks and best regards
Comment 3 Fabio Marzocca 2009-11-09 07:56:08 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.