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
90024d03
Commit
90024d03
authored
Nov 03, 2008
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Remove superflous casts.
parent
c9a10b32
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
clipboard.c
dlls/riched20/clipboard.c
+2
-2
editor.c
dlls/riched20/editor.c
+5
-5
para.c
dlls/riched20/para.c
+1
-1
string.c
dlls/riched20/string.c
+1
-1
No files found.
dlls/riched20/clipboard.c
View file @
90024d03
...
@@ -334,7 +334,7 @@ static HGLOBAL get_unicode_text(ME_TextEditor *editor, const CHARRANGE *lpchrg)
...
@@ -334,7 +334,7 @@ static HGLOBAL get_unicode_text(ME_TextEditor *editor, const CHARRANGE *lpchrg)
pars
=
ME_CountParagraphsBetween
(
editor
,
lpchrg
->
cpMin
,
lpchrg
->
cpMax
);
pars
=
ME_CountParagraphsBetween
(
editor
,
lpchrg
->
cpMin
,
lpchrg
->
cpMax
);
len
=
lpchrg
->
cpMax
-
lpchrg
->
cpMin
;
len
=
lpchrg
->
cpMax
-
lpchrg
->
cpMin
;
ret
=
GlobalAlloc
(
GMEM_MOVEABLE
,
sizeof
(
WCHAR
)
*
(
len
+
pars
+
1
));
ret
=
GlobalAlloc
(
GMEM_MOVEABLE
,
sizeof
(
WCHAR
)
*
(
len
+
pars
+
1
));
data
=
(
WCHAR
*
)
GlobalLock
(
ret
);
data
=
GlobalLock
(
ret
);
len
=
ME_GetTextW
(
editor
,
data
,
lpchrg
->
cpMin
,
len
,
TRUE
);
len
=
ME_GetTextW
(
editor
,
data
,
lpchrg
->
cpMin
,
len
,
TRUE
);
data
[
len
]
=
0
;
data
[
len
]
=
0
;
GlobalUnlock
(
ret
);
GlobalUnlock
(
ret
);
...
@@ -359,7 +359,7 @@ static DWORD CALLBACK ME_AppendToHGLOBAL(DWORD_PTR dwCookie, LPBYTE lpBuff, LONG
...
@@ -359,7 +359,7 @@ static DWORD CALLBACK ME_AppendToHGLOBAL(DWORD_PTR dwCookie, LPBYTE lpBuff, LONG
int
nNewSize
=
(((
nMaxSize
+
cb
+
1
)
|
0x1FFFF
)
+
1
)
&
0xFFFE0000
;
int
nNewSize
=
(((
nMaxSize
+
cb
+
1
)
|
0x1FFFF
)
+
1
)
&
0xFFFE0000
;
pData
->
hData
=
GlobalReAlloc
(
pData
->
hData
,
nNewSize
,
0
);
pData
->
hData
=
GlobalReAlloc
(
pData
->
hData
,
nNewSize
,
0
);
}
}
pDest
=
(
BYTE
*
)
GlobalLock
(
pData
->
hData
);
pDest
=
GlobalLock
(
pData
->
hData
);
memcpy
(
pDest
+
pData
->
nLength
,
lpBuff
,
cb
);
memcpy
(
pDest
+
pData
->
nLength
,
lpBuff
,
cb
);
pData
->
nLength
+=
cb
;
pData
->
nLength
+=
cb
;
pDest
[
pData
->
nLength
]
=
'\0'
;
pDest
[
pData
->
nLength
]
=
'\0'
;
...
...
dlls/riched20/editor.c
View file @
90024d03
...
@@ -1952,7 +1952,7 @@ static DWORD CALLBACK ME_ReadFromHGLOBALUnicode(DWORD_PTR dwCookie, LPBYTE lpBuf
...
@@ -1952,7 +1952,7 @@ static DWORD CALLBACK ME_ReadFromHGLOBALUnicode(DWORD_PTR dwCookie, LPBYTE lpBuf
cb
=
cb
>>
1
;
cb
=
cb
>>
1
;
pDest
=
(
WORD
*
)
lpBuff
;
pDest
=
(
WORD
*
)
lpBuff
;
pSrc
=
(
WORD
*
)
GlobalLock
(
pData
->
hData
);
pSrc
=
GlobalLock
(
pData
->
hData
);
for
(
i
=
0
;
i
<
cb
&&
pSrc
[
pData
->
nLength
+
i
];
i
++
)
{
for
(
i
=
0
;
i
<
cb
&&
pSrc
[
pData
->
nLength
+
i
];
i
++
)
{
pDest
[
i
]
=
pSrc
[
pData
->
nLength
+
i
];
pDest
[
i
]
=
pSrc
[
pData
->
nLength
+
i
];
}
}
...
@@ -1969,7 +1969,7 @@ static DWORD CALLBACK ME_ReadFromHGLOBALRTF(DWORD_PTR dwCookie, LPBYTE lpBuff, L
...
@@ -1969,7 +1969,7 @@ static DWORD CALLBACK ME_ReadFromHGLOBALRTF(DWORD_PTR dwCookie, LPBYTE lpBuff, L
BYTE
*
pSrc
,
*
pDest
;
BYTE
*
pSrc
,
*
pDest
;
pDest
=
lpBuff
;
pDest
=
lpBuff
;
pSrc
=
(
BYTE
*
)
GlobalLock
(
pData
->
hData
);
pSrc
=
GlobalLock
(
pData
->
hData
);
for
(
i
=
0
;
i
<
cb
&&
pSrc
[
pData
->
nLength
+
i
];
i
++
)
{
for
(
i
=
0
;
i
<
cb
&&
pSrc
[
pData
->
nLength
+
i
];
i
++
)
{
pDest
[
i
]
=
pSrc
[
pData
->
nLength
+
i
];
pDest
[
i
]
=
pSrc
[
pData
->
nLength
+
i
];
}
}
...
@@ -4332,7 +4332,7 @@ static BOOL ME_RegisterEditorClass(HINSTANCE hInstance)
...
@@ -4332,7 +4332,7 @@ static BOOL ME_RegisterEditorClass(HINSTANCE hInstance)
wcW
.
hInstance
=
NULL
;
/* hInstance would register DLL-local class */
wcW
.
hInstance
=
NULL
;
/* hInstance would register DLL-local class */
wcW
.
hIcon
=
NULL
;
wcW
.
hIcon
=
NULL
;
wcW
.
hCursor
=
LoadCursorW
(
NULL
,
MAKEINTRESOURCEW
(
IDC_IBEAM
));
wcW
.
hCursor
=
LoadCursorW
(
NULL
,
MAKEINTRESOURCEW
(
IDC_IBEAM
));
wcW
.
hbrBackground
=
(
HBRUSH
)
GetStockObject
(
NULL_BRUSH
);
wcW
.
hbrBackground
=
GetStockObject
(
NULL_BRUSH
);
wcW
.
lpszMenuName
=
NULL
;
wcW
.
lpszMenuName
=
NULL
;
if
(
is_version_nt
())
if
(
is_version_nt
())
...
@@ -4358,7 +4358,7 @@ static BOOL ME_RegisterEditorClass(HINSTANCE hInstance)
...
@@ -4358,7 +4358,7 @@ static BOOL ME_RegisterEditorClass(HINSTANCE hInstance)
wcA
.
hInstance
=
NULL
;
/* hInstance would register DLL-local class */
wcA
.
hInstance
=
NULL
;
/* hInstance would register DLL-local class */
wcA
.
hIcon
=
NULL
;
wcA
.
hIcon
=
NULL
;
wcA
.
hCursor
=
LoadCursorW
(
NULL
,
MAKEINTRESOURCEW
(
IDC_IBEAM
));
wcA
.
hCursor
=
LoadCursorW
(
NULL
,
MAKEINTRESOURCEW
(
IDC_IBEAM
));
wcA
.
hbrBackground
=
(
HBRUSH
)
GetStockObject
(
NULL_BRUSH
);
wcA
.
hbrBackground
=
GetStockObject
(
NULL_BRUSH
);
wcA
.
lpszMenuName
=
NULL
;
wcA
.
lpszMenuName
=
NULL
;
wcA
.
lpszClassName
=
"RichEdit20A"
;
wcA
.
lpszClassName
=
"RichEdit20A"
;
if
(
!
RegisterClassA
(
&
wcA
))
return
FALSE
;
if
(
!
RegisterClassA
(
&
wcA
))
return
FALSE
;
...
@@ -4658,7 +4658,7 @@ BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, int sel_min, int sel_max)
...
@@ -4658,7 +4658,7 @@ BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, int sel_min, int sel_max)
{
{
if
(
sel_max
-
sel_min
<
prefixes
[
i
].
length
)
continue
;
if
(
sel_max
-
sel_min
<
prefixes
[
i
].
length
)
continue
;
if
(
bufferW
==
NULL
)
{
if
(
bufferW
==
NULL
)
{
bufferW
=
(
LPWSTR
)
heap_alloc
((
sel_max
-
sel_min
+
1
)
*
sizeof
(
WCHAR
));
bufferW
=
heap_alloc
((
sel_max
-
sel_min
+
1
)
*
sizeof
(
WCHAR
));
}
}
ME_GetTextW
(
editor
,
bufferW
,
sel_min
,
min
(
sel_max
-
sel_min
,
strlen
(
prefixes
[
i
].
text
)),
0
);
ME_GetTextW
(
editor
,
bufferW
,
sel_min
,
min
(
sel_max
-
sel_min
,
strlen
(
prefixes
[
i
].
text
)),
0
);
MultiByteToWideChar
(
CP_ACP
,
0
,
prefixes
[
i
].
text
,
-
1
,
bufW
,
32
);
MultiByteToWideChar
(
CP_ACP
,
0
,
prefixes
[
i
].
text
,
-
1
,
bufW
,
32
);
...
...
dlls/riched20/para.c
View file @
90024d03
...
@@ -38,7 +38,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
...
@@ -38,7 +38,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
ME_InitContext
(
&
c
,
editor
,
GetDC
(
editor
->
hWnd
));
ME_InitContext
(
&
c
,
editor
,
GetDC
(
editor
->
hWnd
));
hf
=
(
HFONT
)
GetStockObject
(
SYSTEM_FONT
);
hf
=
GetStockObject
(
SYSTEM_FONT
);
assert
(
hf
);
assert
(
hf
);
GetObjectW
(
hf
,
sizeof
(
LOGFONTW
),
&
lf
);
GetObjectW
(
hf
,
sizeof
(
LOGFONTW
),
&
lf
);
ZeroMemory
(
&
cf
,
sizeof
(
cf
));
ZeroMemory
(
&
cf
,
sizeof
(
cf
));
...
...
dlls/riched20/string.c
View file @
90024d03
...
@@ -342,7 +342,7 @@ ME_CallWordBreakProc(ME_TextEditor *editor, ME_String *str, INT start, INT code)
...
@@ -342,7 +342,7 @@ ME_CallWordBreakProc(ME_TextEditor *editor, ME_String *str, INT start, INT code)
int
result
;
int
result
;
int
buffer_size
=
WideCharToMultiByte
(
CP_ACP
,
0
,
str
->
szData
,
str
->
nLen
,
int
buffer_size
=
WideCharToMultiByte
(
CP_ACP
,
0
,
str
->
szData
,
str
->
nLen
,
NULL
,
0
,
NULL
,
NULL
);
NULL
,
0
,
NULL
,
NULL
);
char
*
buffer
=
(
char
*
)
heap_alloc
(
buffer_size
);
char
*
buffer
=
heap_alloc
(
buffer_size
);
WideCharToMultiByte
(
CP_ACP
,
0
,
str
->
szData
,
str
->
nLen
,
WideCharToMultiByte
(
CP_ACP
,
0
,
str
->
szData
,
str
->
nLen
,
buffer
,
buffer_size
,
NULL
,
NULL
);
buffer
,
buffer_size
,
NULL
,
NULL
);
result
=
editor
->
pfnWordBreak
(
str
->
szData
,
start
,
str
->
nLen
,
code
);
result
=
editor
->
pfnWordBreak
(
str
->
szData
,
start
,
str
->
nLen
,
code
);
...
...
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