projects
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Use free Windows DDK and compile with latest MinGW releases.
[reactos.git]
/
reactos
/
lib
/
msvcrt
/
wstring
/
wcsdup.c
1
#include <msvcrti.h>
2
3
4
wchar_t
*
_wcsdup
(
const wchar_t
*
ptr
)
5
{
6
wchar_t
*
dup
;
7
dup
=
malloc
((
wcslen
(
ptr
) +
1
)*
sizeof
(
wchar_t
));
8
if
(
dup
==
NULL
) {
9
__set_errno
(
ENOMEM
);
10
return
NULL
;
11
}
12
wcscpy
(
dup
,
ptr
);
13
return
dup
;
14
}