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
49197e81
Commit
49197e81
authored
Oct 20, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Oct 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Rename some confusingly-named variables.
parent
c7f8e71a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
clipboard.c
dlls/winemac.drv/clipboard.c
+17
-17
No files found.
dlls/winemac.drv/clipboard.c
View file @
49197e81
...
...
@@ -918,25 +918,25 @@ static HANDLE import_utf8_to_text(CFDataRef data)
static
HANDLE
import_utf8_to_unicodetext
(
CFDataRef
data
)
{
const
BYTE
*
src
;
unsigned
long
data
_len
;
unsigned
long
src
_len
;
unsigned
long
new_lines
=
0
;
LPSTR
dst
;
unsigned
long
i
,
j
;
HANDLE
unicode_handle
=
NULL
;
src
=
CFDataGetBytePtr
(
data
);
data
_len
=
CFDataGetLength
(
data
);
for
(
i
=
0
;
i
<
data
_len
;
i
++
)
src
_len
=
CFDataGetLength
(
data
);
for
(
i
=
0
;
i
<
src
_len
;
i
++
)
{
if
(
src
[
i
]
==
'\n'
)
new_lines
++
;
}
if
((
dst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
data
_len
+
new_lines
+
1
)))
if
((
dst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
src
_len
+
new_lines
+
1
)))
{
UINT
count
;
for
(
i
=
0
,
j
=
0
;
i
<
data
_len
;
i
++
)
for
(
i
=
0
,
j
=
0
;
i
<
src
_len
;
i
++
)
{
if
(
src
[
i
]
==
'\n'
)
dst
[
j
++
]
=
'\r'
;
...
...
@@ -1000,25 +1000,25 @@ static HANDLE import_utf16_to_text(CFDataRef data)
static
HANDLE
import_utf16_to_unicodetext
(
CFDataRef
data
)
{
const
WCHAR
*
src
;
unsigned
long
data
_len
;
unsigned
long
src
_len
;
unsigned
long
new_lines
=
0
;
LPWSTR
dst
;
unsigned
long
i
,
j
;
HANDLE
unicode_handle
;
src
=
(
const
WCHAR
*
)
CFDataGetBytePtr
(
data
);
data
_len
=
CFDataGetLength
(
data
)
/
sizeof
(
WCHAR
);
for
(
i
=
0
;
i
<
data
_len
;
i
++
)
src
_len
=
CFDataGetLength
(
data
)
/
sizeof
(
WCHAR
);
for
(
i
=
0
;
i
<
src
_len
;
i
++
)
{
if
(
src
[
i
]
==
'\n'
)
new_lines
++
;
}
if
((
unicode_handle
=
GlobalAlloc
(
GMEM_MOVEABLE
|
GMEM_DDESHARE
,
(
data
_len
+
new_lines
+
1
)
*
sizeof
(
WCHAR
))))
if
((
unicode_handle
=
GlobalAlloc
(
GMEM_MOVEABLE
|
GMEM_DDESHARE
,
(
src
_len
+
new_lines
+
1
)
*
sizeof
(
WCHAR
))))
{
dst
=
GlobalLock
(
unicode_handle
);
for
(
i
=
0
,
j
=
0
;
i
<
data
_len
;
i
++
)
for
(
i
=
0
,
j
=
0
;
i
<
src
_len
;
i
++
)
{
if
(
src
[
i
]
==
'\n'
)
dst
[
j
++
]
=
'\r'
;
...
...
@@ -1351,27 +1351,27 @@ static CFDataRef export_unicodetext_to_utf16(HANDLE data)
{
CFMutableDataRef
ret
;
const
WCHAR
*
src
;
INT
dst
_len
;
INT
src
_len
;
src
=
GlobalLock
(
data
);
if
(
!
src
)
return
NULL
;
dst
_len
=
GlobalSize
(
data
)
/
sizeof
(
WCHAR
);
if
(
dst_len
)
dst
_len
--
;
/* Leave off null terminator. */
ret
=
CFDataCreateMutable
(
NULL
,
dst
_len
*
sizeof
(
WCHAR
));
src
_len
=
GlobalSize
(
data
)
/
sizeof
(
WCHAR
);
if
(
src_len
)
src
_len
--
;
/* Leave off null terminator. */
ret
=
CFDataCreateMutable
(
NULL
,
src
_len
*
sizeof
(
WCHAR
));
if
(
ret
)
{
LPWSTR
dst
;
int
i
,
j
;
CFDataSetLength
(
ret
,
dst
_len
*
sizeof
(
WCHAR
));
CFDataSetLength
(
ret
,
src
_len
*
sizeof
(
WCHAR
));
dst
=
(
LPWSTR
)
CFDataGetMutableBytePtr
(
ret
);
/* Remove carriage returns */
for
(
i
=
0
,
j
=
0
;
i
<
dst
_len
;
i
++
)
for
(
i
=
0
,
j
=
0
;
i
<
src
_len
;
i
++
)
{
if
(
src
[
i
]
==
'\r'
&&
(
i
+
1
>=
dst
_len
||
src
[
i
+
1
]
==
'\n'
||
src
[
i
+
1
]
==
'\0'
))
(
i
+
1
>=
src
_len
||
src
[
i
+
1
]
==
'\n'
||
src
[
i
+
1
]
==
'\0'
))
continue
;
dst
[
j
++
]
=
src
[
i
];
}
...
...
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