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
f097c2be
Commit
f097c2be
authored
Oct 05, 2017
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add mbsnlen_l implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bce8330f
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
33 deletions
+68
-33
api-ms-win-crt-multibyte-l1-1-0.spec
...crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec
+3
-3
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+3
-3
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+3
-3
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+3
-3
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+3
-3
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+3
-3
mbcs.c
dlls/msvcrt/mbcs.c
+44
-9
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+3
-3
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+3
-3
No files found.
dlls/api-ms-win-crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec
View file @
f097c2be
...
...
@@ -112,7 +112,7 @@
@ cdecl _mbsinc(str) ucrtbase._mbsinc
@ stub _mbsinc_l
@ cdecl _mbslen(str) ucrtbase._mbslen
@
stub
_mbslen_l
@
cdecl _mbslen_l(str ptr) ucrtbase.
_mbslen_l
@ cdecl _mbslwr(str) ucrtbase._mbslwr
@ stub _mbslwr_l
@ cdecl _mbslwr_s(str long) ucrtbase._mbslwr_s
...
...
@@ -161,8 +161,8 @@
@ stub _mbsnicoll_l
@ cdecl _mbsninc(str long) ucrtbase._mbsninc
@ stub _mbsninc_l
@
stub
_mbsnlen
@
stub
_mbsnlen_l
@
cdecl _mbsnlen(str long) ucrtbase.
_mbsnlen
@
cdecl _mbsnlen_l(str long ptr) ucrtbase.
_mbsnlen_l
@ cdecl _mbsnset(ptr long long) ucrtbase._mbsnset
@ stub _mbsnset_l
@ stub _mbsnset_s
...
...
dlls/msvcr100/msvcr100.spec
View file @
f097c2be
...
...
@@ -1118,7 +1118,7 @@
@ cdecl _mbsinc(str)
@ stub _mbsinc_l
@ cdecl _mbslen(str)
@
stub _mbslen_l
@
cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_s(str long)
...
...
@@ -1167,8 +1167,8 @@
@ stub _mbsnicoll_l
@ cdecl _mbsninc(str long)
@ stub _mbsninc_l
@
stub _mbsnlen
@
stub _mbsnlen_l
@
cdecl _mbsnlen(str long)
@
cdecl _mbsnlen_l(str long ptr)
@ cdecl _mbsnset(ptr long long)
@ stub _mbsnset_l
@ stub _mbsnset_s
...
...
dlls/msvcr110/msvcr110.spec
View file @
f097c2be
...
...
@@ -1475,7 +1475,7 @@
@ cdecl _mbsinc(str)
@ stub _mbsinc_l
@ cdecl _mbslen(str)
@
stub _mbslen_l
@
cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_s(str long)
...
...
@@ -1524,8 +1524,8 @@
@ stub _mbsnicoll_l
@ cdecl _mbsninc(str long)
@ stub _mbsninc_l
@
stub _mbsnlen
@
stub _mbsnlen_l
@
cdecl _mbsnlen(str long)
@
cdecl _mbsnlen_l(str long ptr)
@ cdecl _mbsnset(ptr long long)
@ stub _mbsnset_l
@ stub _mbsnset_s
...
...
dlls/msvcr120/msvcr120.spec
View file @
f097c2be
...
...
@@ -1485,7 +1485,7 @@
@ cdecl _mbsinc(str)
@ stub _mbsinc_l
@ cdecl _mbslen(str)
@
stub _mbslen_l
@
cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_s(str long)
...
...
@@ -1534,8 +1534,8 @@
@ stub _mbsnicoll_l
@ cdecl _mbsninc(str long)
@ stub _mbsninc_l
@
stub _mbsnlen
@
stub _mbsnlen_l
@
cdecl _mbsnlen(str long)
@
cdecl _mbsnlen_l(str long ptr)
@ cdecl _mbsnset(ptr long long)
@ stub _mbsnset_l
@ stub _mbsnset_s
...
...
dlls/msvcr80/msvcr80.spec
View file @
f097c2be
...
...
@@ -790,7 +790,7 @@
@ cdecl _mbsinc(str)
@ stub _mbsinc_l
@ cdecl _mbslen(str)
@
stub _mbslen_l
@
cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_s(str long)
...
...
@@ -839,8 +839,8 @@
@ stub _mbsnicoll_l
@ cdecl _mbsninc(str long)
@ stub _mbsninc_l
@
stub _mbsnlen
@
stub _mbsnlen_l
@
cdecl _mbsnlen(str long)
@
cdecl _mbsnlen_l(str long ptr)
@ cdecl _mbsnset(ptr long long)
@ stub _mbsnset_l
@ stub _mbsnset_s
...
...
dlls/msvcr90/msvcr90.spec
View file @
f097c2be
...
...
@@ -768,7 +768,7 @@
@ cdecl _mbsinc(str)
@ stub _mbsinc_l
@ cdecl _mbslen(str)
@
stub _mbslen_l
@
cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_s(str long)
...
...
@@ -817,8 +817,8 @@
@ stub _mbsnicoll_l
@ cdecl _mbsninc(str long)
@ stub _mbsninc_l
@
stub _mbsnlen
@
stub _mbsnlen_l
@
cdecl _mbsnlen(str long)
@
cdecl _mbsnlen_l(str long ptr)
@ cdecl _mbsnset(ptr long long)
@ stub _mbsnset_l
@ stub _mbsnset_s
...
...
dlls/msvcrt/mbcs.c
View file @
f097c2be
...
...
@@ -569,23 +569,58 @@ unsigned char* CDECL _mbsninc(const unsigned char* str, MSVCRT_size_t num)
}
/*********************************************************************
*
_mbslen
(MSVCRT.@)
*
_mbsnlen_l
(MSVCRT.@)
*/
MSVCRT_size_t
CDECL
_mbslen
(
const
unsigned
char
*
str
)
MSVCRT_size_t
CDECL
_mbsnlen_l
(
const
unsigned
char
*
str
,
MSVCRT_size_t
maxsize
,
MSVCRT__locale_t
locale
)
{
MSVCRT_size_t
len
=
0
;
while
(
*
str
)
MSVCRT_pthreadmbcinfo
mbcinfo
;
MSVCRT_size_t
i
=
0
,
len
=
0
;
if
(
!
locale
)
mbcinfo
=
get_mbcinfo
();
else
mbcinfo
=
locale
->
mbcinfo
;
if
(
!
mbcinfo
->
ismbcodepage
)
return
MSVCRT_strnlen
((
const
char
*
)
str
,
maxsize
);
while
(
i
<
maxsize
&&
str
[
i
])
{
if
(
_ismbblead
(
*
str
))
if
(
_ismbblead_l
(
str
[
i
],
locale
))
{
str
++
;
if
(
!*
str
)
/* count only full chars */
i
++
;
if
(
!
str
[
i
]
)
/* count only full chars */
break
;
}
str
++
;
i
++
;
len
++
;
}
return
len
;
return
i
<
maxsize
?
len
:
maxsize
;
}
/*********************************************************************
* _mbslen(MSVCRT.@)
*/
MSVCRT_size_t
CDECL
_mbslen
(
const
unsigned
char
*
str
)
{
return
_mbsnlen_l
(
str
,
-
1
,
NULL
);
}
/*********************************************************************
* _mbslen_l(MSVCRT.@)
*/
MSVCRT_size_t
CDECL
_mbslen_l
(
const
unsigned
char
*
str
,
MSVCRT__locale_t
locale
)
{
return
_mbsnlen_l
(
str
,
-
1
,
locale
);
}
/*********************************************************************
* _mbsnlen(MSVCRT.@)
*/
MSVCRT_size_t
CDECL
_mbsnlen
(
const
unsigned
char
*
str
,
MSVCRT_size_t
maxsize
)
{
return
_mbsnlen_l
(
str
,
maxsize
,
NULL
);
}
/*********************************************************************
...
...
dlls/msvcrt/msvcrt.spec
View file @
f097c2be
...
...
@@ -737,7 +737,7 @@
@ cdecl _mbsinc(str)
# stub _mbsinc_l(str ptr)
@ cdecl _mbslen(str)
# stub
_mbslen_l(str ptr)
@ cdecl
_mbslen_l(str ptr)
@ cdecl _mbslwr(str)
# stub _mbslwr_l(str ptr)
@ cdecl _mbslwr_s(str long)
...
...
@@ -786,8 +786,8 @@
# stub _mbsnicoll_l(str str long ptr)
@ cdecl _mbsninc(str long)
# stub _mbsninc_l(str long ptr)
# stub
_mbsnlen(str long)
# stub
_mbsnlen_l(str long ptr)
@ cdecl
_mbsnlen(str long)
@ cdecl
_mbsnlen_l(str long ptr)
@ cdecl _mbsnset(ptr long long)
# stub _mbsnset_l(ptr long long ptr)
# stub _mbsnset_s(ptr long long long)
...
...
dlls/ucrtbase/ucrtbase.spec
View file @
f097c2be
...
...
@@ -631,7 +631,7 @@
@ cdecl _mbsinc(str)
@ stub _mbsinc_l
@ cdecl _mbslen(str)
@
stub _mbslen_l
@
cdecl _mbslen_l(str ptr)
@ cdecl _mbslwr(str)
@ stub _mbslwr_l
@ cdecl _mbslwr_s(str long)
...
...
@@ -680,8 +680,8 @@
@ stub _mbsnicoll_l
@ cdecl _mbsninc(str long)
@ stub _mbsninc_l
@
stub _mbsnlen
@
stub _mbsnlen_l
@
cdecl _mbsnlen(str long)
@
cdecl _mbsnlen_l(str long ptr)
@ cdecl _mbsnset(ptr long long)
@ stub _mbsnset_l
@ stub _mbsnset_s
...
...
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