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
ed41fc1d
Commit
ed41fc1d
authored
May 14, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
May 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Added debugstr_variant helper for better debug traces.
parent
5f51dda7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
21 deletions
+50
-21
varformat.c
dlls/oleaut32/varformat.c
+15
-21
variant.c
dlls/oleaut32/variant.c
+33
-0
variant.h
dlls/oleaut32/variant.h
+2
-0
No files found.
dlls/oleaut32/varformat.c
View file @
ed41fc1d
...
...
@@ -1201,9 +1201,8 @@ static HRESULT VARIANT_FormatNumber(LPVARIANT pVarIn, LPOLESTR lpszFormat,
const
BYTE
*
pToken
=
NULL
;
HRESULT
hRes
=
S_OK
;
TRACE
(
"(%p->(%s%s),%s,%p,0x%08x,%p,0x%08x)
\n
"
,
pVarIn
,
debugstr_VT
(
pVarIn
),
debugstr_VF
(
pVarIn
),
debugstr_w
(
lpszFormat
),
rgbTok
,
dwFlags
,
pbstrOut
,
lcid
);
TRACE
(
"(%s,%s,%p,0x%08x,%p,0x%08x)
\n
"
,
debugstr_variant
(
pVarIn
),
debugstr_w
(
lpszFormat
),
rgbTok
,
dwFlags
,
pbstrOut
,
lcid
);
V_VT
(
&
vString
)
=
VT_EMPTY
;
V_VT
(
&
vBool
)
=
VT_BOOL
;
...
...
@@ -1612,9 +1611,8 @@ static HRESULT VARIANT_FormatDate(LPVARIANT pVarIn, LPOLESTR lpszFormat,
const
BYTE
*
pToken
=
NULL
;
HRESULT
hRes
;
TRACE
(
"(%p->(%s%s),%s,%p,0x%08x,%p,0x%08x)
\n
"
,
pVarIn
,
debugstr_VT
(
pVarIn
),
debugstr_VF
(
pVarIn
),
debugstr_w
(
lpszFormat
),
rgbTok
,
dwFlags
,
pbstrOut
,
lcid
);
TRACE
(
"(%s,%s,%p,0x%08x,%p,0x%08x)
\n
"
,
debugstr_variant
(
pVarIn
),
debugstr_w
(
lpszFormat
),
rgbTok
,
dwFlags
,
pbstrOut
,
lcid
);
V_VT
(
&
vDate
)
=
VT_EMPTY
;
...
...
@@ -1954,9 +1952,8 @@ static HRESULT VARIANT_FormatString(LPVARIANT pVarIn, LPOLESTR lpszFormat,
BOOL
bUpper
=
FALSE
;
HRESULT
hRes
=
S_OK
;
TRACE
(
"(%p->(%s%s),%s,%p,0x%08x,%p,0x%08x)
\n
"
,
pVarIn
,
debugstr_VT
(
pVarIn
),
debugstr_VF
(
pVarIn
),
debugstr_w
(
lpszFormat
),
rgbTok
,
dwFlags
,
pbstrOut
,
lcid
);
TRACE
(
"%s,%s,%p,0x%08x,%p,0x%08x)
\n
"
,
debugstr_variant
(
pVarIn
),
debugstr_w
(
lpszFormat
),
rgbTok
,
dwFlags
,
pbstrOut
,
lcid
);
V_VT
(
&
vStr
)
=
VT_EMPTY
;
...
...
@@ -2168,9 +2165,8 @@ HRESULT WINAPI VarFormat(LPVARIANT pVarIn, LPOLESTR lpszFormat,
BYTE
buff
[
256
];
HRESULT
hres
;
TRACE
(
"(%p->(%s%s),%s,%d,%d,0x%08x,%p)
\n
"
,
pVarIn
,
debugstr_VT
(
pVarIn
),
debugstr_VF
(
pVarIn
),
debugstr_w
(
lpszFormat
),
nFirstDay
,
nFirstWeek
,
dwFlags
,
pbstrOut
);
TRACE
(
"(%s,%s,%d,%d,0x%08x,%p)
\n
"
,
debugstr_variant
(
pVarIn
),
debugstr_w
(
lpszFormat
),
nFirstDay
,
nFirstWeek
,
dwFlags
,
pbstrOut
);
if
(
!
pbstrOut
)
return
E_INVALIDARG
;
...
...
@@ -2219,8 +2215,7 @@ HRESULT WINAPI VarFormatDateTime(LPVARIANT pVarIn, INT nFormat, ULONG dwFlags, B
static
WCHAR
szEmpty
[]
=
{
'\0'
};
const
BYTE
*
lpFmt
=
NULL
;
TRACE
(
"(%p->(%s%s),%d,0x%08x,%p)
\n
"
,
pVarIn
,
debugstr_VT
(
pVarIn
),
debugstr_VF
(
pVarIn
),
nFormat
,
dwFlags
,
pbstrOut
);
TRACE
(
"%s,%d,0x%08x,%p)
\n
"
,
debugstr_variant
(
pVarIn
),
nFormat
,
dwFlags
,
pbstrOut
);
if
(
!
pVarIn
||
!
pbstrOut
||
nFormat
<
0
||
nFormat
>
4
)
return
E_INVALIDARG
;
...
...
@@ -2272,8 +2267,8 @@ HRESULT WINAPI VarFormatNumber(LPVARIANT pVarIn, INT nDigits, INT nLeading, INT
HRESULT
hRet
;
VARIANT
vStr
;
TRACE
(
"(%
p->(%s%s),%d,%d,%d,%d,0x%08x,%p)
\n
"
,
pVarIn
,
debugstr_VT
(
pVarIn
)
,
debugstr_VF
(
pVarIn
),
nDigits
,
nLeading
,
nParens
,
nGrouping
,
dwFlags
,
pbstrOut
);
TRACE
(
"(%
s,%d,%d,%d,%d,0x%08x,%p)
\n
"
,
debugstr_variant
(
pVarIn
),
nDigits
,
nLeading
,
nParens
,
nGrouping
,
dwFlags
,
pbstrOut
);
if
(
!
pVarIn
||
!
pbstrOut
||
nDigits
>
9
)
return
E_INVALIDARG
;
...
...
@@ -2383,9 +2378,8 @@ HRESULT WINAPI VarFormatPercent(LPVARIANT pVarIn, INT nDigits, INT nLeading, INT
HRESULT
hRet
;
VARIANT
vDbl
;
TRACE
(
"(%p->(%s%s),%d,%d,%d,%d,0x%08x,%p)
\n
"
,
pVarIn
,
debugstr_VT
(
pVarIn
),
debugstr_VF
(
pVarIn
),
nDigits
,
nLeading
,
nParens
,
nGrouping
,
dwFlags
,
pbstrOut
);
TRACE
(
"(%s,%d,%d,%d,%d,0x%08x,%p)
\n
"
,
debugstr_variant
(
pVarIn
),
nDigits
,
nLeading
,
nParens
,
nGrouping
,
dwFlags
,
pbstrOut
);
if
(
!
pVarIn
||
!
pbstrOut
||
nDigits
>
9
)
return
E_INVALIDARG
;
...
...
@@ -2457,8 +2451,8 @@ HRESULT WINAPI VarFormatCurrency(LPVARIANT pVarIn, INT nDigits, INT nLeading,
HRESULT
hRet
;
VARIANT
vStr
;
TRACE
(
"(%
p->(%s%s),%d,%d,%d,%d,0x%08x,%p)
\n
"
,
pVarIn
,
debugstr_VT
(
pVarIn
)
,
debugstr_VF
(
pVarIn
),
nDigits
,
nLeading
,
nParens
,
nGrouping
,
dwFlags
,
pbstrOut
);
TRACE
(
"(%
s,%d,%d,%d,%d,0x%08x,%p)
\n
"
,
debugstr_variant
(
pVarIn
),
nDigits
,
nLeading
,
nParens
,
nGrouping
,
dwFlags
,
pbstrOut
);
if
(
!
pVarIn
||
!
pbstrOut
||
nDigits
>
9
)
return
E_INVALIDARG
;
...
...
dlls/oleaut32/variant.c
View file @
ed41fc1d
...
...
@@ -78,6 +78,39 @@ const char * const wine_vflags[16] =
"|VT_VECTOR|VT_ARRAY|VT_BYREF|VT_HARDTYPE"
,
};
const
char
*
debugstr_variant
(
const
VARIANT
*
v
)
{
if
(
!
v
)
return
"(null)"
;
switch
(
V_VT
(
v
))
{
case
VT_EMPTY
:
return
wine_dbg_sprintf
(
"%p {VT_EMPTY}"
,
v
);
case
VT_NULL
:
return
wine_dbg_sprintf
(
"%p {VT_NULL}"
,
v
);
case
VT_I1
:
return
wine_dbg_sprintf
(
"%p {VT_I1: %d}"
,
v
,
V_I1
(
v
));
case
VT_I2
:
return
wine_dbg_sprintf
(
"%p {VT_I2: %d}"
,
v
,
V_I2
(
v
));
case
VT_I4
:
return
wine_dbg_sprintf
(
"%p {VT_I4: %d}"
,
v
,
V_I4
(
v
));
case
VT_R8
:
return
wine_dbg_sprintf
(
"%p {VT_R8: %lf}"
,
v
,
V_R8
(
v
));
case
VT_BSTR
:
return
wine_dbg_sprintf
(
"%p {VT_BSTR: %s}"
,
v
,
debugstr_w
(
V_BSTR
(
v
)));
case
VT_DISPATCH
:
return
wine_dbg_sprintf
(
"%p {VT_DISPATCH: %p}"
,
v
,
V_DISPATCH
(
v
));
case
VT_ERROR
:
return
wine_dbg_sprintf
(
"%p {VT_ERROR: %08x}"
,
v
,
V_ERROR
(
v
));
case
VT_BOOL
:
return
wine_dbg_sprintf
(
"%p {VT_BOOL: %x}"
,
v
,
V_BOOL
(
v
));
case
VT_UINT
:
return
wine_dbg_sprintf
(
"%p {VT_UINT: %u}"
,
v
,
V_UINT
(
v
));
default:
return
wine_dbg_sprintf
(
"%p {vt %s%s}"
,
v
,
debugstr_VT
(
v
),
debugstr_VF
(
v
));
}
}
/* Convert a variant from one type to another */
static
inline
HRESULT
VARIANT_Coerce
(
VARIANTARG
*
pd
,
LCID
lcid
,
USHORT
wFlags
,
VARIANTARG
*
ps
,
VARTYPE
vt
)
...
...
dlls/oleaut32/variant.h
View file @
ed41fc1d
...
...
@@ -57,6 +57,8 @@ extern const char * const wine_vflags[] DECLSPEC_HIDDEN;
#define debugstr_vf(v) (wine_vflags[((v)&VT_EXTRA_TYPE)>>12])
#define debugstr_VF(v) (!(v) ? "(null)" : debugstr_vf(V_EXTRA_TYPE(v)))
const
char
*
debugstr_variant
(
const
VARIANT
*
)
DECLSPEC_HIDDEN
;
/* Size constraints */
#define I1_MAX 0x7f
#define I1_MIN ((-I1_MAX)-1)
...
...
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