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
dc85dc0a
Commit
dc85dc0a
authored
Dec 16, 2002
by
Andreas Mohr
Committed by
Alexandre Julliard
Dec 16, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented VarOr().
parent
66aa7e03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
10 deletions
+92
-10
oleaut32.spec
dlls/oleaut32/oleaut32.spec
+1
-1
variant.c
dlls/oleaut32/variant.c
+91
-9
No files found.
dlls/oleaut32/oleaut32.spec
View file @
dc85dc0a
...
...
@@ -152,7 +152,7 @@
154 stub VarImp # stdcall (ptr ptr ptr)
155 stub VarMod # stdcall (ptr ptr ptr)
156 stub VarMul # stdcall (ptr ptr ptr)
157 st
ub VarOr # stdcall (ptr ptr ptr)
157 st
dcall VarOr(ptr ptr ptr) VarOr
158 stub VarPow # stdcall (ptr ptr ptr)
159 stub VarSub # stdcall (ptr ptr ptr)
160 stdcall CreateTypeLib(long wstr ptr) CreateTypeLib
...
...
dlls/oleaut32/variant.c
View file @
dc85dc0a
...
...
@@ -5155,13 +5155,13 @@ HRESULT WINAPI VarAnd(LPVARIANT left, LPVARIANT right, LPVARIANT result)
/**********************************************************************
* VarAdd [OLEAUT32.141]
* FIXME: From MSDN: If ... Then
* Both expressions are of the string type Concatenated.
* One expression is a string type and the other a character Addition.
* One expression is numeric and the other is a string Addition.
* Both expressions are numeric Addition.
* Either expression is NULL NULL is returned.
* Both expressions are empty Integer subtype is returned.
* FIXME: From MSDN: If ... Then
* Both expressions are of the string type Concatenated.
* One expression is a string type and the other a character Addition.
* One expression is numeric and the other is a string Addition.
* Both expressions are numeric Addition.
* Either expression is NULL NULL is returned.
* Both expressions are empty Integer subtype is returned.
*
*/
HRESULT
WINAPI
VarAdd
(
LPVARIANT
left
,
LPVARIANT
right
,
LPVARIANT
result
)
...
...
@@ -5186,7 +5186,7 @@ HRESULT WINAPI VarAdd(LPVARIANT left, LPVARIANT right, LPVARIANT result)
LONGLONG
lVal
=
-
1
;
LONGLONG
rVal
=
-
1
;
LONGLONG
res
=
-
1
;
int
resT
=
0
;
/* Testing has shown I2 + I2 == I2, all else
int
resT
=
0
;
/* Testing has shown I2 + I2 == I2, all else
becomes I4 */
lOk
=
TRUE
;
...
...
@@ -5228,7 +5228,89 @@ HRESULT WINAPI VarAdd(LPVARIANT left, LPVARIANT right, LPVARIANT result)
rc
=
S_OK
;
}
else
{
FIXME
(
"VarAdd stub
\n
"
);
FIXME
(
"unimplemented part
\n
"
);
}
}
TRACE
(
"rc=%d, Result:
\n
"
,
(
int
)
rc
);
dump_Variant
(
result
);
return
rc
;
}
/**********************************************************************
* VarOr [OLEAUT32.157]
*
*/
HRESULT
WINAPI
VarOr
(
LPVARIANT
left
,
LPVARIANT
right
,
LPVARIANT
result
)
{
HRESULT
rc
=
E_FAIL
;
TRACE
(
"Left Var:
\n
"
);
dump_Variant
(
left
);
TRACE
(
"Right Var:
\n
"
);
dump_Variant
(
right
);
if
((
V_VT
(
left
)
&
VT_TYPEMASK
)
==
VT_BOOL
&&
(
V_VT
(
right
)
&
VT_TYPEMASK
)
==
VT_BOOL
)
{
V_VT
(
result
)
=
VT_BOOL
;
if
(
V_BOOL
(
left
)
||
V_BOOL
(
right
))
{
V_BOOL
(
result
)
=
VARIANT_TRUE
;
}
else
{
V_BOOL
(
result
)
=
VARIANT_FALSE
;
}
rc
=
S_OK
;
}
else
{
/* Integers */
BOOL
lOk
=
TRUE
;
BOOL
rOk
=
TRUE
;
LONGLONG
lVal
=
-
1
;
LONGLONG
rVal
=
-
1
;
LONGLONG
res
=
-
1
;
int
resT
=
0
;
/* Testing has shown I2 & I2 == I2, all else
becomes I4, even unsigned ints (incl. UI2) */
lOk
=
TRUE
;
switch
(
V_VT
(
left
)
&
VT_TYPEMASK
)
{
case
VT_I1
:
lVal
=
V_UNION
(
left
,
cVal
);
resT
=
VT_I4
;
break
;
case
VT_I2
:
lVal
=
V_UNION
(
left
,
iVal
);
resT
=
VT_I2
;
break
;
case
VT_I4
:
lVal
=
V_UNION
(
left
,
lVal
);
resT
=
VT_I4
;
break
;
case
VT_INT
:
lVal
=
V_UNION
(
left
,
lVal
);
resT
=
VT_I4
;
break
;
case
VT_UI1
:
lVal
=
V_UNION
(
left
,
bVal
);
resT
=
VT_I4
;
break
;
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
;
default:
lOk
=
FALSE
;
}
rOk
=
TRUE
;
switch
(
V_VT
(
right
)
&
VT_TYPEMASK
)
{
case
VT_I1
:
rVal
=
V_UNION
(
right
,
cVal
);
resT
=
VT_I4
;
break
;
case
VT_I2
:
rVal
=
V_UNION
(
right
,
iVal
);
resT
=
max
(
VT_I2
,
resT
);
break
;
case
VT_I4
:
rVal
=
V_UNION
(
right
,
lVal
);
resT
=
VT_I4
;
break
;
case
VT_INT
:
rVal
=
V_UNION
(
right
,
lVal
);
resT
=
VT_I4
;
break
;
case
VT_UI1
:
rVal
=
V_UNION
(
right
,
bVal
);
resT
=
VT_I4
;
break
;
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
;
default:
rOk
=
FALSE
;
}
if
(
lOk
&&
rOk
)
{
res
=
(
lVal
|
rVal
);
V_VT
(
result
)
=
resT
;
switch
(
resT
)
{
case
VT_I2
:
V_UNION
(
result
,
iVal
)
=
res
;
break
;
case
VT_I4
:
V_UNION
(
result
,
lVal
)
=
res
;
break
;
default:
FIXME
(
"Unexpected result variant type %x
\n
"
,
resT
);
V_UNION
(
result
,
lVal
)
=
res
;
}
rc
=
S_OK
;
}
else
{
FIXME
(
"unimplemented part
\n
"
);
}
}
...
...
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