Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154605247
D53913.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D53913.diff
View Options
diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c
--- a/lib/libc/stdlib/strfmon.c
+++ b/lib/libc/stdlib/strfmon.c
@@ -457,7 +457,7 @@
if (*sep_by_space == CHAR_MAX)
*sep_by_space = 0;
if (*sign_posn == CHAR_MAX)
- *sign_posn = 0;
+ *sign_posn = 1;
}
static int
diff --git a/lib/libc/tests/stdlib/strfmon_test.c b/lib/libc/tests/stdlib/strfmon_test.c
--- a/lib/libc/tests/stdlib/strfmon_test.c
+++ b/lib/libc/tests/stdlib/strfmon_test.c
@@ -205,8 +205,8 @@
{ "%(i", "C", "[123.45] [(123.45)]" },
{ "%(n", "en_US.UTF-8", "[$123.45] [($123.45)]" },
{ "%(i", "en_US.UTF-8", "[USD123.45] [(USD123.45)]" },
- { "%n", "C", "[123.45] [(123.45)]" }, /* XXX */
- { "%i", "C", "[123.45] [(123.45)]" }, /* XXX */
+ { "%n", "C", "[123.45] [-123.45]" },
+ { "%i", "C", "[123.45] [-123.45]" },
{ "%n", "en_US.UTF-8", "[$123.45] [-$123.45]" },
{ "%i", "en_US.UTF-8", "[USD123.45] [-USD123.45]" },
};
@@ -253,7 +253,7 @@
const char *locale;
const char *expected;
} tests[] = {
- { "C", "[ **1234.57 ] [ **1234.57 ]" }, /* XXX */
+ { "C", "[ **1234.57] [ **1234.57]" },
{ "de_DE.UTF-8", "[ **1234,57 €] [ **1.234,57 EUR]" },
{ "en_GB.UTF-8", "[ £**1234.57] [ GBP**1,234.57]" },
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 30, 12:51 AM (19 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32328128
Default Alt Text
D53913.diff (1 KB)
Attached To
Mode
D53913: strfmon: Fix negative sign handling for C locale
Attached
Detach File
Event Timeline
Log In to Comment