git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
update for HEAD-2003021201
[reactos.git]
/
lib
/
msvcrt
/
wstring
/
wcsdup.c
1
#include <msvcrt/errno.h>
2
#include <msvcrt/stdlib.h>
3
#include <msvcrt/string.h>
4
#include <msvcrt/internal/file.h>
5
6
7
wchar_t* _wcsdup(const wchar_t* ptr)
8
{
9
wchar_t* dup;
10
11
dup = malloc((wcslen(ptr) + 1) * sizeof(wchar_t));
12
if (dup == NULL) {
13
__set_errno(ENOMEM);
14
return NULL;
15
}
16
wcscpy(dup, ptr);
17
return dup;
18
}