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
bac35001
Commit
bac35001
authored
Oct 17, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Oct 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle range tracing in a consistent fashion.
parent
58b2ad92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
listview.c
dlls/comctl32/listview.c
+18
-14
No files found.
dlls/comctl32/listview.c
View file @
bac35001
...
...
@@ -437,6 +437,16 @@ static char* debug_getbuf()
return
buffers
[
index
++
%
DEBUG_BUFFERS
];
}
static
inline
char
*
debugrange
(
const
RANGE
*
lprng
)
{
if
(
lprng
)
{
char
*
buf
=
debug_getbuf
();
snprintf
(
buf
,
DEBUG_BUFFER_SIZE
,
"(%d, %d)"
,
lprng
->
lower
,
lprng
->
upper
);
return
buf
;
}
else
return
"(null)"
;
}
static
inline
char
*
debugpoint
(
const
POINT
*
lppt
)
{
if
(
lppt
)
...
...
@@ -911,7 +921,7 @@ static BOOL iterator_frameditems(ITERATOR* i, LISTVIEW_INFO* infoPtr, const RECT
if
(
upper
<
lower
)
return
TRUE
;
i
->
range
.
lower
=
lower
;
i
->
range
.
upper
=
upper
;
TRACE
(
" report=
[%d,%d]
\n
"
,
lower
,
upper
);
TRACE
(
" report=
%s
\n
"
,
debugrange
(
&
i
->
range
)
);
}
else
{
...
...
@@ -935,7 +945,7 @@ static BOOL iterator_frameditems(ITERATOR* i, LISTVIEW_INFO* infoPtr, const RECT
item_range
.
lower
=
nCol
*
nPerCol
+
nFirstRow
;
if
(
item_range
.
lower
>=
infoPtr
->
nItemCount
)
break
;
item_range
.
upper
=
min
(
nCol
*
nPerCol
+
nLastRow
,
infoPtr
->
nItemCount
-
1
);
TRACE
(
" list=
[%d,%d]
\n
"
,
item_range
.
lower
,
item_range
.
upper
);
TRACE
(
" list=
%s
\n
"
,
debugrange
(
&
item_range
)
);
ranges_add
(
i
->
ranges
,
item_range
);
}
}
...
...
@@ -2180,10 +2190,7 @@ static void ranges_dump(RANGES ranges)
INT
i
;
for
(
i
=
0
;
i
<
ranges
->
hdpa
->
nItemCount
;
i
++
)
{
RANGE
*
selection
=
DPA_GetPtr
(
ranges
->
hdpa
,
i
);
TRACE
(
" [%d - %d]
\n
"
,
selection
->
lower
,
selection
->
upper
);
}
TRACE
(
" %s
\n
"
,
debugrange
(
DPA_GetPtr
(
ranges
->
hdpa
,
i
)));
}
static
inline
BOOL
ranges_contain
(
RANGES
ranges
,
INT
nItem
)
...
...
@@ -2235,7 +2242,7 @@ static BOOL ranges_add(RANGES ranges, RANGE range)
RANGE
srchrgn
;
INT
index
;
TRACE
(
"
range=(%i - %i)
\n
"
,
range
.
lower
,
range
.
upper
);
TRACE
(
"
(%s)
\n
"
,
debugrange
(
&
range
)
);
if
(
TRACE_ON
(
listview
))
ranges_dump
(
ranges
);
/* try find overlapping regions first */
...
...
@@ -2268,14 +2275,12 @@ static BOOL ranges_add(RANGES ranges, RANGE range)
chkrgn
=
DPA_GetPtr
(
ranges
->
hdpa
,
index
);
if
(
!
chkrgn
)
return
FALSE
;
TRACE
(
"Merge with index %i (%d - %d)
\n
"
,
index
,
chkrgn
->
lower
,
chkrgn
->
upper
);
TRACE
(
"Merge with %s @%d
\n
"
,
debugrange
(
chkrgn
),
index
);
chkrgn
->
lower
=
min
(
range
.
lower
,
chkrgn
->
lower
);
chkrgn
->
upper
=
max
(
range
.
upper
,
chkrgn
->
upper
);
TRACE
(
"New range %i (%d - %d)
\n
"
,
index
,
chkrgn
->
lower
,
chkrgn
->
upper
);
TRACE
(
"New range %s @%d
\n
"
,
debugrange
(
chkrgn
),
index
);
/* merge now common anges */
fromindex
=
0
;
...
...
@@ -2315,7 +2320,7 @@ static BOOL ranges_del(RANGES ranges, RANGE range)
BOOL
done
=
FALSE
;
INT
index
;
TRACE
(
"
range: (%d - %d)
\n
"
,
range
.
lower
,
range
.
upper
);
TRACE
(
"
(%s)
\n
"
,
debugrange
(
&
range
)
);
remrgn
=
range
;
do
...
...
@@ -2326,8 +2331,7 @@ static BOOL ranges_del(RANGES ranges, RANGE range)
chkrgn
=
DPA_GetPtr
(
ranges
->
hdpa
,
index
);
if
(
!
chkrgn
)
return
FALSE
;
TRACE
(
"Matches range index %i (%d - %d)
\n
"
,
index
,
chkrgn
->
lower
,
chkrgn
->
upper
);
TRACE
(
"Matches range %s @%d
\n
"
,
debugrange
(
chkrgn
),
index
);
/* case 1: Same range */
if
(
(
chkrgn
->
upper
==
remrgn
.
upper
)
&&
...
...
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