Piotr Caban : msvcp60: Fixed num_put::fput implementation.
Alexandre Julliard
julliard at winehq.org
Wed Nov 14 13:17:16 CST 2012
Module: wine
Branch: master
Commit: 1cd95d4f828c066d5854c77845cbe8c9e97c72f1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1cd95d4f828c066d5854c77845cbe8c9e97c72f1
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Nov 14 15:39:08 2012 +0100
msvcp60: Fixed num_put::fput implementation.
---
dlls/msvcp60/locale.c | 47 -----------------------------------------------
1 files changed, 0 insertions(+), 47 deletions(-)
diff --git a/dlls/msvcp60/locale.c b/dlls/msvcp60/locale.c
index 2ed61de..a2a50df 100644
--- a/dlls/msvcp60/locale.c
+++ b/dlls/msvcp60/locale.c
@@ -5732,10 +5732,7 @@ static ostreambuf_iterator_char* num_put_char_fput(const num_put *this, ostreamb
ostreambuf_iterator_char dest, ios_base *base, char fill, char *buf, MSVCP_size_t count)
{
numpunct_char *numpunct = numpunct_char_use_facet(&base->loc);
- basic_string_char grouping_bstr;
- const char *grouping;
char *p, sep = *localeconv()->decimal_point;
- int cur_group = 0, group_size = 0;
int adjustfield = base->fmtfl & FMTFLAG_adjustfield;
MSVCP_size_t pad;
@@ -5750,25 +5747,6 @@ static ostreambuf_iterator_char* num_put_char_fput(const num_put *this, ostreamb
}
p--;
- /* Add separators to number */
- numpunct_char_grouping(numpunct, &grouping_bstr);
- grouping = basic_string_char_c_str(&grouping_bstr);
- sep = grouping[0] ? numpunct_char_thousands_sep(numpunct) : '\0';
-
- for(; p>buf && sep && grouping[cur_group]!=CHAR_MAX; p--) {
- group_size++;
- if(group_size == grouping[cur_group]) {
- group_size = 0;
- if(grouping[cur_group+1])
- cur_group++;
-
- memmove(p+1, p, buf+count-p);
- *p = sep;
- count++;
- }
- }
- basic_string_char_dtor(&grouping_bstr);
-
/* Display number with padding */
if(count >= base->wide)
pad = 0;
@@ -6420,11 +6398,7 @@ static ostreambuf_iterator_wchar* num_put__fput(const num_put *this, ostreambuf_
ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, char *buf,
MSVCP_size_t count, numpunct_wchar *numpunct)
{
- basic_string_char grouping_bstr;
- const char *grouping;
char *p, dec_point = *localeconv()->decimal_point;
- wchar_t sep;
- int cur_group = 0, group_size = 0;
int adjustfield = base->fmtfl & FMTFLAG_adjustfield;
MSVCP_size_t i, pad;
@@ -6436,25 +6410,6 @@ static ostreambuf_iterator_wchar* num_put__fput(const num_put *this, ostreambuf_
}
p--;
- /* Add separators to number */
- numpunct_wchar_grouping(numpunct, &grouping_bstr);
- grouping = basic_string_char_c_str(&grouping_bstr);
- sep = grouping[0] ? numpunct_wchar_thousands_sep(numpunct) : '\0';
-
- for(; p>buf && sep && grouping[cur_group]!=CHAR_MAX; p--) {
- group_size++;
- if(group_size == grouping[cur_group]) {
- group_size = 0;
- if(grouping[cur_group+1])
- cur_group++;
-
- memmove(p+1, p, buf+count-p);
- *p = '\0'; /* mark thousands separator positions */
- count++;
- }
- }
- basic_string_char_dtor(&grouping_bstr);
-
/* Display number with padding */
if(count >= base->wide)
pad = 0;
@@ -6474,8 +6429,6 @@ static ostreambuf_iterator_wchar* num_put__fput(const num_put *this, ostreambuf_
for(i=0; i<count; i++) {
if(buf[i] == dec_point)
num_put_wchar__Rep(this, &dest, dest, numpunct_wchar_decimal_point(numpunct), 1);
- else if(!buf[i])
- num_put_wchar__Rep(this, &dest, dest, sep, 1);
else
num_put_wchar__Putc(this, &dest, dest, buf+i, 1);
}
More information about the wine-cvs
mailing list