Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9416918a
Commit
9416918a
authored
Oct 04, 2012
by
Daniel Lehman
Committed by
Alexandre Julliard
Oct 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90: In num_put, use default precision of 6 if 0 and not fixed.
parent
2a42410e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
locale.c
dlls/msvcp90/locale.c
+17
-6
ios.c
dlls/msvcp90/tests/ios.c
+0
-0
No files found.
dlls/msvcp90/locale.c
View file @
9416918a
...
...
@@ -6687,6 +6687,11 @@ ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put *this,
return
call_num_put_char_do_put_ulong
(
this
,
ret
,
dest
,
base
,
fill
,
v
);
}
static
inline
streamsize
get_precision
(
const
ios_base
*
base
)
{
return
base
->
prec
<=
0
&&
!
(
base
->
fmtfl
&
FMTFLAG_fixed
)
?
6
:
base
->
prec
;
}
/* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DN@Z */
/* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DN@Z */
/* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DO@Z */
...
...
@@ -6704,11 +6709,13 @@ ostreambuf_iterator_char* __thiscall num_put_char_do_put_double(const num_put *t
char
*
tmp
;
char
fmt
[
8
];
/* strlen("%+#.*lg")+1 */
int
size
;
streamsize
prec
;
TRACE
(
"(%p %p %p %d %lf)
\n
"
,
this
,
ret
,
base
,
fill
,
v
);
num_put_char__Ffmt
(
this
,
fmt
,
'\0'
,
base
->
fmtfl
);
size
=
_scprintf
(
fmt
,
base
->
prec
,
v
);
prec
=
get_precision
(
base
);
size
=
_scprintf
(
fmt
,
prec
,
v
);
/* TODO: don't use dynamic allocation */
tmp
=
MSVCRT_operator_new
(
size
*
2
);
...
...
@@ -6716,7 +6723,7 @@ ostreambuf_iterator_char* __thiscall num_put_char_do_put_double(const num_put *t
ERR
(
"Out of memory
\n
"
);
throw_exception
(
EXCEPTION_BAD_ALLOC
,
NULL
);
}
num_put_char_fput
(
this
,
ret
,
dest
,
base
,
fill
,
tmp
,
sprintf
(
tmp
,
fmt
,
base
->
prec
,
v
));
num_put_char_fput
(
this
,
ret
,
dest
,
base
,
fill
,
tmp
,
sprintf
(
tmp
,
fmt
,
prec
,
v
));
MSVCRT_operator_delete
(
tmp
);
return
ret
;
}
...
...
@@ -7494,11 +7501,13 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_double(const num_put
char
*
tmp
;
char
fmt
[
8
];
/* strlen("%+#.*lg")+1 */
int
size
;
streamsize
prec
;
TRACE
(
"(%p %p %p %d %lf)
\n
"
,
this
,
ret
,
base
,
fill
,
v
);
num_put_wchar__Ffmt
(
this
,
fmt
,
'\0'
,
base
->
fmtfl
);
size
=
_scprintf
(
fmt
,
base
->
prec
,
v
);
prec
=
get_precision
(
base
);
size
=
_scprintf
(
fmt
,
prec
,
v
);
/* TODO: don't use dynamic allocation */
tmp
=
MSVCRT_operator_new
(
size
*
2
);
...
...
@@ -7506,7 +7515,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_double(const num_put
ERR
(
"Out of memory
\n
"
);
throw_exception
(
EXCEPTION_BAD_ALLOC
,
NULL
);
}
num_put__fput
(
this
,
ret
,
dest
,
base
,
fill
,
tmp
,
sprintf
(
tmp
,
fmt
,
base
->
prec
,
v
),
num_put__fput
(
this
,
ret
,
dest
,
base
,
fill
,
tmp
,
sprintf
(
tmp
,
fmt
,
prec
,
v
),
numpunct_wchar_use_facet
(
base
->
loc
));
MSVCRT_operator_delete
(
tmp
);
return
ret
;
...
...
@@ -7523,11 +7532,13 @@ ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_double(const num_put
char
*
tmp
;
char
fmt
[
8
];
/* strlen("%+#.*lg")+1 */
int
size
;
streamsize
prec
;
TRACE
(
"(%p %p %p %d %lf)
\n
"
,
this
,
ret
,
base
,
fill
,
v
);
num_put_wchar__Ffmt
(
this
,
fmt
,
'\0'
,
base
->
fmtfl
);
size
=
_scprintf
(
fmt
,
base
->
prec
,
v
);
prec
=
get_precision
(
base
);
size
=
_scprintf
(
fmt
,
prec
,
v
);
/* TODO: don't use dynamic allocation */
tmp
=
MSVCRT_operator_new
(
size
*
2
);
...
...
@@ -7535,7 +7546,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_double(const num_put
ERR
(
"Out of memory
\n
"
);
throw_exception
(
EXCEPTION_BAD_ALLOC
,
NULL
);
}
num_put__fput
(
this
,
ret
,
dest
,
base
,
fill
,
tmp
,
sprintf
(
tmp
,
fmt
,
base
->
prec
,
v
),
num_put__fput
(
this
,
ret
,
dest
,
base
,
fill
,
tmp
,
sprintf
(
tmp
,
fmt
,
prec
,
v
),
numpunct_short_use_facet
(
base
->
loc
));
MSVCRT_operator_delete
(
tmp
);
return
ret
;
...
...
dlls/msvcp90/tests/ios.c
View file @
9416918a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment