Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2002-06-13 14:20:48 +0400
committerDanny Smith <dannysmith@users.sourceforge.net>2002-06-13 14:20:48 +0400
commitdc8971488e7c174ab4084cbdb0a8f12c39b738d7 (patch)
treed679387fa379b6d5feb9756bdd7237347614453b /winsup/mingw/mingwex/wmemcpy.c
parent5f74ae83e5fba1ceb73a8d822cbe2b48c619127f (diff)
* include/_mingw.h: Increment version to 2.0.
* Makefile.in: Ditto. Merge in mingwex branch.
Diffstat (limited to 'winsup/mingw/mingwex/wmemcpy.c')
-rw-r--r--winsup/mingw/mingwex/wmemcpy.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/winsup/mingw/mingwex/wmemcpy.c b/winsup/mingw/mingwex/wmemcpy.c
new file mode 100644
index 000000000..d7e7b4cb3
--- /dev/null
+++ b/winsup/mingw/mingwex/wmemcpy.c
@@ -0,0 +1,32 @@
+/* This source code was extracted from the Q8 package created and placed
+ in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
+ last edit: 1999/11/05 gwyn@arl.mil
+
+ Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
+
+ It supports an encoding where all char codes are mapped
+ to the *same* code values within a wchar_t or wint_t,
+ so long as no other wchar_t codes are used by the program.
+
+*/
+
+#include <wchar.h>
+
+
+wchar_t *
+wmemcpy(s1, s2, n)
+ register wchar_t * __restrict__ s1;
+ register const wchar_t * __restrict__ s2;
+ register size_t n;
+ {
+ wchar_t *orig_s1 = s1;
+
+ if ( s1 == NULL || s2 == NULL || n == 0 )
+ return orig_s1; /* robust */
+
+ for ( ; n > 0; --n )
+ *s1++ = *s2++;
+
+ return orig_s1;
+ }
+