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
6974abe0
Commit
6974abe0
authored
Apr 26, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use wcstod_l/strtod_l in other functions that parses doubles.
parent
f7197663
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
83 deletions
+42
-83
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+4
-4
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+4
-4
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+3
-3
string.c
dlls/msvcrt/string.c
+16
-8
wcs.c
dlls/msvcrt/wcs.c
+15
-64
No files found.
dlls/msvcr80/msvcr80.spec
View file @
6974abe0
...
...
@@ -289,7 +289,7 @@
@ cdecl _assert(str str long) msvcrt._assert
@ stub _atodbl
@ stub _atodbl_l
@
stub
_atof_l
@
cdecl _atof_l(str ptr) msvcrt.
_atof_l
@ stub _atoflt
@ stub _atoflt_l
@ cdecl -ret64 _atoi64(str) msvcrt._atoi64
...
...
@@ -1105,7 +1105,7 @@
@ cdecl _wcsrev(wstr) msvcrt._wcsrev
@ cdecl _wcsset(wstr long) msvcrt._wcsset
@ stub _wcsset_s
@
stub
_wcstod_l
@
cdecl _wcstod_l(wstr ptr) msvcrt.
_wcstod_l
@ stub _wcstoi64
@ stub _wcstoi64_l
@ stub _wcstol_l
...
...
@@ -1207,8 +1207,8 @@
@ cdecl _wtempnam(wstr wstr) msvcrt._wtempnam
@ stub _wtmpnam
@ stub _wtmpnam_s
@
stub
_wtof
@
stub
_wtof_l
@
cdecl _wtof(wstr) msvcrt.
_wtof
@
cdecl _wtof_l(wstr ptr) msvcrt.
_wtof_l
@ cdecl _wtoi(wstr) msvcrt._wtoi
@ cdecl _wtoi64(wstr) msvcrt._wtoi64
@ stub _wtoi64_l
...
...
dlls/msvcr90/msvcr90.spec
View file @
6974abe0
...
...
@@ -281,7 +281,7 @@
@ cdecl _assert(str str long) msvcrt._assert
@ stub _atodbl
@ stub _atodbl_l
@
stub
_atof_l
@
cdecl _atof_l(str ptr) msvcrt.
_atof_l
@ stub _atoflt
@ stub _atoflt_l
@ cdecl -ret64 _atoi64(str) msvcrt._atoi64
...
...
@@ -1092,7 +1092,7 @@
@ cdecl _wcsrev(wstr) msvcrt._wcsrev
@ cdecl _wcsset(wstr long) msvcrt._wcsset
@ stub _wcsset_s
@
stub
_wcstod_l
@
cdecl _wcstod_l(wstr ptr) msvcrt.
_wcstod_l
@ stub _wcstoi64
@ stub _wcstoi64_l
@ stub _wcstol_l
...
...
@@ -1191,8 +1191,8 @@
@ cdecl _wtempnam(wstr wstr) msvcrt._wtempnam
@ stub _wtmpnam
@ stub _wtmpnam_s
@
stub
_wtof
@
stub
_wtof_l
@
cdecl _wtof(wstr) msvcrt.
_wtof
@
cdecl _wtof_l(wstr ptr) msvcrt.
_wtof_l
@ cdecl _wtoi(wstr) msvcrt._wtoi
@ cdecl _wtoi64(wstr) msvcrt._wtoi64
@ stub _wtoi64_l
...
...
dlls/msvcrt/msvcrt.spec
View file @
6974abe0
...
...
@@ -264,7 +264,7 @@
@ cdecl _assert(str str long) MSVCRT__assert
@ stub _atodbl #(ptr str)
# stub _atodbl_l
# stub
_atof_l
@ cdecl _atof_l(str ptr) MSVCRT_
_atof_l
# stub _atoflt_l
@ cdecl -ret64 _atoi64(str) ntdll._atoi64
# stub _atoi64_l
...
...
@@ -1136,8 +1136,8 @@
# stub _wtempnam_dbg
@ stub _wtmpnam #(ptr)
# stub _wtmpnam_s
# stub
_wtof
# stub
_wtof_l
@ cdecl _wtof(wstr) MSVCRT_
_wtof
@ cdecl _wtof_l(wstr ptr) MSVCRT_
_wtof_l
@ cdecl _wtoi(wstr) ntdll._wtoi
@ cdecl _wtoi64(wstr) ntdll._wtoi64
# stub _wtoi64_l
...
...
dlls/msvcrt/string.c
View file @
6974abe0
...
...
@@ -132,14 +132,6 @@ void CDECL MSVCRT__swab(char* src, char* dst, int len)
}
/*********************************************************************
* atof (MSVCRT.@)
*/
double
CDECL
MSVCRT_atof
(
const
char
*
str
)
{
return
atof
(
str
);
}
/*********************************************************************
* strtod_l (MSVCRT.@)
*/
double
CDECL
MSVCRT_strtod_l
(
const
char
*
str
,
char
**
end
,
MSVCRT__locale_t
locale
)
...
...
@@ -253,6 +245,22 @@ double CDECL MSVCRT_strtod( const char *str, char **end )
}
/*********************************************************************
* atof (MSVCRT.@)
*/
double
CDECL
MSVCRT_atof
(
const
char
*
str
)
{
return
MSVCRT_strtod_l
(
str
,
NULL
,
NULL
);
}
/*********************************************************************
* _atof_l (MSVCRT.@)
*/
double
CDECL
MSVCRT__atof_l
(
const
char
*
str
,
MSVCRT__locale_t
locale
)
{
return
MSVCRT_strtod_l
(
str
,
NULL
,
locale
);
}
/*********************************************************************
* strcoll (MSVCRT.@)
*/
int
CDECL
MSVCRT_strcoll
(
const
char
*
str1
,
const
char
*
str2
)
...
...
dlls/msvcrt/wcs.c
View file @
6974abe0
...
...
@@ -231,73 +231,24 @@ double CDECL MSVCRT__wcstod_l(const MSVCRT_wchar_t* str, MSVCRT_wchar_t** end,
*/
double
CDECL
MSVCRT_wcstod
(
const
MSVCRT_wchar_t
*
lpszStr
,
MSVCRT_wchar_t
**
end
)
{
const
MSVCRT_wchar_t
*
str
=
lpszStr
;
int
negative
=
0
;
double
ret
=
0
,
divisor
=
10
.
0
;
TRACE
(
"(%s,%p) semi-stub
\n
"
,
debugstr_w
(
lpszStr
),
end
);
/* FIXME:
* - Should set errno on failure
* - Should fail on overflow
* - Need to check which input formats are allowed
*/
while
(
isspaceW
(
*
str
))
str
++
;
if
(
*
str
==
'-'
)
{
negative
=
1
;
str
++
;
}
while
(
isdigitW
(
*
str
))
{
ret
=
ret
*
10
.
0
+
(
*
str
-
'0'
);
str
++
;
}
if
(
*
str
==
'.'
)
str
++
;
while
(
isdigitW
(
*
str
))
{
ret
=
ret
+
(
*
str
-
'0'
)
/
divisor
;
divisor
*=
10
;
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
;
return
MSVCRT__wcstod_l
(
lpszStr
,
end
,
NULL
);
}
TRACE
(
"returning %g
\n
"
,
ret
);
return
ret
;
/*********************************************************************
* _wtof (MSVCRT.@)
*/
double
CDECL
MSVCRT__wtof
(
const
MSVCRT_wchar_t
*
str
)
{
return
MSVCRT__wcstod_l
(
str
,
NULL
,
NULL
);
}
/*********************************************************************
* _wtof_l (MSVCRT.@)
*/
double
CDECL
MSVCRT__wtof_l
(
const
MSVCRT_wchar_t
*
str
,
MSVCRT__locale_t
locale
)
{
return
MSVCRT__wcstod_l
(
str
,
NULL
,
locale
);
}
typedef
struct
pf_output_t
{
...
...
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