repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
iconv: add euro symbol to GBK as single byte 0x80
[musl.git]
/
src
/
string
/
wmemmove.c
blob
964c9032991ed4620b381cb9dcb31eb789ac19a5
1
#include <wchar.h>
2
#include <stdint.h>
3
4
wchar_t
*
wmemmove
(
wchar_t
*
d
,
const wchar_t
*
s
,
size_t
n
)
5
{
6
wchar_t
*
d0
=
d
;
7
if
(
d
==
s
)
return
d
;
8
if
((
uintptr_t
)
d
-(
uintptr_t
)
s
<
n
*
sizeof
*
d
)
9
while
(
n
--)
d
[
n
] =
s
[
n
];
10
else
11
while
(
n
--) *
d
++ = *
s
++;
12
return
d0
;
13
}