Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
8058ead8
Commit
8058ead8
authored
24 years ago
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't write to buffer with zero length.
Removed some unused function parameters.
parent
81cb2387
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
controls/edit.c
+11
-11
11 additions, 11 deletions
controls/edit.c
with
11 additions
and
11 deletions
controls/edit.c
+
11
−
11
View file @
8058ead8
...
...
@@ -175,7 +175,7 @@ static void EDIT_MoveUp_ML(WND *wnd, EDITSTATE *es, BOOL extend);
/*
* Helper functions valid for both single line _and_ multi line controls
*/
static
INT
EDIT_CallWordBreakProc
(
WND
*
wnd
,
EDITSTATE
*
es
,
INT
start
,
INT
index
,
INT
count
,
INT
action
);
static
INT
EDIT_CallWordBreakProc
(
EDITSTATE
*
es
,
INT
start
,
INT
index
,
INT
count
,
INT
action
);
static
INT
EDIT_CharFromPos
(
WND
*
wnd
,
EDITSTATE
*
es
,
INT
x
,
INT
y
,
LPBOOL
after_wrap
);
static
void
EDIT_ConfinePoint
(
EDITSTATE
*
es
,
LPINT
x
,
LPINT
y
);
static
void
EDIT_GetLineRect
(
WND
*
wnd
,
EDITSTATE
*
es
,
INT
line
,
INT
scol
,
INT
ecol
,
LPRECT
rc
);
...
...
@@ -200,7 +200,7 @@ static INT CALLBACK EDIT_WordBreakProc(LPWSTR s, INT index, INT count, INT actio
*/
static
LRESULT
EDIT_EM_CharFromPos
(
WND
*
wnd
,
EDITSTATE
*
es
,
INT
x
,
INT
y
);
static
BOOL
EDIT_EM_FmtLines
(
EDITSTATE
*
es
,
BOOL
add_eol
);
static
HLOCAL
EDIT_EM_GetHandle
(
WND
*
wnd
,
EDITSTATE
*
es
);
static
HLOCAL
EDIT_EM_GetHandle
(
EDITSTATE
*
es
);
static
HLOCAL16
EDIT_EM_GetHandle16
(
WND
*
wnd
,
EDITSTATE
*
es
);
static
INT
EDIT_EM_GetLine
(
EDITSTATE
*
es
,
INT
line
,
LPWSTR
lpch
);
static
LRESULT
EDIT_EM_GetSel
(
EDITSTATE
*
es
,
LPUINT
start
,
LPUINT
end
);
...
...
@@ -562,7 +562,7 @@ static LRESULT WINAPI EditWndProc_locked( WND *wnd, UINT msg,
break
;
case
EM_GETHANDLE
:
DPRINTF_EDIT_MSG32
(
"EM_GETHANDLE"
);
result
=
(
LRESULT
)
EDIT_EM_GetHandle
(
wnd
,
es
);
result
=
(
LRESULT
)
EDIT_EM_GetHandle
(
es
);
break
;
case
EM_GETTHUMB16
:
...
...
@@ -1177,7 +1177,7 @@ static void EDIT_BuildLineDefs_ML(WND *wnd, EDITSTATE *es)
INT
prev
;
do
{
prev
=
next
;
next
=
EDIT_CallWordBreakProc
(
wnd
,
es
,
start
-
es
->
text
,
next
=
EDIT_CallWordBreakProc
(
es
,
start
-
es
->
text
,
prev
+
1
,
current_def
->
net_length
,
WB_RIGHT
);
current_def
->
width
=
(
INT
)
LOWORD
(
GetTabbedTextExtentW
(
dc
,
start
,
next
,
es
->
tabs_count
,
es
->
tabs
));
...
...
@@ -1238,7 +1238,7 @@ static void EDIT_BuildLineDefs_ML(WND *wnd, EDITSTATE *es)
/* ### start build ### */
extern
WORD
CALLBACK
EDIT_CallTo16_word_lwww
(
EDITWORDBREAKPROC16
,
SEGPTR
,
WORD
,
WORD
,
WORD
);
/* ### stop build ### */
static
INT
EDIT_CallWordBreakProc
(
WND
*
wnd
,
EDITSTATE
*
es
,
INT
start
,
INT
index
,
INT
count
,
INT
action
)
static
INT
EDIT_CallWordBreakProc
(
EDITSTATE
*
es
,
INT
start
,
INT
index
,
INT
count
,
INT
action
)
{
INT
ret
,
iWndsLocks
;
...
...
@@ -1446,7 +1446,7 @@ static LPWSTR EDIT_GetPasswordPointer_SL(EDITSTATE *es)
INT
len
=
strlenW
(
es
->
text
);
LPWSTR
text
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
text
[
len
]
=
'\0'
;
while
(
--
len
)
text
[
len
]
=
es
->
password_char
;
while
(
len
)
text
[
--
len
]
=
es
->
password_char
;
return
text
;
}
else
return
es
->
text
;
...
...
@@ -1913,7 +1913,7 @@ static void EDIT_MoveWordBackward(WND *wnd, EDITSTATE *es, BOOL extend)
e
=
li
+
EDIT_EM_LineLength
(
es
,
li
);
}
}
else
{
e
=
li
+
(
INT
)
EDIT_CallWordBreakProc
(
wnd
,
es
,
e
=
li
+
(
INT
)
EDIT_CallWordBreakProc
(
es
,
li
,
e
-
li
,
ll
,
WB_LEFT
);
}
if
(
!
extend
)
...
...
@@ -1943,7 +1943,7 @@ static void EDIT_MoveWordForward(WND *wnd, EDITSTATE *es, BOOL extend)
if
((
es
->
style
&
ES_MULTILINE
)
&&
(
l
!=
es
->
line_count
-
1
))
e
=
EDIT_EM_LineIndex
(
es
,
l
+
1
);
}
else
{
e
=
li
+
EDIT_CallWordBreakProc
(
wnd
,
es
,
e
=
li
+
EDIT_CallWordBreakProc
(
es
,
li
,
e
-
li
+
1
,
ll
,
WB_RIGHT
);
}
if
(
!
extend
)
...
...
@@ -2280,7 +2280,7 @@ static BOOL EDIT_EM_FmtLines(EDITSTATE *es, BOOL add_eol)
* buffer on the local heap.
*
*/
static
HLOCAL
EDIT_EM_GetHandle
(
WND
*
wnd
,
EDITSTATE
*
es
)
static
HLOCAL
EDIT_EM_GetHandle
(
EDITSTATE
*
es
)
{
HLOCAL
hLocal
;
...
...
@@ -3926,8 +3926,8 @@ static LRESULT EDIT_WM_LButtonDblClk(WND *wnd, EDITSTATE *es)
l
=
EDIT_EM_LineFromChar
(
es
,
e
);
li
=
EDIT_EM_LineIndex
(
es
,
l
);
ll
=
EDIT_EM_LineLength
(
es
,
e
);
s
=
li
+
EDIT_CallWordBreakProc
(
wnd
,
es
,
li
,
e
-
li
,
ll
,
WB_LEFT
);
e
=
li
+
EDIT_CallWordBreakProc
(
wnd
,
es
,
li
,
e
-
li
,
ll
,
WB_RIGHT
);
s
=
li
+
EDIT_CallWordBreakProc
(
es
,
li
,
e
-
li
,
ll
,
WB_LEFT
);
e
=
li
+
EDIT_CallWordBreakProc
(
es
,
li
,
e
-
li
,
ll
,
WB_RIGHT
);
EDIT_EM_SetSel
(
wnd
,
es
,
s
,
e
,
FALSE
);
EDIT_EM_ScrollCaret
(
wnd
,
es
);
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment