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
bf9ac906
Commit
bf9ac906
authored
Nov 06, 2023
by
Bartosz Kosiorek
Committed by
Alexandre Julliard
Nov 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add _mbsnbcpy_l implementation.
parent
a6ed3d55
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
32 deletions
+51
-32
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
mbcs.c
dlls/msvcrt/mbcs.c
+43
-24
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+2
-2
No files found.
dlls/msvcr100/msvcr100.spec
View file @
bf9ac906
...
...
@@ -1134,7 +1134,7 @@
@ cdecl _mbsnbcoll(str str long)
@ cdecl _mbsnbcoll_l(str str long ptr)
@ cdecl _mbsnbcpy(ptr str long)
@
stub _mbsnbcpy_l
@
cdecl _mbsnbcpy_l(ptr str long ptr)
@ cdecl _mbsnbcpy_s(ptr long str long)
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
...
...
dlls/msvcr110/msvcr110.spec
View file @
bf9ac906
...
...
@@ -1491,7 +1491,7 @@
@ cdecl _mbsnbcoll(str str long)
@ cdecl _mbsnbcoll_l(str str long ptr)
@ cdecl _mbsnbcpy(ptr str long)
@
stub _mbsnbcpy_l
@
cdecl _mbsnbcpy_l(ptr str long ptr)
@ cdecl _mbsnbcpy_s(ptr long str long)
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
...
...
dlls/msvcr120/msvcr120.spec
View file @
bf9ac906
...
...
@@ -1502,7 +1502,7 @@
@ cdecl _mbsnbcoll(str str long)
@ cdecl _mbsnbcoll_l(str str long ptr)
@ cdecl _mbsnbcpy(ptr str long)
@
stub _mbsnbcpy_l
@
cdecl _mbsnbcpy_l(ptr str long ptr)
@ cdecl _mbsnbcpy_s(ptr long str long)
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
...
...
dlls/msvcr80/msvcr80.spec
View file @
bf9ac906
...
...
@@ -806,7 +806,7 @@
@ cdecl _mbsnbcoll(str str long)
@ cdecl _mbsnbcoll_l(str str long ptr)
@ cdecl _mbsnbcpy(ptr str long)
@
stub _mbsnbcpy_l
@
cdecl _mbsnbcpy_l(ptr str long ptr)
@ cdecl _mbsnbcpy_s(ptr long str long)
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
...
...
dlls/msvcr90/msvcr90.spec
View file @
bf9ac906
...
...
@@ -784,7 +784,7 @@
@ cdecl _mbsnbcoll(str str long)
@ cdecl _mbsnbcoll_l(str str long ptr)
@ cdecl _mbsnbcpy(ptr str long)
@
stub _mbsnbcpy_l
@
cdecl _mbsnbcpy_l(ptr str long ptr)
@ cdecl _mbsnbcpy_s(ptr long str long)
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
...
...
dlls/msvcrt/mbcs.c
View file @
bf9ac906
...
...
@@ -993,39 +993,58 @@ int CDECL _mbscpy_s(unsigned char *dst, size_t size, const unsigned char *src)
}
/*********************************************************************
* _mbsnbcpy(MSVCRT.@)
* _mbsnbcpy
_l
(MSVCRT.@)
* REMARKS
* Like strncpy this function doesn't enforce the string to be
* NUL-terminated
*/
unsigned
char
*
CDECL
_mbsnbcpy
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
size_t
n
)
unsigned
char
*
CDECL
_mbsnbcpy
_l
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
size_t
n
,
_locale_t
locale
)
{
unsigned
char
*
ret
=
dst
;
if
(
!
n
)
return
dst
;
if
(
get_mbcinfo
()
->
ismbcodepage
)
{
BOOL
is_lead
=
FALSE
;
while
(
*
src
&&
n
)
unsigned
char
*
ret
=
dst
;
pthreadmbcinfo
mbcinfo
;
if
(
!
n
)
return
dst
;
if
(
!
MSVCRT_CHECK_PMT
(
dst
&&
src
))
return
NULL
;
if
(
locale
)
mbcinfo
=
locale
->
mbcinfo
;
else
mbcinfo
=
get_mbcinfo
();
if
(
mbcinfo
->
ismbcodepage
)
{
is_lead
=
(
!
is_lead
&&
_ismbblead
(
*
src
));
n
--
;
*
dst
++
=
*
src
++
;
}
BOOL
is_lead
=
FALSE
;
while
(
*
src
&&
n
)
{
is_lead
=
(
!
is_lead
&&
_ismbblead_l
(
*
src
,
locale
));
n
--
;
*
dst
++
=
*
src
++
;
}
if
(
is_lead
)
/* if string ends with a lead, remove it */
*
(
dst
-
1
)
=
0
;
}
else
{
while
(
n
)
if
(
is_lead
)
/* if string ends with a lead, remove it */
*
(
dst
-
1
)
=
0
;
}
else
{
n
--
;
if
(
!
(
*
dst
++
=
*
src
++
))
break
;
while
(
n
)
{
n
--
;
if
(
!
(
*
dst
++
=
*
src
++
))
break
;
}
}
}
while
(
n
--
)
*
dst
++
=
0
;
return
ret
;
while
(
n
--
)
*
dst
++
=
0
;
return
ret
;
}
/*********************************************************************
* _mbsnbcpy(MSVCRT.@)
* REMARKS
* Like strncpy this function doesn't enforce the string to be
* NUL-terminated
*/
unsigned
char
*
CDECL
_mbsnbcpy
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
size_t
n
)
{
return
_mbsnbcpy_l
(
dst
,
src
,
n
,
NULL
);
}
/*********************************************************************
...
...
dlls/msvcrt/msvcrt.spec
View file @
bf9ac906
...
...
@@ -755,7 +755,7 @@
@ cdecl _mbsnbcoll(str str long)
@ cdecl _mbsnbcoll_l(str str long ptr)
@ cdecl _mbsnbcpy(ptr str long)
# stub
_mbsnbcpy_l(ptr str long ptr)
@ cdecl
_mbsnbcpy_l(ptr str long ptr)
@ cdecl _mbsnbcpy_s(ptr long str long)
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
...
...
dlls/ucrtbase/ucrtbase.spec
View file @
bf9ac906
...
...
@@ -650,7 +650,7 @@
@ cdecl _mbsnbcoll(str str long)
@ cdecl _mbsnbcoll_l(str str long ptr)
@ cdecl _mbsnbcpy(ptr str long)
@
stub _mbsnbcpy_l
@
cdecl _mbsnbcpy_l(ptr str long ptr)
@ cdecl _mbsnbcpy_s(ptr long str long)
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
...
...
@@ -1219,7 +1219,7 @@
@ cdecl _o__mbsnbcoll(str str long) _mbsnbcoll
@ cdecl _o__mbsnbcoll_l(str str long ptr) _mbsnbcoll_l
@ cdecl _o__mbsnbcpy(ptr str long) _mbsnbcpy
@
stub _o_
_mbsnbcpy_l
@
cdecl _o__mbsnbcpy_l(ptr str long ptr)
_mbsnbcpy_l
@ cdecl _o__mbsnbcpy_s(ptr long str long) _mbsnbcpy_s
@ cdecl _o__mbsnbcpy_s_l(ptr long str long ptr) _mbsnbcpy_s_l
@ cdecl _o__mbsnbicmp(str str long) _mbsnbicmp
...
...
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