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
811647df
Commit
811647df
authored
Nov 30, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use _CRT_FLOAT and _CRT_DBL from public header.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eb6f79f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
27 deletions
+12
-27
msvcrt.h
dlls/msvcrt/msvcrt.h
+0
-15
string.c
dlls/msvcrt/string.c
+12
-12
No files found.
dlls/msvcrt/msvcrt.h
View file @
811647df
...
...
@@ -984,21 +984,6 @@ int create_positional_ctx_w(void*, const wchar_t*, __ms_va_list) DECLSPEC_HIDDEN
printf_arg
arg_clbk_valist
(
void
*
,
int
,
int
,
__ms_va_list
*
)
DECLSPEC_HIDDEN
;
printf_arg
arg_clbk_positional
(
void
*
,
int
,
int
,
__ms_va_list
*
)
DECLSPEC_HIDDEN
;
#define MSVCRT_FLT_MIN 1.175494351e-38F
#define MSVCRT_DBL_MIN 2.2250738585072014e-308
#define MSVCRT__OVERFLOW 3
#define MSVCRT__UNDERFLOW 4
typedef
struct
{
float
f
;
}
MSVCRT__CRT_FLOAT
;
typedef
struct
{
double
x
;
}
MSVCRT__CRT_DOUBLE
;
extern
char
*
__cdecl
__unDName
(
char
*
,
const
char
*
,
int
,
malloc_func_t
,
free_func_t
,
unsigned
short
int
);
/* __unDName/__unDNameEx flags */
...
...
dlls/msvcrt/string.c
View file @
811647df
...
...
@@ -1092,7 +1092,7 @@ double CDECL MSVCRT__atof_l( const char *str, _locale_t locale)
/*********************************************************************
* _atoflt_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__atoflt_l
(
MSVCRT_
_CRT_FLOAT
*
value
,
char
*
str
,
_locale_t
locale
)
int
CDECL
MSVCRT__atoflt_l
(
_CRT_FLOAT
*
value
,
char
*
str
,
_locale_t
locale
)
{
double
d
;
int
err
;
...
...
@@ -1100,16 +1100,16 @@ int CDECL MSVCRT__atoflt_l( MSVCRT__CRT_FLOAT *value, char *str, _locale_t local
d
=
strtod_helper
(
str
,
NULL
,
locale
,
&
err
);
value
->
f
=
d
;
if
(
isinf
(
value
->
f
))
return
MSVCRT_
_OVERFLOW
;
if
((
d
!=
0
||
err
)
&&
value
->
f
>-
MSVCRT_FLT_MIN
&&
value
->
f
<
MSVCRT_
FLT_MIN
)
return
MSVCRT_
_UNDERFLOW
;
return
_OVERFLOW
;
if
((
d
!=
0
||
err
)
&&
value
->
f
>-
FLT_MIN
&&
value
->
f
<
FLT_MIN
)
return
_UNDERFLOW
;
return
0
;
}
/*********************************************************************
* _atoflt (MSVCR100.@)
*/
int
CDECL
MSVCRT__atoflt
(
MSVCRT_
_CRT_FLOAT
*
value
,
char
*
str
)
int
CDECL
MSVCRT__atoflt
(
_CRT_FLOAT
*
value
,
char
*
str
)
{
return
MSVCRT__atoflt_l
(
value
,
str
,
NULL
);
}
...
...
@@ -1117,22 +1117,22 @@ int CDECL MSVCRT__atoflt(MSVCRT__CRT_FLOAT *value, char *str)
/*********************************************************************
* _atodbl_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__atodbl_l
(
MSVCRT_
_CRT_DOUBLE
*
value
,
char
*
str
,
_locale_t
locale
)
int
CDECL
MSVCRT__atodbl_l
(
_CRT_DOUBLE
*
value
,
char
*
str
,
_locale_t
locale
)
{
int
err
;
value
->
x
=
strtod_helper
(
str
,
NULL
,
locale
,
&
err
);
if
(
isinf
(
value
->
x
))
return
MSVCRT_
_OVERFLOW
;
if
((
value
->
x
!=
0
||
err
)
&&
value
->
x
>-
MSVCRT_DBL_MIN
&&
value
->
x
<
MSVCRT_
DBL_MIN
)
return
MSVCRT_
_UNDERFLOW
;
return
_OVERFLOW
;
if
((
value
->
x
!=
0
||
err
)
&&
value
->
x
>-
DBL_MIN
&&
value
->
x
<
DBL_MIN
)
return
_UNDERFLOW
;
return
0
;
}
/*********************************************************************
* _atodbl (MSVCRT.@)
*/
int
CDECL
MSVCRT__atodbl
(
MSVCRT_
_CRT_DOUBLE
*
value
,
char
*
str
)
int
CDECL
MSVCRT__atodbl
(
_CRT_DOUBLE
*
value
,
char
*
str
)
{
return
MSVCRT__atodbl_l
(
value
,
str
,
NULL
);
}
...
...
@@ -1482,8 +1482,8 @@ int CDECL MSVCRT__atoldbl_l( MSVCRT__LDOUBLE *value, const char *str, _locale_t
char
*
endptr
;
switch
(
__STRINGTOLD_L
(
value
,
&
endptr
,
str
,
0
,
locale
))
{
case
1
:
return
MSVCRT_
_UNDERFLOW
;
case
2
:
return
MSVCRT_
_OVERFLOW
;
case
1
:
return
_UNDERFLOW
;
case
2
:
return
_OVERFLOW
;
default:
return
0
;
}
}
...
...
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