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
480e25a5
Commit
480e25a5
authored
Dec 01, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use fpclass constants from public header.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
09d018c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
29 deletions
+17
-29
math.c
dlls/msvcrt/math.c
+17
-17
msvcrt.h
dlls/msvcrt/msvcrt.h
+0
-12
No files found.
dlls/msvcrt/math.c
View file @
480e25a5
...
...
@@ -218,13 +218,13 @@ int CDECL MSVCRT__fpclassf( float num )
switch
(
e
)
{
case
0
:
if
(
u
.
i
<<
1
)
return
s
?
MSVCRT__FPCLASS_ND
:
MSVCRT_
_FPCLASS_PD
;
return
s
?
MSVCRT__FPCLASS_NZ
:
MSVCRT_
_FPCLASS_PZ
;
if
(
u
.
i
<<
1
)
return
s
?
_FPCLASS_ND
:
_FPCLASS_PD
;
return
s
?
_FPCLASS_NZ
:
_FPCLASS_PZ
;
case
0xff
:
if
(
u
.
i
<<
9
)
return
((
u
.
i
>>
22
)
&
1
)
?
MSVCRT__FPCLASS_QNAN
:
MSVCRT_
_FPCLASS_SNAN
;
return
s
?
MSVCRT__FPCLASS_NINF
:
MSVCRT_
_FPCLASS_PINF
;
if
(
u
.
i
<<
9
)
return
((
u
.
i
>>
22
)
&
1
)
?
_FPCLASS_QNAN
:
_FPCLASS_SNAN
;
return
s
?
_FPCLASS_NINF
:
_FPCLASS_PINF
;
default:
return
s
?
MSVCRT__FPCLASS_NN
:
MSVCRT_
_FPCLASS_PN
;
return
s
?
_FPCLASS_NN
:
_FPCLASS_PN
;
}
}
...
...
@@ -1419,13 +1419,13 @@ int CDECL MSVCRT__fpclass(double num)
switch
(
e
)
{
case
0
:
if
(
u
.
i
<<
1
)
return
s
?
MSVCRT__FPCLASS_ND
:
MSVCRT_
_FPCLASS_PD
;
return
s
?
MSVCRT__FPCLASS_NZ
:
MSVCRT_
_FPCLASS_PZ
;
if
(
u
.
i
<<
1
)
return
s
?
_FPCLASS_ND
:
_FPCLASS_PD
;
return
s
?
_FPCLASS_NZ
:
_FPCLASS_PZ
;
case
0x7ff
:
if
(
u
.
i
<<
12
)
return
((
u
.
i
>>
51
)
&
1
)
?
MSVCRT__FPCLASS_QNAN
:
MSVCRT_
_FPCLASS_SNAN
;
return
s
?
MSVCRT__FPCLASS_NINF
:
MSVCRT_
_FPCLASS_PINF
;
if
(
u
.
i
<<
12
)
return
((
u
.
i
>>
51
)
&
1
)
?
_FPCLASS_QNAN
:
_FPCLASS_SNAN
;
return
s
?
_FPCLASS_NINF
:
_FPCLASS_PINF
;
default
:
return
s
?
MSVCRT__FPCLASS_NN
:
MSVCRT_
_FPCLASS_PN
;
return
s
?
_FPCLASS_NN
:
_FPCLASS_PN
;
}
}
...
...
@@ -2285,7 +2285,7 @@ double CDECL MSVCRT__y0(double num)
if
(
!
isfinite
(
num
))
*
_errno
()
=
EDOM
;
retval
=
unix_funcs
->
y0
(
num
);
if
(
MSVCRT__fpclass
(
retval
)
==
MSVCRT_
_FPCLASS_NINF
)
if
(
MSVCRT__fpclass
(
retval
)
==
_FPCLASS_NINF
)
{
*
_errno
()
=
EDOM
;
retval
=
NAN
;
...
...
@@ -2302,7 +2302,7 @@ double CDECL MSVCRT__y1(double num)
if
(
!
isfinite
(
num
))
*
_errno
()
=
EDOM
;
retval
=
unix_funcs
->
y1
(
num
);
if
(
MSVCRT__fpclass
(
retval
)
==
MSVCRT_
_FPCLASS_NINF
)
if
(
MSVCRT__fpclass
(
retval
)
==
_FPCLASS_NINF
)
{
*
_errno
()
=
EDOM
;
retval
=
NAN
;
...
...
@@ -2319,7 +2319,7 @@ double CDECL MSVCRT__yn(int order, double num)
if
(
!
isfinite
(
num
))
*
_errno
()
=
EDOM
;
retval
=
unix_funcs
->
yn
(
order
,
num
);
if
(
MSVCRT__fpclass
(
retval
)
==
MSVCRT_
_FPCLASS_NINF
)
if
(
MSVCRT__fpclass
(
retval
)
==
_FPCLASS_NINF
)
{
*
_errno
()
=
EDOM
;
retval
=
NAN
;
...
...
@@ -2351,8 +2351,8 @@ float CDECL MSVCRT_nearbyintf(float num)
double
CDECL
MSVCRT_nexttoward
(
double
num
,
double
next
)
{
double
ret
=
unix_funcs
->
nexttoward
(
num
,
next
);
if
(
!
(
MSVCRT__fpclass
(
ret
)
&
(
MSVCRT__FPCLASS_PN
|
MSVCRT_
_FPCLASS_NN
|
MSVCRT__FPCLASS_SNAN
|
MSVCRT_
_FPCLASS_QNAN
))
&&
!
isinf
(
num
))
if
(
!
(
MSVCRT__fpclass
(
ret
)
&
(
_FPCLASS_PN
|
_FPCLASS_NN
|
_FPCLASS_SNAN
|
_FPCLASS_QNAN
))
&&
!
isinf
(
num
))
{
*
_errno
()
=
ERANGE
;
}
...
...
@@ -2365,8 +2365,8 @@ double CDECL MSVCRT_nexttoward(double num, double next)
float
CDECL
MSVCRT_nexttowardf
(
float
num
,
double
next
)
{
float
ret
=
unix_funcs
->
nexttowardf
(
num
,
next
);
if
(
!
(
MSVCRT__fpclass
(
ret
)
&
(
MSVCRT__FPCLASS_PN
|
MSVCRT_
_FPCLASS_NN
|
MSVCRT__FPCLASS_SNAN
|
MSVCRT_
_FPCLASS_QNAN
))
&&
!
isinf
(
num
))
if
(
!
(
MSVCRT__fpclass
(
ret
)
&
(
_FPCLASS_PN
|
_FPCLASS_NN
|
_FPCLASS_SNAN
|
_FPCLASS_QNAN
))
&&
!
isinf
(
num
))
{
*
_errno
()
=
ERANGE
;
}
...
...
dlls/msvcrt/msvcrt.h
View file @
480e25a5
...
...
@@ -626,18 +626,6 @@ struct MSVCRT__stat64 {
#define MSVCRT__O_U16TEXT 0x20000
#define MSVCRT__O_U8TEXT 0x40000
/* fpclass constants */
#define MSVCRT__FPCLASS_SNAN 0x0001
/* Signaling "Not a Number" */
#define MSVCRT__FPCLASS_QNAN 0x0002
/* Quiet "Not a Number" */
#define MSVCRT__FPCLASS_NINF 0x0004
/* Negative Infinity */
#define MSVCRT__FPCLASS_NN 0x0008
/* Negative Normal */
#define MSVCRT__FPCLASS_ND 0x0010
/* Negative Denormal */
#define MSVCRT__FPCLASS_NZ 0x0020
/* Negative Zero */
#define MSVCRT__FPCLASS_PZ 0x0040
/* Positive Zero */
#define MSVCRT__FPCLASS_PD 0x0080
/* Positive Denormal */
#define MSVCRT__FPCLASS_PN 0x0100
/* Positive Normal */
#define MSVCRT__FPCLASS_PINF 0x0200
/* Positive Infinity */
/* fpclassify constants */
#define MSVCRT_FP_INFINITE 1
#define MSVCRT_FP_NAN 2
...
...
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