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
78716aeb
Commit
78716aeb
authored
Feb 18, 2016
by
Bernhard Übelacker
Committed by
Alexandre Julliard
Feb 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr120: Implement strtof and _strtof_l.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aff5d2c1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
8 deletions
+73
-8
api-ms-win-crt-convert-l1-1-0.spec
...win-crt-convert-l1-1-0/api-ms-win-crt-convert-l1-1-0.spec
+2
-2
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+2
-2
msvcr120.c
dlls/msvcr120/tests/msvcr120.c
+49
-0
msvcr120_app.spec
dlls/msvcr120_app/msvcr120_app.spec
+2
-2
string.c
dlls/msvcrt/string.c
+16
-0
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+2
-2
No files found.
dlls/api-ms-win-crt-convert-l1-1-0/api-ms-win-crt-convert-l1-1-0.spec
View file @
78716aeb
...
...
@@ -30,7 +30,7 @@
@ cdecl _ltow(long ptr long) ucrtbase._ltow
@ cdecl _ltow_s(long ptr long long) ucrtbase._ltow_s
@ cdecl _strtod_l(str ptr ptr) ucrtbase._strtod_l
@
stub
_strtof_l
@
cdecl _strtof_l(str ptr ptr) ucrtbase.
_strtof_l
@ cdecl -ret64 _strtoi64(str ptr long) ucrtbase._strtoi64
@ cdecl -ret64 _strtoi64_l(str ptr long ptr) ucrtbase._strtoi64_l
@ stub _strtoimax_l
...
...
@@ -93,7 +93,7 @@
@ cdecl mbstowcs_s(ptr ptr long str long) ucrtbase.mbstowcs_s
@ cdecl mbtowc(ptr str long) ucrtbase.mbtowc
@ cdecl strtod(str ptr) ucrtbase.strtod
@
stub
strtof
@
cdecl strtof(str ptr) ucrtbase.
strtof
@ stub strtoimax
@ cdecl strtol(str ptr long) ucrtbase.strtol
@ stub strtold
...
...
dlls/msvcr120/msvcr120.spec
View file @
78716aeb
...
...
@@ -1731,7 +1731,7 @@
@ cdecl _strtime(ptr) MSVCRT__strtime
@ cdecl _strtime_s(ptr long)
@ cdecl _strtod_l(str ptr ptr) MSVCRT_strtod_l
@
stub
_strtof_l
@
cdecl _strtof_l(str ptr ptr) MSVCRT_
_strtof_l
@ cdecl -ret64 _strtoi64(str ptr long) MSVCRT_strtoi64
@ cdecl -ret64 _strtoi64_l(str ptr long ptr) MSVCRT_strtoi64_l
@ stub _strtoimax_l
...
...
@@ -2386,7 +2386,7 @@
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strstr(str str) MSVCRT_strstr
@ cdecl strtod(str ptr) MSVCRT_strtod
@
stub
strtof
@
cdecl strtof(str ptr) MSVCRT_
strtof
@ stub strtoimax
@ cdecl strtok(str str) MSVCRT_strtok
@ cdecl strtok_s(ptr str ptr) MSVCRT_strtok_s
...
...
dlls/msvcr120/tests/msvcr120.c
View file @
78716aeb
...
...
@@ -21,6 +21,8 @@
#include <stdlib.h>
#include <wchar.h>
#include <stdio.h>
#include <float.h>
#include <limits.h>
#include <windef.h>
#include <winbase.h>
...
...
@@ -83,6 +85,8 @@ static wchar_t** (CDECL *p____lc_locale_name_func)(void);
static
unsigned
int
(
CDECL
*
p__GetConcurrency
)(
void
);
static
void
*
(
CDECL
*
p__W_Gettnames
)(
void
);
static
void
(
CDECL
*
p_free
)(
void
*
);
static
float
(
CDECL
*
p_strtof
)(
const
char
*
,
char
**
);
static
int
(
CDECL
*
p__finite
)(
double
);
static
BOOL
init
(
void
)
{
...
...
@@ -105,6 +109,8 @@ static BOOL init(void)
p__GetConcurrency
=
(
void
*
)
GetProcAddress
(
module
,
"?_GetConcurrency@details@Concurrency@@YAIXZ"
);
p__W_Gettnames
=
(
void
*
)
GetProcAddress
(
module
,
"_W_Gettnames"
);
p_free
=
(
void
*
)
GetProcAddress
(
module
,
"free"
);
p_strtof
=
(
void
*
)
GetProcAddress
(
module
,
"strtof"
);
p__finite
=
(
void
*
)
GetProcAddress
(
module
,
"_finite"
);
return
TRUE
;
}
...
...
@@ -321,6 +327,48 @@ static void test__W_Gettnames(void)
p_setlocale
(
LC_ALL
,
"C"
);
}
static
void
test__strtof
(
void
)
{
const
char
float1
[]
=
"12.0"
;
const
char
float2
[]
=
"3.402823466e+38"
;
/* FLT_MAX */
const
char
float3
[]
=
"-3.402823466e+38"
;
const
char
float4
[]
=
"1.7976931348623158e+308"
;
/* DBL_MAX */
char
*
end
;
float
f
;
f
=
p_strtof
(
float1
,
&
end
);
ok
(
f
==
12
.
0
,
"f = %lf
\n
"
,
f
);
ok
(
end
==
float1
+
4
,
"incorrect end (%d)
\n
"
,
(
int
)(
end
-
float1
));
f
=
p_strtof
(
float2
,
&
end
);
ok
(
f
==
FLT_MAX
,
"f = %lf
\n
"
,
f
);
ok
(
end
==
float2
+
15
,
"incorrect end (%d)
\n
"
,
(
int
)(
end
-
float2
));
f
=
p_strtof
(
float3
,
&
end
);
ok
(
f
==
-
FLT_MAX
,
"f = %lf
\n
"
,
f
);
ok
(
end
==
float3
+
16
,
"incorrect end (%d)
\n
"
,
(
int
)(
end
-
float3
));
f
=
p_strtof
(
float4
,
&
end
);
ok
(
!
p__finite
(
f
),
"f = %lf
\n
"
,
f
);
ok
(
end
==
float4
+
23
,
"incorrect end (%d)
\n
"
,
(
int
)(
end
-
float4
));
f
=
p_strtof
(
"inf"
,
NULL
);
ok
(
f
==
0
,
"f = %lf
\n
"
,
f
);
f
=
p_strtof
(
"INF"
,
NULL
);
ok
(
f
==
0
,
"f = %lf
\n
"
,
f
);
f
=
p_strtof
(
"1.#inf"
,
NULL
);
ok
(
f
==
1
,
"f = %lf
\n
"
,
f
);
f
=
p_strtof
(
"INFINITY"
,
NULL
);
ok
(
f
==
0
,
"f = %lf
\n
"
,
f
);
f
=
p_strtof
(
"0x12"
,
NULL
);
ok
(
f
==
0
,
"f = %lf
\n
"
,
f
);
}
START_TEST
(
msvcr120
)
{
if
(
!
init
())
return
;
...
...
@@ -330,4 +378,5 @@ START_TEST(msvcr120)
test____lc_locale_name_func
();
test__GetConcurrency
();
test__W_Gettnames
();
test__strtof
();
}
dlls/msvcr120_app/msvcr120_app.spec
View file @
78716aeb
...
...
@@ -1442,7 +1442,7 @@
@ cdecl _strtime(ptr) msvcr120._strtime
@ cdecl _strtime_s(ptr long) msvcr120._strtime_s
@ cdecl _strtod_l(str ptr ptr) msvcr120._strtod_l
@
stub
_strtof_l
@
cdecl _strtof_l(str ptr ptr) msvcr120.
_strtof_l
@ cdecl -ret64 _strtoi64(str ptr long) msvcr120._strtoi64
@ cdecl -ret64 _strtoi64_l(str ptr long ptr) msvcr120._strtoi64_l
@ stub _strtoimax_l
...
...
@@ -2049,7 +2049,7 @@
@ cdecl strspn(str str) msvcr120.strspn
@ cdecl strstr(str str) msvcr120.strstr
@ cdecl strtod(str ptr) msvcr120.strtod
@
stub
strtof
@
cdecl strtof(str ptr) msvcr120.
strtof
@ stub strtoimax
@ cdecl strtok(str str) msvcr120.strtok
@ cdecl strtok_s(ptr str ptr) msvcr120.strtok_s
...
...
dlls/msvcrt/string.c
View file @
78716aeb
...
...
@@ -497,6 +497,22 @@ double CDECL MSVCRT_strtod( const char *str, char **end )
}
/*********************************************************************
* strtof_l (MSVCR120.@)
*/
float
CDECL
MSVCRT__strtof_l
(
const
char
*
str
,
char
**
end
,
MSVCRT__locale_t
locale
)
{
return
MSVCRT_strtod_l
(
str
,
end
,
locale
);
}
/*********************************************************************
* strtof (MSVCR120.@)
*/
float
CDECL
MSVCRT_strtof
(
const
char
*
str
,
char
**
end
)
{
return
MSVCRT__strtof_l
(
str
,
end
,
NULL
);
}
/*********************************************************************
* atof (MSVCRT.@)
*/
double
CDECL
MSVCRT_atof
(
const
char
*
str
)
...
...
dlls/ucrtbase/ucrtbase.spec
View file @
78716aeb
...
...
@@ -1949,7 +1949,7 @@
@ cdecl _strtime(ptr) MSVCRT__strtime
@ cdecl _strtime_s(ptr long)
@ cdecl _strtod_l(str ptr ptr) MSVCRT_strtod_l
@
stub
_strtof_l
@
cdecl _strtof_l(str ptr ptr) MSVCRT_
_strtof_l
@ cdecl -ret64 _strtoi64(str ptr long) MSVCRT_strtoi64
@ cdecl -ret64 _strtoi64_l(str ptr long ptr) MSVCRT_strtoi64_l
@ stub _strtoimax_l
...
...
@@ -2516,7 +2516,7 @@
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strstr(str str) MSVCRT_strstr
@ cdecl strtod(str ptr) MSVCRT_strtod
@
stub
strtof
@
cdecl strtof(str ptr) MSVCRT_
strtof
@ stub strtoimax
@ cdecl strtok(str str) MSVCRT_strtok
@ cdecl strtok_s(ptr str ptr) MSVCRT_strtok_s
...
...
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