Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9a05e1fd
Commit
9a05e1fd
authored
Apr 08, 2004
by
Dave Belanger
Committed by
Alexandre Julliard
Apr 08, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wcstod: added exponent parsing and fixed handling of negative sign.
parent
70c4864e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
wcs.c
dlls/msvcrt/wcs.c
+27
-0
No files found.
dlls/msvcrt/wcs.c
View file @
9a05e1fd
...
...
@@ -20,6 +20,7 @@
*/
#include <limits.h>
#include <stdio.h>
#include <math.h>
#include "msvcrt.h"
#include "winnls.h"
#include "wine/unicode.h"
...
...
@@ -150,6 +151,32 @@ double MSVCRT_wcstod(const MSVCRT_wchar_t* lpszStr, MSVCRT_wchar_t** end)
str
++
;
}
if
(
*
str
==
'E'
||
*
str
==
'e'
||
*
str
==
'D'
||
*
str
==
'd'
)
{
int
negativeExponent
=
0
;
int
exponent
=
0
;
if
(
*
(
++
str
)
==
'-'
)
{
negativeExponent
=
1
;
str
++
;
}
while
(
isdigitW
(
*
str
))
{
exponent
=
exponent
*
10
+
(
*
str
-
'0'
);
str
++
;
}
if
(
exponent
!=
0
)
{
if
(
negativeExponent
)
ret
=
ret
/
pow
(
10
.
0
,
exponent
);
else
ret
=
ret
*
pow
(
10
.
0
,
exponent
);
}
}
if
(
negative
)
ret
=
-
ret
;
if
(
end
)
*
end
=
(
MSVCRT_wchar_t
*
)
str
;
...
...
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