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
fc878236
Commit
fc878236
authored
Jan 27, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/rebar: Do not use global variable for debug buffer (Coverity).
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1c99186c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
rebar.c
dlls/comctl32/rebar.c
+22
-17
No files found.
dlls/comctl32/rebar.c
View file @
fc878236
...
...
@@ -281,6 +281,9 @@ static const char * const band_stylename[] = {
"RBBS_VARIABLEHEIGHT"
,
/* 0040 */
"RBBS_GRIPPERALWAYS"
,
/* 0080 */
"RBBS_NOGRIPPER"
,
/* 0100 */
"RBBS_USECHEVRON"
,
/* 0200 */
"RBBS_HIDETITLE"
,
/* 0400 */
"RBBS_TOPALIGN"
,
/* 0800 */
NULL
};
static
const
char
*
const
band_maskname
[]
=
{
...
...
@@ -296,50 +299,52 @@ static const char * const band_maskname[] = {
"RBBIM_IDEALSIZE"
,
/* 0x00000200 */
"RBBIM_LPARAM"
,
/* 0x00000400 */
"RBBIM_HEADERSIZE"
,
/* 0x00000800 */
"RBBIM_CHEVRONLOCATION"
,
/* 0x00001000 */
"RBBIM_CHEVRONSTATE"
,
/* 0x00002000 */
NULL
};
static
CHAR
line
[
200
];
static
const
WCHAR
themeClass
[]
=
{
'R'
,
'e'
,
'b'
,
'a'
,
'r'
,
0
};
static
CHAR
*
REBAR_FmtStyle
(
UINT
style
)
REBAR_FmtStyle
(
char
*
buffer
,
UINT
style
)
{
INT
i
=
0
;
*
line
=
0
;
*
buffer
=
0
;
while
(
band_stylename
[
i
])
{
if
(
style
&
(
1
<<
i
))
{
if
(
*
line
!=
0
)
strcat
(
line
,
" | "
);
strcat
(
line
,
band_stylename
[
i
]);
if
(
*
buffer
)
strcat
(
buffer
,
" | "
);
strcat
(
buffer
,
band_stylename
[
i
]);
}
i
++
;
}
return
line
;
return
buffer
;
}
static
CHAR
*
REBAR_FmtMask
(
UINT
mask
)
REBAR_FmtMask
(
char
*
buffer
,
UINT
mask
)
{
INT
i
=
0
;
*
line
=
0
;
*
buffer
=
0
;
while
(
band_maskname
[
i
])
{
if
(
mask
&
(
1
<<
i
))
{
if
(
*
line
!=
0
)
strcat
(
line
,
" | "
);
strcat
(
line
,
band_maskname
[
i
]);
if
(
*
buffer
)
strcat
(
buffer
,
" | "
);
strcat
(
buffer
,
band_maskname
[
i
]);
}
i
++
;
}
return
line
;
return
buffer
;
}
static
VOID
REBAR_DumpBandInfo
(
const
REBARBANDINFOW
*
pB
)
{
char
buff
[
300
];
if
(
!
TRACE_ON
(
rebar
)
)
return
;
TRACE
(
"band info: "
);
if
(
pB
->
fMask
&
RBBIM_ID
)
...
...
@@ -349,9 +354,9 @@ REBAR_DumpBandInfo(const REBARBANDINFOW *pB)
TRACE
(
", clrF=0x%06x, clrB=0x%06x"
,
pB
->
clrFore
,
pB
->
clrBack
);
TRACE
(
"
\n
"
);
TRACE
(
"band info: mask=0x%08x (%s)
\n
"
,
pB
->
fMask
,
REBAR_FmtMask
(
pB
->
fMask
));
TRACE
(
"band info: mask=0x%08x (%s)
\n
"
,
pB
->
fMask
,
REBAR_FmtMask
(
buff
,
pB
->
fMask
));
if
(
pB
->
fMask
&
RBBIM_STYLE
)
TRACE
(
"band info: style=0x%08x (%s)
\n
"
,
pB
->
fStyle
,
REBAR_FmtStyle
(
pB
->
fStyle
));
TRACE
(
"band info: style=0x%08x (%s)
\n
"
,
pB
->
fStyle
,
REBAR_FmtStyle
(
buff
,
pB
->
fStyle
));
if
(
pB
->
fMask
&
(
RBBIM_SIZE
|
RBBIM_IDEALSIZE
|
RBBIM_HEADERSIZE
|
RBBIM_LPARAM
))
{
TRACE
(
"band info:"
);
if
(
pB
->
fMask
&
RBBIM_SIZE
)
...
...
@@ -373,6 +378,7 @@ REBAR_DumpBandInfo(const REBARBANDINFOW *pB)
static
VOID
REBAR_DumpBand
(
const
REBAR_INFO
*
iP
)
{
char
buff
[
300
];
REBAR_BAND
*
pB
;
UINT
i
;
...
...
@@ -398,10 +404,9 @@ REBAR_DumpBand (const REBAR_INFO *iP)
if
(
pB
->
fMask
&
RBBIM_COLORS
)
TRACE
(
" clrF=0x%06x clrB=0x%06x"
,
pB
->
clrFore
,
pB
->
clrBack
);
TRACE
(
"
\n
"
);
TRACE
(
"band # %u: mask=0x%08x (%s)
\n
"
,
i
,
pB
->
fMask
,
REBAR_FmtMask
(
pB
->
fMask
));
TRACE
(
"band # %u: mask=0x%08x (%s)
\n
"
,
i
,
pB
->
fMask
,
REBAR_FmtMask
(
buff
,
pB
->
fMask
));
if
(
pB
->
fMask
&
RBBIM_STYLE
)
TRACE
(
"band # %u: style=0x%08x (%s)
\n
"
,
i
,
pB
->
fStyle
,
REBAR_FmtStyle
(
pB
->
fStyle
));
TRACE
(
"band # %u: style=0x%08x (%s)
\n
"
,
i
,
pB
->
fStyle
,
REBAR_FmtStyle
(
buff
,
pB
->
fStyle
));
TRACE
(
"band # %u: xHeader=%u"
,
i
,
pB
->
cxHeader
);
if
(
pB
->
fMask
&
(
RBBIM_SIZE
|
RBBIM_IDEALSIZE
|
RBBIM_LPARAM
))
{
...
...
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