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
1ae17975
Commit
1ae17975
authored
Jun 24, 2003
by
Marcus Meissner
Committed by
Alexandre Julliard
Jun 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VarAdd: Added VT_R8, VT_EMPTY, VT_NULL handling.
parent
453b3243
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
1 deletion
+62
-1
variant.c
dlls/oleaut32/variant.c
+62
-1
No files found.
dlls/oleaut32/variant.c
View file @
1ae17975
...
...
@@ -5406,6 +5406,65 @@ HRESULT WINAPI VarAdd(LPVARIANT left, LPVARIANT right, LPVARIANT result)
TRACE
(
"Right Var:
\n
"
);
dump_Variant
(
right
);
if
((
V_VT
(
left
)
&
VT_TYPEMASK
)
==
VT_EMPTY
)
return
VariantCopy
(
result
,
right
);
if
((
V_VT
(
right
)
&
VT_TYPEMASK
)
==
VT_EMPTY
)
return
VariantCopy
(
result
,
left
);
if
(((
V_VT
(
left
)
&
VT_TYPEMASK
)
==
VT_R8
)
||
((
V_VT
(
right
)
&
VT_TYPEMASK
)
==
VT_R8
))
{
BOOL
lOk
=
TRUE
;
BOOL
rOk
=
TRUE
;
double
lVal
=
-
1
;
double
rVal
=
-
1
;
double
res
=
-
1
;
lOk
=
TRUE
;
switch
(
V_VT
(
left
)
&
VT_TYPEMASK
)
{
case
VT_I1
:
lVal
=
V_UNION
(
left
,
cVal
);
break
;
case
VT_I2
:
lVal
=
V_UNION
(
left
,
iVal
);
break
;
case
VT_I4
:
lVal
=
V_UNION
(
left
,
lVal
);
break
;
case
VT_INT
:
lVal
=
V_UNION
(
left
,
lVal
);
break
;
case
VT_UI1
:
lVal
=
V_UNION
(
left
,
bVal
);
break
;
case
VT_UI2
:
lVal
=
V_UNION
(
left
,
uiVal
);
break
;
case
VT_UI4
:
lVal
=
V_UNION
(
left
,
ulVal
);
break
;
case
VT_UINT
:
lVal
=
V_UNION
(
left
,
ulVal
);
break
;
case
VT_R4
:
lVal
=
V_UNION
(
left
,
fltVal
);
break
;
case
VT_R8
:
lVal
=
V_UNION
(
left
,
dblVal
);
break
;
case
VT_NULL
:
lVal
=
0
.
0
;
break
;
default:
lOk
=
FALSE
;
}
rOk
=
TRUE
;
switch
(
V_VT
(
right
)
&
VT_TYPEMASK
)
{
case
VT_I1
:
rVal
=
V_UNION
(
right
,
cVal
);
break
;
case
VT_I2
:
rVal
=
V_UNION
(
right
,
iVal
);
break
;
case
VT_I4
:
rVal
=
V_UNION
(
right
,
lVal
);
break
;
case
VT_INT
:
rVal
=
V_UNION
(
right
,
lVal
);
break
;
case
VT_UI1
:
rVal
=
V_UNION
(
right
,
bVal
);
break
;
case
VT_UI2
:
rVal
=
V_UNION
(
right
,
uiVal
);
break
;
case
VT_UI4
:
rVal
=
V_UNION
(
right
,
ulVal
);
break
;
case
VT_UINT
:
rVal
=
V_UNION
(
right
,
ulVal
);
break
;
case
VT_R4
:
rVal
=
V_UNION
(
right
,
fltVal
);
break
;
case
VT_R8
:
rVal
=
V_UNION
(
right
,
dblVal
);
break
;
case
VT_NULL
:
rVal
=
0
.
0
;
break
;
default:
rOk
=
FALSE
;
}
if
(
lOk
&&
rOk
)
{
res
=
(
lVal
+
rVal
);
V_VT
(
result
)
=
VT_R8
;
V_UNION
(
result
,
dblVal
)
=
res
;
rc
=
S_OK
;
}
else
{
FIXME
(
"Unhandled type pair %d / %d in double addition.
\n
"
,
(
V_VT
(
left
)
&
VT_TYPEMASK
),
(
V_VT
(
right
)
&
VT_TYPEMASK
)
);
}
return
rc
;
}
/* Handle strings as concat */
if
((
V_VT
(
left
)
&
VT_TYPEMASK
)
==
VT_BSTR
&&
(
V_VT
(
right
)
&
VT_TYPEMASK
)
==
VT_BSTR
)
{
...
...
@@ -5432,6 +5491,7 @@ HRESULT WINAPI VarAdd(LPVARIANT left, LPVARIANT right, LPVARIANT result)
case
VT_UI2
:
lVal
=
V_UNION
(
left
,
uiVal
);
resT
=
VT_I4
;
break
;
case
VT_UI4
:
lVal
=
V_UNION
(
left
,
ulVal
);
resT
=
VT_I4
;
break
;
case
VT_UINT
:
lVal
=
V_UNION
(
left
,
ulVal
);
resT
=
VT_I4
;
break
;
case
VT_NULL
:
lVal
=
0
;
resT
=
VT_I4
;
break
;
default:
lOk
=
FALSE
;
}
...
...
@@ -5445,6 +5505,7 @@ HRESULT WINAPI VarAdd(LPVARIANT left, LPVARIANT right, LPVARIANT result)
case
VT_UI2
:
rVal
=
V_UNION
(
right
,
uiVal
);
resT
=
VT_I4
;
break
;
case
VT_UI4
:
rVal
=
V_UNION
(
right
,
ulVal
);
resT
=
VT_I4
;
break
;
case
VT_UINT
:
rVal
=
V_UNION
(
right
,
ulVal
);
resT
=
VT_I4
;
break
;
case
VT_NULL
:
rVal
=
0
;
resT
=
VT_I4
;
break
;
default:
rOk
=
FALSE
;
}
...
...
@@ -5461,7 +5522,7 @@ HRESULT WINAPI VarAdd(LPVARIANT left, LPVARIANT right, LPVARIANT result)
rc
=
S_OK
;
}
else
{
FIXME
(
"unimplemented part
\n
"
);
FIXME
(
"unimplemented part
(0x%x + 0x%x)
\n
"
,
V_VT
(
left
),
V_VT
(
right
)
);
}
}
...
...
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