Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
09699142
Commit
09699142
authored
16 years ago
by
eric pouech
Committed by
Alexandre Julliard
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msvcrt: Implemented wcsncpy_s.
parent
6d652ddc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/msvcrt/msvcrt.spec
+1
-0
1 addition, 0 deletions
dlls/msvcrt/msvcrt.spec
dlls/msvcrt/wcs.c
+31
-0
31 additions, 0 deletions
dlls/msvcrt/wcs.c
with
32 additions
and
0 deletions
dlls/msvcrt/msvcrt.spec
+
1
−
0
View file @
09699142
...
...
@@ -772,6 +772,7 @@
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncmp(wstr wstr long) ntdll.wcsncmp
@ cdecl wcsncpy(ptr wstr long) ntdll.wcsncpy
@ cdecl wcsncpy_s(ptr long wstr long) MSVCRT_wcsncpy_s
@ cdecl wcspbrk(wstr wstr) MSVCRT_wcspbrk
@ cdecl wcsrchr(wstr long) ntdll.wcsrchr
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
...
...
This diff is collapsed.
Click to expand it.
dlls/msvcrt/wcs.c
+
31
−
0
View file @
09699142
...
...
@@ -1046,3 +1046,34 @@ INT CDECL MSVCRT_wcscpy_s( MSVCRT_wchar_t* wcDest, MSVCRT_size_t numElement, con
return
0
;
}
/******************************************************************
* wcsncpy_s (MSVCRT.@)
*/
INT
CDECL
MSVCRT_wcsncpy_s
(
MSVCRT_wchar_t
*
wcDest
,
MSVCRT_size_t
numElement
,
const
MSVCRT_wchar_t
*
wcSrc
,
MSVCRT_size_t
count
)
{
INT
size
=
0
;
if
(
!
wcDest
||
!
numElement
)
return
MSVCRT_EINVAL
;
wcDest
[
0
]
=
0
;
if
(
!
wcSrc
)
{
return
MSVCRT_EINVAL
;
}
size
=
min
(
strlenW
(
wcSrc
),
count
);
if
(
size
>=
numElement
)
{
return
MSVCRT_ERANGE
;
}
memcpy
(
wcDest
,
wcSrc
,
size
*
sizeof
(
WCHAR
)
);
wcDest
[
size
]
=
'\0'
;
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment