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
1077d0cd
Commit
1077d0cd
authored
Nov 14, 1999
by
Marcus Meissner
Committed by
Alexandre Julliard
Nov 14, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around glibc bug, that does not handle latin-1 umlauts.
parent
eb94c7d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
wcstring.c
dlls/crtdll/wcstring.c
+22
-11
No files found.
dlls/crtdll/wcstring.c
View file @
1077d0cd
...
@@ -372,22 +372,33 @@ LPWSTR __cdecl CRTDLL_wcstok( LPWSTR str, LPCWSTR delim )
...
@@ -372,22 +372,33 @@ LPWSTR __cdecl CRTDLL_wcstok( LPWSTR str, LPCWSTR delim )
/*********************************************************************
/*********************************************************************
* CRTDLL_wcstombs (CRTDLL.521)
* CRTDLL_wcstombs (CRTDLL.521)
*
* FIXME: the reason I do not use wcstombs is that it seems to fail
* for any latin-1 valid character. Not good.
*/
*/
INT
__cdecl
CRTDLL_wcstombs
(
LPSTR
dst
,
LPCWSTR
src
,
INT
n
)
INT
__cdecl
CRTDLL_wcstombs
(
LPSTR
dst
,
LPCWSTR
src
,
INT
n
)
{
{
wchar_t
*
buffer
,
*
p
;
int
copied
=
0
;
int
ret
;
while
((
n
>
0
)
&&
*
src
)
{
int
ret
;
int
size
=
(
CRTDLL_wcslen
(
src
)
+
1
)
*
sizeof
(
wchar_t
);
/* FIXME: could potentially overflow if we ever have MB of 2 bytes*/
if
(
!
(
buffer
=
CRTDLL_malloc
(
size
)))
return
-
1
;
ret
=
wctomb
(
dst
,(
wchar_t
)
*
src
);
p
=
buffer
;
if
(
ret
<
0
)
{
while
((
*
p
++
=
(
wchar_t
)
*
src
++
));
/* FIXME: sadly, some versions of glibc do not like latin characters
ret
=
wcstombs
(
dst
,
buffer
,
n
);
* as UNICODE chars for some reason (like german umlauts). Just
CRTDLL_free
(
buffer
);
* copy those anyway. MM 991106
return
ret
;
*/
*
dst
=*
src
;
ret
=
1
;
}
dst
+=
ret
;
n
-=
ret
;
copied
+=
ret
;
src
++
;
}
return
copied
;
}
}
/*********************************************************************
/*********************************************************************
* CRTDLL_wctomb (CRTDLL.524)
* CRTDLL_wctomb (CRTDLL.524)
*/
*/
...
...
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