projects
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
- Cleanup the /lib directory, by putting more 3rd-party libs in /3rdparty, and by...
[reactos.git]
/
reactos
/
lib
/
sdk
/
crt
/
wstring
/
wcsdup.c
1
/*
2
* COPYRIGHT: See COPYING in the top level directory
3
* PROJECT: ReactOS system libraries
4
* FILE: lib/crt/??????
5
* PURPOSE: Unknown
6
* PROGRAMER: Unknown
7
* UPDATE HISTORY:
8
* 25/11/05: Added license header
9
*/
10
11
#include <precomp.h>
12
13
/*
14
* @implemented
15
*/
16
wchar_t
*
_wcsdup
(
const wchar_t
*
ptr
)
17
{
18
wchar_t
*
dup
;
19
20
dup
=
malloc
((
wcslen
(
ptr
) +
1
) *
sizeof
(
wchar_t
));
21
if
(
dup
==
NULL
) {
22
__set_errno
(
ENOMEM
);
23
return
NULL
;
24
}
25
wcscpy
(
dup
,
ptr
);
26
return
dup
;
27
}