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
4d16fe39
Commit
4d16fe39
authored
Mar 02, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed useless #ifdef SIZEOF_LONG_LONG.
parent
19924767
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
22 deletions
+3
-22
dos_fs.c
files/dos_fs.c
+3
-22
No files found.
files/dos_fs.c
View file @
4d16fe39
...
...
@@ -1535,8 +1535,7 @@ INT WINAPI MulDiv(
INT
nMultiplier
,
INT
nDivisor
)
{
#if SIZEOF_LONG_LONG >= 8
long
long
ret
;
LONGLONG
ret
;
if
(
!
nDivisor
)
return
-
1
;
...
...
@@ -1550,30 +1549,12 @@ INT WINAPI MulDiv(
/* If the result is positive, we "add" to round. else, we subtract to round. */
if
(
(
(
nMultiplicand
<
0
)
&&
(
nMultiplier
<
0
)
)
||
(
(
nMultiplicand
>=
0
)
&&
(
nMultiplier
>=
0
)
)
)
ret
=
(((
long
long
)
nMultiplicand
*
nMultiplier
)
+
(
nDivisor
/
2
))
/
nDivisor
;
ret
=
(((
LONGLONG
)
nMultiplicand
*
nMultiplier
)
+
(
nDivisor
/
2
))
/
nDivisor
;
else
ret
=
(((
long
long
)
nMultiplicand
*
nMultiplier
)
-
(
nDivisor
/
2
))
/
nDivisor
;
ret
=
(((
LONGLONG
)
nMultiplicand
*
nMultiplier
)
-
(
nDivisor
/
2
))
/
nDivisor
;
if
((
ret
>
2147483647
)
||
(
ret
<
-
2147483647
))
return
-
1
;
return
ret
;
#else
if
(
!
nDivisor
)
return
-
1
;
/* We want to deal with a positive divisor to simplify the logic. */
if
(
nDivisor
<
0
)
{
nMultiplicand
=
-
nMultiplicand
;
nDivisor
=
-
nDivisor
;
}
/* If the result is positive, we "add" to round. else, we subtract to round. */
if
(
(
(
nMultiplicand
<
0
)
&&
(
nMultiplier
<
0
)
)
||
(
(
nMultiplicand
>=
0
)
&&
(
nMultiplier
>=
0
)
)
)
return
((
nMultiplicand
*
nMultiplier
)
+
(
nDivisor
/
2
))
/
nDivisor
;
return
((
nMultiplicand
*
nMultiplier
)
-
(
nDivisor
/
2
))
/
nDivisor
;
#endif
}
...
...
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