• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * This file has no copyright assigned and is placed in the Public Domain.
3  * This file is part of the mingw-w64 runtime package.
4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5  */
6 
7 #define __CRT__NO_INLINE
8 #include	<errno.h>
9 #include	<stdio.h>
10 #include	<stdlib.h>
11 #include	<wchar.h>
12 
13 #if 0
14 wchar_t *
15 wmemmove(s1, s2, n)
16 	register wchar_t		*s1;
17 	register const wchar_t	*s2;
18 	register size_t			n;
19 {
20 	wchar_t				*orig_s1 = s1;
21 
22 	if ( s1 == NULL || s2 == NULL || n == 0 )
23 		return orig_s1;		/* robust */
24 
25 	/* XXX -- The following test works only within a flat address space! */
26 	if ( s2 >= s1 )
27 		for ( ; n > 0; --n )
28 			*s1++ = *s2++;
29 	else	{
30 		s1 += n;
31 		s2 += n;
32 
33 		for ( ; n > 0; --n )
34 			*--s1 = *--s2;
35 		}
36 
37 	return orig_s1;
38 }
39 #endif
40 
wmemmove(wchar_t * _S1,const wchar_t * _S2,size_t _N)41 wchar_t *__cdecl wmemmove(wchar_t *_S1,const wchar_t *_S2,size_t _N)
42 {
43 	return (wchar_t *)memmove(_S1,_S2,_N*sizeof(wchar_t));
44 }
45 
46