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
00767952
Commit
00767952
authored
Jan 29, 2011
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Store key len in dbkey_pair structure for efficiency reasons.
parent
541c1163
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
term.c
dlls/kernel32/term.c
+5
-3
No files found.
dlls/kernel32/term.c
View file @
00767952
...
...
@@ -223,6 +223,7 @@ struct dbkey_descr
struct
dbkey_pair
{
const
char
*
string
;
unsigned
string_len
;
struct
dbkey_descr
descr
;
};
...
...
@@ -300,8 +301,9 @@ static BOOL TERM_AddKeyDescr(const char* string, struct dbkey_descr* descr)
TERM_dbkey
=
new
;
TERM_dbkey_size
*=
2
;
}
TERM_dbkey
[
TERM_dbkey_index
].
string
=
string
;
TERM_dbkey
[
TERM_dbkey_index
].
descr
=
*
descr
;
TERM_dbkey
[
TERM_dbkey_index
].
string
=
string
;
TERM_dbkey
[
TERM_dbkey_index
].
string_len
=
strlen
(
string
);
TERM_dbkey
[
TERM_dbkey_index
].
descr
=
*
descr
;
TERM_dbkey_index
++
;
return
TRUE
;
}
...
...
@@ -352,7 +354,7 @@ int TERM_FillInputRecord(const char* in, size_t len, INPUT_RECORD* ir)
{
if
(
!
memcmp
(
TERM_dbkey
[
i
].
string
,
in
,
len
))
{
if
(
len
<
strlen
(
TERM_dbkey
[
i
].
string
)
)
return
0
;
if
(
len
<
TERM_dbkey
[
i
].
string_len
)
return
0
;
if
(
found
)
return
0
;
found
=
&
TERM_dbkey
[
i
].
descr
;
}
...
...
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