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
2a1114f8
Commit
2a1114f8
authored
Oct 08, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Avoid floating point for some VarCy conversions.
parent
4c184a8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
vartype.c
dlls/oleaut32/vartype.c
+17
-8
No files found.
dlls/oleaut32/vartype.c
View file @
2a1114f8
...
@@ -3420,7 +3420,8 @@ static const int CY_Divisors[5] = { CY_MULTIPLIER/10000, CY_MULTIPLIER/1000,
...
@@ -3420,7 +3420,8 @@ static const int CY_Divisors[5] = { CY_MULTIPLIER/10000, CY_MULTIPLIER/1000,
*/
*/
HRESULT
WINAPI
VarCyFromUI1
(
BYTE
bIn
,
CY
*
pCyOut
)
HRESULT
WINAPI
VarCyFromUI1
(
BYTE
bIn
,
CY
*
pCyOut
)
{
{
return
VarCyFromR8
(
bIn
,
pCyOut
);
pCyOut
->
int64
=
(
ULONG64
)
bIn
*
CY_MULTIPLIER
;
return
S_OK
;
}
}
/************************************************************************
/************************************************************************
...
@@ -3440,7 +3441,8 @@ HRESULT WINAPI VarCyFromUI1(BYTE bIn, CY* pCyOut)
...
@@ -3440,7 +3441,8 @@ HRESULT WINAPI VarCyFromUI1(BYTE bIn, CY* pCyOut)
*/
*/
HRESULT
WINAPI
VarCyFromI2
(
SHORT
sIn
,
CY
*
pCyOut
)
HRESULT
WINAPI
VarCyFromI2
(
SHORT
sIn
,
CY
*
pCyOut
)
{
{
return
VarCyFromR8
(
sIn
,
pCyOut
);
pCyOut
->
int64
=
(
LONG64
)
sIn
*
CY_MULTIPLIER
;
return
S_OK
;
}
}
/************************************************************************
/************************************************************************
...
@@ -3460,7 +3462,8 @@ HRESULT WINAPI VarCyFromI2(SHORT sIn, CY* pCyOut)
...
@@ -3460,7 +3462,8 @@ HRESULT WINAPI VarCyFromI2(SHORT sIn, CY* pCyOut)
*/
*/
HRESULT
WINAPI
VarCyFromI4
(
LONG
lIn
,
CY
*
pCyOut
)
HRESULT
WINAPI
VarCyFromI4
(
LONG
lIn
,
CY
*
pCyOut
)
{
{
return
VarCyFromR8
(
lIn
,
pCyOut
);
pCyOut
->
int64
=
(
LONG64
)
lIn
*
CY_MULTIPLIER
;
return
S_OK
;
}
}
/************************************************************************
/************************************************************************
...
@@ -3617,7 +3620,8 @@ HRESULT WINAPI VarCyFromDisp(IDispatch* pdispIn, LCID lcid, CY* pCyOut)
...
@@ -3617,7 +3620,8 @@ HRESULT WINAPI VarCyFromDisp(IDispatch* pdispIn, LCID lcid, CY* pCyOut)
*/
*/
HRESULT
WINAPI
VarCyFromBool
(
VARIANT_BOOL
boolIn
,
CY
*
pCyOut
)
HRESULT
WINAPI
VarCyFromBool
(
VARIANT_BOOL
boolIn
,
CY
*
pCyOut
)
{
{
return
VarCyFromR8
(
boolIn
,
pCyOut
);
pCyOut
->
int64
=
(
LONG64
)
boolIn
*
CY_MULTIPLIER
;
return
S_OK
;
}
}
/************************************************************************
/************************************************************************
...
@@ -3637,7 +3641,8 @@ HRESULT WINAPI VarCyFromBool(VARIANT_BOOL boolIn, CY* pCyOut)
...
@@ -3637,7 +3641,8 @@ HRESULT WINAPI VarCyFromBool(VARIANT_BOOL boolIn, CY* pCyOut)
*/
*/
HRESULT
WINAPI
VarCyFromI1
(
signed
char
cIn
,
CY
*
pCyOut
)
HRESULT
WINAPI
VarCyFromI1
(
signed
char
cIn
,
CY
*
pCyOut
)
{
{
return
VarCyFromR8
(
cIn
,
pCyOut
);
pCyOut
->
int64
=
(
LONG64
)
cIn
*
CY_MULTIPLIER
;
return
S_OK
;
}
}
/************************************************************************
/************************************************************************
...
@@ -3657,7 +3662,8 @@ HRESULT WINAPI VarCyFromI1(signed char cIn, CY* pCyOut)
...
@@ -3657,7 +3662,8 @@ HRESULT WINAPI VarCyFromI1(signed char cIn, CY* pCyOut)
*/
*/
HRESULT
WINAPI
VarCyFromUI2
(
USHORT
usIn
,
CY
*
pCyOut
)
HRESULT
WINAPI
VarCyFromUI2
(
USHORT
usIn
,
CY
*
pCyOut
)
{
{
return
VarCyFromR8
(
usIn
,
pCyOut
);
pCyOut
->
int64
=
(
ULONG64
)
usIn
*
CY_MULTIPLIER
;
return
S_OK
;
}
}
/************************************************************************
/************************************************************************
...
@@ -3677,7 +3683,8 @@ HRESULT WINAPI VarCyFromUI2(USHORT usIn, CY* pCyOut)
...
@@ -3677,7 +3683,8 @@ HRESULT WINAPI VarCyFromUI2(USHORT usIn, CY* pCyOut)
*/
*/
HRESULT
WINAPI
VarCyFromUI4
(
ULONG
ulIn
,
CY
*
pCyOut
)
HRESULT
WINAPI
VarCyFromUI4
(
ULONG
ulIn
,
CY
*
pCyOut
)
{
{
return
VarCyFromR8
(
ulIn
,
pCyOut
);
pCyOut
->
int64
=
(
ULONG64
)
ulIn
*
CY_MULTIPLIER
;
return
S_OK
;
}
}
/************************************************************************
/************************************************************************
...
@@ -3757,7 +3764,9 @@ HRESULT WINAPI VarCyFromI8(LONG64 llIn, CY* pCyOut)
...
@@ -3757,7 +3764,9 @@ HRESULT WINAPI VarCyFromI8(LONG64 llIn, CY* pCyOut)
*/
*/
HRESULT
WINAPI
VarCyFromUI8
(
ULONG64
ullIn
,
CY
*
pCyOut
)
HRESULT
WINAPI
VarCyFromUI8
(
ULONG64
ullIn
,
CY
*
pCyOut
)
{
{
return
VarCyFromR8
(
ullIn
,
pCyOut
);
if
(
ullIn
>=
(
I8_MAX
/
CY_MULTIPLIER
))
return
DISP_E_OVERFLOW
;
pCyOut
->
int64
=
ullIn
*
CY_MULTIPLIER
;
return
S_OK
;
}
}
/************************************************************************
/************************************************************************
...
...
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