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
5f88ba5b
Commit
5f88ba5b
authored
Mar 19, 2014
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Mar 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use BOOL type where appropriate.
parent
3ec51438
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
21 deletions
+20
-21
caret.c
dlls/riched20/caret.c
+6
-7
editor.c
dlls/riched20/editor.c
+5
-5
reader.c
dlls/riched20/reader.c
+8
-8
rtf.h
dlls/riched20/rtf.h
+1
-1
No files found.
dlls/riched20/caret.c
View file @
5f88ba5b
...
...
@@ -904,7 +904,7 @@ static ME_DisplayItem* ME_FindPixelPosInTableRow(int x, int y,
}
static
BOOL
ME_FindRunInRow
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
pRow
,
int
x
,
ME_Cursor
*
cursor
,
int
*
pbCaretAtEnd
)
int
x
,
ME_Cursor
*
cursor
,
BOOL
*
pbCaretAtEnd
)
{
ME_DisplayItem
*
pNext
,
*
pLastRun
;
ME_Row
*
row
=
&
pRow
->
member
.
row
;
...
...
@@ -964,7 +964,7 @@ static BOOL ME_FindPixelPos(ME_TextEditor *editor, int x, int y,
y
-=
editor
->
rcFormat
.
top
;
if
(
is_eol
)
*
is_eol
=
0
;
*
is_eol
=
FALSE
;
/* find paragraph */
for
(;
p
!=
editor
->
pBuffer
->
pLast
;
p
=
p
->
member
.
para
.
next_para
)
...
...
@@ -1109,8 +1109,7 @@ static void ME_ExtendAnchorSelection(ME_TextEditor *editor)
void
ME_LButtonDown
(
ME_TextEditor
*
editor
,
int
x
,
int
y
,
int
clickNum
)
{
ME_Cursor
tmp_cursor
;
int
is_selection
=
0
;
BOOL
is_shift
;
BOOL
is_selection
=
FALSE
,
is_shift
;
editor
->
nUDArrowX
=
-
1
;
...
...
@@ -1535,14 +1534,14 @@ ME_ArrowKey(ME_TextEditor *editor, int nVKey, BOOL extend, BOOL ctrl)
ME_CheckCharOffsets
(
editor
);
switch
(
nVKey
)
{
case
VK_LEFT
:
editor
->
bCaretAtEnd
=
0
;
editor
->
bCaretAtEnd
=
FALSE
;
if
(
ctrl
)
success
=
ME_MoveCursorWords
(
editor
,
&
tmp_curs
,
-
1
);
else
success
=
ME_MoveCursorChars
(
editor
,
&
tmp_curs
,
-
1
);
break
;
case
VK_RIGHT
:
editor
->
bCaretAtEnd
=
0
;
editor
->
bCaretAtEnd
=
FALSE
;
if
(
ctrl
)
success
=
ME_MoveCursorWords
(
editor
,
&
tmp_curs
,
+
1
);
else
...
...
@@ -1565,7 +1564,7 @@ ME_ArrowKey(ME_TextEditor *editor, int nVKey, BOOL extend, BOOL ctrl)
ME_ArrowCtrlHome
(
editor
,
&
tmp_curs
);
else
ME_ArrowHome
(
editor
,
&
tmp_curs
);
editor
->
bCaretAtEnd
=
0
;
editor
->
bCaretAtEnd
=
FALSE
;
break
;
}
case
VK_END
:
...
...
dlls/riched20/editor.c
View file @
5f88ba5b
...
...
@@ -1633,7 +1633,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
ME_Cursor
linebreakCursor
=
*
selEnd
;
ME_MoveCursorChars
(
editor
,
&
linebreakCursor
,
-
linebreakSize
);
ME_GetTextW
(
editor
,
lastchar
,
2
,
&
linebreakCursor
,
linebreakSize
,
0
);
ME_GetTextW
(
editor
,
lastchar
,
2
,
&
linebreakCursor
,
linebreakSize
,
FALSE
);
if
(
lastchar
[
0
]
==
'\r'
&&
(
lastchar
[
1
]
==
'\n'
||
lastchar
[
1
]
==
'\0'
))
{
ME_InternalDeleteText
(
editor
,
&
linebreakCursor
,
linebreakSize
,
FALSE
);
}
...
...
@@ -2003,12 +2003,12 @@ static int ME_GetTextRange(ME_TextEditor *editor, WCHAR *strText,
{
if
(
!
strText
)
return
0
;
if
(
unicode
)
{
return
ME_GetTextW
(
editor
,
strText
,
INT_MAX
,
start
,
nLen
,
0
);
return
ME_GetTextW
(
editor
,
strText
,
INT_MAX
,
start
,
nLen
,
FALSE
);
}
else
{
int
nChars
;
WCHAR
*
p
=
ALLOC_N_OBJ
(
WCHAR
,
nLen
+
1
);
if
(
!
p
)
return
0
;
nChars
=
ME_GetTextW
(
editor
,
p
,
nLen
,
start
,
nLen
,
0
);
nChars
=
ME_GetTextW
(
editor
,
p
,
nLen
,
start
,
nLen
,
FALSE
);
WideCharToMultiByte
(
CP_ACP
,
0
,
p
,
nChars
+
1
,
(
char
*
)
strText
,
nLen
+
1
,
NULL
,
NULL
);
FREE_OBJ
(
p
);
...
...
@@ -4702,7 +4702,7 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen,
int
nLen
;
/* bCRLF flag is only honored in 2.0 and up. 1.0 must always return text verbatim */
if
(
editor
->
bEmulateVersion10
)
bCRLF
=
0
;
if
(
editor
->
bEmulateVersion10
)
bCRLF
=
FALSE
;
pRun
=
start
->
pRun
;
assert
(
pRun
);
...
...
@@ -4987,7 +4987,7 @@ static BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, const ME_Cursor *start, i
WCHAR
bufferW
[
MAX_PREFIX_LEN
+
1
];
unsigned
int
i
;
ME_GetTextW
(
editor
,
bufferW
,
MAX_PREFIX_LEN
,
start
,
nChars
,
0
);
ME_GetTextW
(
editor
,
bufferW
,
MAX_PREFIX_LEN
,
start
,
nChars
,
FALSE
);
for
(
i
=
0
;
i
<
sizeof
(
prefixes
)
/
sizeof
(
*
prefixes
);
i
++
)
{
if
(
nChars
<
prefixes
[
i
].
length
)
continue
;
...
...
dlls/riched20/reader.c
View file @
5f88ba5b
...
...
@@ -256,7 +256,7 @@ void RTFInit(RTF_Info *info)
info
->
rtfLineNum
=
0
;
info
->
rtfLinePos
=
0
;
info
->
prevChar
=
EOF
;
info
->
bumpLine
=
0
;
info
->
bumpLine
=
FALSE
;
info
->
dwCPOutputCount
=
0
;
if
(
!
info
->
cpOutputBuffer
)
...
...
@@ -722,7 +722,7 @@ static void _RTFGetToken2(RTF_Info *info)
static
int
GetChar
(
RTF_Info
*
info
)
{
int
c
;
int
oldBumpLine
;
BOOL
oldBumpLine
;
if
((
c
=
_RTFGetChar
(
info
))
!=
EOF
)
{
...
...
@@ -730,16 +730,16 @@ static int GetChar(RTF_Info *info)
info
->
rtfTextBuf
[
info
->
rtfTextLen
]
=
'\0'
;
}
if
(
info
->
prevChar
==
EOF
)
info
->
bumpLine
=
1
;
oldBumpLine
=
info
->
bumpLine
;
/* non-zero
if prev char was line ending */
info
->
bumpLine
=
0
;
info
->
bumpLine
=
TRUE
;
oldBumpLine
=
info
->
bumpLine
;
/* TRUE
if prev char was line ending */
info
->
bumpLine
=
FALSE
;
if
(
c
==
'\r'
)
info
->
bumpLine
=
1
;
info
->
bumpLine
=
TRUE
;
else
if
(
c
==
'\n'
)
{
info
->
bumpLine
=
1
;
info
->
bumpLine
=
TRUE
;
if
(
info
->
prevChar
==
'\r'
)
/* oops, previous \r wasn't */
oldBumpLine
=
0
;
/* really a line ending */
oldBumpLine
=
FALSE
;
/* really a line ending */
}
++
info
->
rtfLinePos
;
if
(
oldBumpLine
)
/* were we supposed to increment the */
...
...
dlls/riched20/rtf.h
View file @
5f88ba5b
...
...
@@ -1139,7 +1139,7 @@ struct _RTF_Info {
char
*
pushedTextBuf
;
int
prevChar
;
int
bumpLine
;
BOOL
bumpLine
;
/* Document-wide attributes */
RTFFont
*
fontList
;
/* these lists MUST be */
...
...
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