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
8d6d9fd3
Commit
8d6d9fd3
authored
Dec 17, 2007
by
Kirill K. Smirnov
Committed by
Alexandre Julliard
Dec 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Avoid any keywords comparision during lookup, store pointer to listbox ITEMDATA instead.
parent
6af0e45d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
31 deletions
+5
-31
winhelp.c
programs/winhelp/winhelp.c
+5
-31
No files found.
programs/winhelp/winhelp.c
View file @
8d6d9fd3
...
...
@@ -1957,28 +1957,16 @@ WINHELP_LINE_PART* WINHELP_IsOverLink(WINHELP_WINDOW* win, WPARAM wParam, LPARAM
static
void
cb_KWBTree
(
void
*
p
,
void
**
next
,
void
*
cookie
)
{
HWND
hListWnd
=
(
HWND
)
cookie
;
int
count
;
WINE_TRACE
(
"Adding '%s' to search list
\n
"
,
(
char
*
)
p
);
SendMessage
(
hListWnd
,
LB_INSERTSTRING
,
-
1
,
(
LPARAM
)
p
);
count
=
SendMessage
(
hListWnd
,
LB_GETCOUNT
,
0
,
0
);
SendMessage
(
hListWnd
,
LB_SETITEMDATA
,
count
-
1
,
(
LPARAM
)
p
);
*
next
=
(
char
*
)
p
+
strlen
((
char
*
)
p
)
+
7
;
}
/**************************************************************************
* comp_KWBTREE
*
* HLPFILE_BPTreeCompare function for '|KWBTREE' internal file.
*
*/
static
int
comp_KWBTree
(
void
*
p
,
const
void
*
key
,
int
leaf
,
void
**
next
)
{
WINE_TRACE
(
"comparing key '%s' with '%s'
\n
"
,
(
char
*
)
p
,
(
char
*
)
key
);
*
next
=
(
char
*
)
p
+
strlen
(
p
)
+
1
+
(
leaf
?
6
:
2
);
/* unlike directory, index is case insensitive */
return
lstrcmpi
(
p
,
key
);
}
/**************************************************************************
* WINHELP_IndexDlgProc
*
* Index dialog callback function.
...
...
@@ -2004,25 +1992,11 @@ INT_PTR CALLBACK WINHELP_SearchDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA
sel
=
SendDlgItemMessage
(
hWnd
,
IDC_INDEXLIST
,
LB_GETCURSEL
,
0
,
0
);
if
(
sel
!=
LB_ERR
)
{
char
buf
[
500
];
/* enough */
BYTE
*
p
;
int
count
;
SendDlgItemMessage
(
hWnd
,
IDC_INDEXLIST
,
LB_GETTEXT
,
sel
,
(
LPARAM
)
buf
);
p
=
HLPFILE_BPTreeSearch
(
file
->
kwbtree
,
buf
,
comp_KWBTree
);
if
(
p
==
NULL
)
{
/*
* TODO:
* This may happen if help file uses other locale than
* system. We should honour charset provided in help file
* and use UNICODE, but for now current implementation is
* acceptable (almost all help files use ANSI).
*/
WINE_FIXME
(
"item '%s' not found, locale mismatch???
\n
"
,
buf
);
return
TRUE
;
}
p
=
(
BYTE
*
)
SendDlgItemMessage
(
hWnd
,
IDC_INDEXLIST
,
LB_GETITEMDATA
,
sel
,
0
);
count
=
*
(
short
*
)((
char
*
)
p
+
strlen
((
char
*
)
p
)
+
1
);
if
(
count
>
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