aboutsummaryrefslogtreecommitdiff
path: root/texinfo/libtxi/memcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'texinfo/libtxi/memcpy.c')
-rw-r--r--texinfo/libtxi/memcpy.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/texinfo/libtxi/memcpy.c b/texinfo/libtxi/memcpy.c
new file mode 100644
index 00000000000..521625464cd
--- /dev/null
+++ b/texinfo/libtxi/memcpy.c
@@ -0,0 +1,20 @@
+/* Copy LEN bytes starting at SRCADDR to DESTADDR. Result undefined
+ if the source overlaps with the destination.
+ Return DESTADDR. */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+char *
+memcpy (destaddr, srcaddr, len)
+ char *destaddr;
+ const char *srcaddr;
+ int len;
+{
+ char *dest = destaddr;
+
+ while (len-- > 0)
+ *destaddr++ = *srcaddr++;
+ return dest;
+}