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
37cf8dc5
Commit
37cf8dc5
authored
Nov 15, 2010
by
Eryk Wieliczko
Committed by
Alexandre Julliard
Nov 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implement strncat_s.
parent
745126b0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
4 deletions
+43
-4
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
string.c
dlls/msvcrt/string.c
+38
-0
string.h
include/msvcrt/string.h
+1
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
37cf8dc5
...
...
@@ -1585,7 +1585,7 @@
@ cdecl strftime(str long str ptr) msvcrt.strftime
@ cdecl strlen(str) msvcrt.strlen
@ cdecl strncat(str str long) msvcrt.strncat
@
stub
strncat_s
@
cdecl strncat_s(str long str long) msvcrt.
strncat_s
@ cdecl strncmp(str str long) msvcrt.strncmp
@ cdecl strncpy(ptr str long) msvcrt.strncpy
@ cdecl strncpy_s(ptr long str long) msvcrt.strncpy_s
...
...
dlls/msvcr80/msvcr80.spec
View file @
37cf8dc5
...
...
@@ -1439,7 +1439,7 @@
@ cdecl strftime(str long str ptr) msvcrt.strftime
@ cdecl strlen(str) msvcrt.strlen
@ cdecl strncat(str str long) msvcrt.strncat
@
stub
strncat_s
@
cdecl strncat_s(str long str long) msvcrt.
strncat_s
@ cdecl strncmp(str str long) msvcrt.strncmp
@ cdecl strncpy(ptr str long) msvcrt.strncpy
@ cdecl strncpy_s(ptr long str long) msvcrt.strncpy_s
...
...
dlls/msvcr90/msvcr90.spec
View file @
37cf8dc5
...
...
@@ -1423,7 +1423,7 @@
@ cdecl strftime(str long str ptr) msvcrt.strftime
@ cdecl strlen(str) msvcrt.strlen
@ cdecl strncat(str str long) msvcrt.strncat
@
stub
strncat_s
@
cdecl strncat_s(str long str long) msvcrt.
strncat_s
@ cdecl strncmp(str str long) msvcrt.strncmp
@ cdecl strncpy(ptr str long) msvcrt.strncpy
@ cdecl strncpy_s(ptr long str long) msvcrt.strncpy_s
...
...
dlls/msvcrt/msvcrt.spec
View file @
37cf8dc5
...
...
@@ -1384,7 +1384,7 @@
@ cdecl strftime(str long str ptr) MSVCRT_strftime
@ cdecl strlen(str) ntdll.strlen
@ cdecl strncat(str str long) ntdll.strncat
# stub
strncat_s
@ cdecl strncat_s(str long str long) MSVCRT_
strncat_s
@ cdecl strncmp(str str long) ntdll.strncmp
@ cdecl strncpy(ptr str long) ntdll.strncpy
@ cdecl strncpy_s(ptr long str long)
...
...
dlls/msvcrt/string.c
View file @
37cf8dc5
...
...
@@ -393,6 +393,44 @@ int CDECL MSVCRT_strcat_s( char* dst, MSVCRT_size_t elem, const char* src )
}
/*********************************************************************
* strncat_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_strncat_s
(
char
*
dst
,
MSVCRT_size_t
elem
,
const
char
*
src
,
MSVCRT_size_t
count
)
{
MSVCRT_size_t
i
,
j
;
if
(
!
MSVCRT_CHECK_PMT
(
dst
!=
0
)
||
!
MSVCRT_CHECK_PMT
(
elem
!=
0
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
src
!=
0
))
{
dst
[
0
]
=
'\0'
;
return
MSVCRT_EINVAL
;
}
for
(
i
=
0
;
i
<
elem
;
i
++
)
{
if
(
dst
[
i
]
==
'\0'
)
{
for
(
j
=
0
;
(
j
+
i
)
<
elem
;
j
++
)
{
if
(
count
==
MSVCRT__TRUNCATE
&&
j
+
i
==
elem
-
1
)
{
dst
[
j
+
i
]
=
'\0'
;
return
MSVCRT_STRUNCATE
;
}
if
(
j
==
count
||
(
dst
[
j
+
i
]
=
src
[
j
])
==
'\0'
)
{
dst
[
j
+
i
]
=
'\0'
;
return
0
;
}
}
}
}
/* Set the first element to 0, not the first element after the skipped part */
dst
[
0
]
=
'\0'
;
return
MSVCRT_ERANGE
;
}
/*********************************************************************
* strxfrm (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_strxfrm
(
char
*
dest
,
const
char
*
src
,
MSVCRT_size_t
len
)
...
...
include/msvcrt/string.h
View file @
37cf8dc5
...
...
@@ -68,6 +68,7 @@ size_t __cdecl strcspn(const char*,const char*);
char
*
__cdecl
strerror
(
int
);
size_t
__cdecl
strlen
(
const
char
*
);
char
*
__cdecl
strncat
(
char
*
,
const
char
*
,
size_t
);
errno_t
__cdecl
strncat_s
(
char
*
,
size_t
,
const
char
*
,
size_t
);
int
__cdecl
strncmp
(
const
char
*
,
const
char
*
,
size_t
);
char
*
__cdecl
strncpy
(
char
*
,
const
char
*
,
size_t
);
errno_t
__cdecl
strncpy_s
(
char
*
,
size_t
,
const
char
*
,
size_t
);
...
...
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