Bug 299551 - Thousand separator flag in format string is sticky
Summary: Thousand separator flag in format string is sticky
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gawk
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Stepan Kasal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-21 00:18 UTC by Ulrich Drepper
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-10-31 17:03:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to unstick thousands separator flag (298 bytes, patch)
2007-09-21 00:18 UTC, Ulrich Drepper
no flags Details | Diff

Description Ulrich Drepper 2007-09-21 00:18:06 UTC
Description of problem:
When using code like

   printf "%'d %d"

in a script currently both numbers are printed using thousand separators (given
the numbers are large enough).  This is not correct, the flag should not be sticky.


Version-Release number of selected component (if applicable):
gawk-3.1.5-15.fc7

How reproducible:
always

Steps to Reproduce:
1.store this in a file:

env LC_ALL=en_US.UTF-8 \
./gawk < /dev/null -f /dev/fd/3 3<<'EOF'
END { printf "%'d %d\n", 1000000000000, 1000000000000 }
EOF

2. run using bash or so
3.
  
Actual results:
1,000,000,000,000 1,000,000,000,000


Expected results:
1,000,000,000,000 1000000000000


Additional info:
I'll attach a patch.

Comment 1 Ulrich Drepper 2007-09-21 00:18:06 UTC
Created attachment 201551 [details]
Patch to unstick thousands separator flag

Comment 2 Stepan Kasal 2007-10-31 17:03:14 UTC
Applied in gawk-3.1.5-16.fc9, together with a patch for a new test case which
checks for this bug.



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