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
dc1d7868
Commit
dc1d7868
authored
Jun 26, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Jun 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Add support for boolean strings in VarNot.
parent
9173de87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
vartest.c
dlls/oleaut32/tests/vartest.c
+4
-0
variant.c
dlls/oleaut32/variant.c
+13
-6
No files found.
dlls/oleaut32/tests/vartest.c
View file @
dc1d7868
...
...
@@ -2007,6 +2007,8 @@ static void test_VarNot(void)
{
static
const
WCHAR
szNum0
[]
=
{
'0'
,
'\0'
};
static
const
WCHAR
szNum1
[]
=
{
'1'
,
'\0'
};
static
const
WCHAR
szFalse
[]
=
{
'#'
,
'F'
,
'A'
,
'L'
,
'S'
,
'E'
,
'#'
,
'\0'
};
static
const
WCHAR
szTrue
[]
=
{
'#'
,
'T'
,
'R'
,
'U'
,
'E'
,
'#'
,
'\0'
};
HRESULT
hres
;
VARIANT
v
,
exp
,
vDst
;
DECIMAL
*
pdec
=
&
V_DECIMAL
(
&
v
);
...
...
@@ -2102,6 +2104,8 @@ static void test_VarNot(void)
ok
(
V_VT
(
&
v
)
==
VT_BSTR
&&
V_BSTR
(
&
v
)
==
szNum0
,
"VarNot(0): changed input
\n
"
);
VARNOT
(
BSTR
,(
BSTR
)
szNum1
,
I4
,
-
2
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
&&
V_BSTR
(
&
v
)
==
szNum1
,
"VarNot(1): changed input
\n
"
);
VARNOT
(
BSTR
,
(
BSTR
)
szTrue
,
BOOL
,
VARIANT_FALSE
);
VARNOT
(
BSTR
,
(
BSTR
)
szFalse
,
BOOL
,
VARIANT_TRUE
);
V_VT
(
&
v
)
=
VT_DECIMAL
;
S
(
U
(
*
pdec
)).
sign
=
DECIMAL_NEG
;
...
...
dlls/oleaut32/variant.c
View file @
dc1d7868
...
...
@@ -5026,6 +5026,19 @@ HRESULT WINAPI VarNot(LPVARIANT pVarIn, LPVARIANT pVarOut)
pVarIn
=
&
temp
;
}
if
(
V_VT
(
pVarIn
)
==
VT_BSTR
)
{
V_VT
(
&
varIn
)
=
VT_R8
;
hRet
=
VarR8FromStr
(
V_BSTR
(
pVarIn
),
LOCALE_USER_DEFAULT
,
0
,
&
V_R8
(
&
varIn
)
);
if
(
FAILED
(
hRet
))
{
V_VT
(
&
varIn
)
=
VT_BOOL
;
hRet
=
VarBoolFromStr
(
V_BSTR
(
pVarIn
),
LOCALE_USER_DEFAULT
,
VAR_LOCALBOOL
,
&
V_BOOL
(
&
varIn
)
);
}
if
(
FAILED
(
hRet
))
goto
VarNot_Exit
;
pVarIn
=
&
varIn
;
}
V_VT
(
pVarOut
)
=
V_VT
(
pVarIn
);
switch
(
V_VT
(
pVarIn
))
...
...
@@ -5066,12 +5079,6 @@ HRESULT WINAPI VarNot(LPVARIANT pVarIn, LPVARIANT pVarOut)
V_I4
(
pVarOut
)
=
~
V_I4
(
pVarOut
);
V_VT
(
pVarOut
)
=
VT_I4
;
break
;
case
VT_BSTR
:
hRet
=
VarR8FromStr
(
V_BSTR
(
pVarIn
),
LOCALE_USER_DEFAULT
,
0
,
&
V_R8
(
&
varIn
));
if
(
FAILED
(
hRet
))
break
;
pVarIn
=
&
varIn
;
/* Fall through ... */
case
VT_DATE
:
case
VT_R8
:
hRet
=
VarI4FromR8
(
V_R8
(
pVarIn
),
&
V_I4
(
pVarOut
));
...
...
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