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
7352ee84
Commit
7352ee84
authored
May 06, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
May 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added mbstowcs(_s_l) implementation.
parent
d367314b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
10 deletions
+99
-10
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+3
-3
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+3
-3
mbcs.c
dlls/msvcrt/mbcs.c
+89
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+4
-4
No files found.
dlls/msvcr80/msvcr80.spec
View file @
7352ee84
...
...
@@ -785,8 +785,8 @@
@ stub _mbstok_l
@ stub _mbstok_s
@ stub _mbstok_s_l
@
stub
_mbstowcs_l
@
stub
_mbstowcs_s_l
@
cdecl _mbstowcs_l(ptr str long ptr) msvcrt.
_mbstowcs_l
@
cdecl _mbstowcs_s_l(ptr ptr long str long ptr) msvcrt.
_mbstowcs_s_l
@ cdecl _mbstrlen(str) msvcrt._mbstrlen
@ stub _mbstrlen_l
@ stub _mbstrnlen
...
...
@@ -1330,7 +1330,7 @@
@ stub mbsrtowcs
@ stub mbsrtowcs_s
@ cdecl mbstowcs(ptr str long) msvcrt.mbstowcs
@
stub
mbstowcs_s
@
cdecl mbstowcs_s(ptr ptr long str long) msvcrt.
mbstowcs_s
@ cdecl mbtowc(wstr str long) msvcrt.mbtowc
@ cdecl memchr(ptr long long) msvcrt.memchr
@ cdecl memcmp(ptr ptr long) msvcrt.memcmp
...
...
dlls/msvcr90/msvcr90.spec
View file @
7352ee84
...
...
@@ -773,8 +773,8 @@
@ stub _mbstok_l
@ stub _mbstok_s
@ stub _mbstok_s_l
@
stub
_mbstowcs_l
@
stub
_mbstowcs_s_l
@
cdecl _mbstowcs_l(ptr str long ptr) msvcrt.
_mbstowcs_l
@
cdecl _mbstowcs_s_l(ptr ptr long str long ptr) msvcrt.
_mbstowcs_s_l
@ cdecl _mbstrlen(str) msvcrt._mbstrlen
@ stub _mbstrlen_l
@ stub _mbstrnlen
...
...
@@ -1314,7 +1314,7 @@
@ stub mbsrtowcs
@ stub mbsrtowcs_s
@ cdecl mbstowcs(ptr str long) msvcrt.mbstowcs
@
stub
mbstowcs_s
@
cdecl mbstowcs_s(ptr ptr long str long) msvcrt.
mbstowcs_s
@ cdecl mbtowc(wstr str long) msvcrt.mbtowc
@ cdecl memchr(ptr long long) msvcrt.memchr
@ cdecl memcmp(ptr ptr long) msvcrt.memcmp
...
...
dlls/msvcrt/mbcs.c
View file @
7352ee84
...
...
@@ -1718,3 +1718,92 @@ MSVCRT_size_t CDECL _mbstrlen(const char* str)
{
return
_mbstrlen_l
(
str
,
NULL
);
}
/*********************************************************************
* _mbstowcs_l(MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT__mbstowcs_l
(
MSVCRT_wchar_t
*
wcstr
,
const
char
*
mbstr
,
MSVCRT_size_t
count
,
MSVCRT__locale_t
locale
)
{
MSVCRT_size_t
tmp
;
if
(
!
locale
)
locale
=
get_locale
();
tmp
=
_mbstrlen_l
(
mbstr
,
locale
);
if
(
tmp
>
count
&&
wcstr
)
tmp
=
count
;
tmp
=
MultiByteToWideChar
(
locale
->
locinfo
->
lc_codepage
,
0
,
mbstr
,
tmp
,
wcstr
,
count
);
if
(
tmp
<
count
&&
wcstr
)
wcstr
[
tmp
]
=
'\0'
;
return
tmp
;
}
/*********************************************************************
* mbstowcs(MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_mbstowcs
(
MSVCRT_wchar_t
*
wcstr
,
const
char
*
mbstr
,
MSVCRT_size_t
count
)
{
return
MSVCRT__mbstowcs_l
(
wcstr
,
mbstr
,
count
,
NULL
);
}
/*********************************************************************
* _mbstowcs_s_l(MSVCRT.@)
*/
int
CDECL
MSVCRT__mbstowcs_s_l
(
MSVCRT_size_t
*
ret
,
MSVCRT_wchar_t
*
wcstr
,
MSVCRT_size_t
size
,
const
char
*
mbstr
,
MSVCRT_size_t
count
,
MSVCRT__locale_t
locale
)
{
MSVCRT_size_t
conv
;
if
(
!
wcstr
&&
!
size
)
{
conv
=
MSVCRT__mbstowcs_l
(
NULL
,
mbstr
,
0
,
locale
);
if
(
ret
)
*
ret
=
conv
;
return
0
;
}
if
(
!
mbstr
||
!
wcstr
)
{
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
if
(
wcstr
&&
size
)
wcstr
[
0
]
=
'\0'
;
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
MSVCRT_EINVAL
;
}
if
(
count
==
_TRUNCATE
||
size
<
count
)
conv
=
size
;
else
conv
=
count
;
conv
=
MSVCRT__mbstowcs_l
(
wcstr
,
mbstr
,
conv
,
locale
);
if
(
conv
<
size
)
wcstr
[
conv
++
]
=
'\0'
;
else
if
(
conv
==
size
&&
(
count
==
_TRUNCATE
||
wcstr
[
conv
-
1
]
==
'\0'
))
wcstr
[
conv
-
1
]
=
'\0'
;
else
{
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
if
(
size
)
wcstr
[
0
]
=
'\0'
;
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
return
MSVCRT_ERANGE
;
}
if
(
ret
)
*
ret
=
conv
;
return
0
;
}
/*********************************************************************
* mbstowcs_s(MSVCRT.@)
*/
int
CDECL
MSVCRT__mbstowcs_s
(
MSVCRT_size_t
*
ret
,
MSVCRT_wchar_t
*
wcstr
,
MSVCRT_size_t
size
,
const
char
*
mbstr
,
MSVCRT_size_t
count
)
{
return
MSVCRT__mbstowcs_s_l
(
ret
,
wcstr
,
size
,
mbstr
,
count
,
NULL
);
}
dlls/msvcrt/msvcrt.spec
View file @
7352ee84
...
...
@@ -731,8 +731,8 @@
# stub _mbstok_l
# stub _mbstok_s
# stub _mbstok_s_l
# stub
_mbstowcs_l
# stub
_mbstowcs_s_l
@ cdecl _mbstowcs_l(ptr str long ptr) MSVCRT_
_mbstowcs_l
@ cdecl _mbstowcs_s_l(ptr ptr long str long ptr) MSVCRT_
_mbstowcs_s_l
@ cdecl _mbstrlen(str)
@ cdecl _mbstrlen_l(str ptr)
# stub _mbstrnlen
...
...
@@ -1277,8 +1277,8 @@
# stub mbsdup_dbg
# stub mbsrtowcs
# stub mbsrtowcs_s
@ cdecl mbstowcs(ptr str long)
ntdll.
mbstowcs
# stub
mbstowcs_s
@ cdecl mbstowcs(ptr str long)
MSVCRT_
mbstowcs
@ cdecl mbstowcs_s(ptr ptr long str long) MSVCRT__
mbstowcs_s
@ cdecl mbtowc(wstr str long) MSVCRT_mbtowc
@ cdecl memchr(ptr long long) ntdll.memchr
@ cdecl memcmp(ptr ptr long) ntdll.memcmp
...
...
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