summaryrefslogtreecommitdiff
path: root/libc/string/string.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-01-09 19:41:02 +0000
committerEric Andersen <andersen@codepoet.org>2002-01-09 19:41:02 +0000
commitdb777744aa07d47a571016b48fea82e53371fe2b (patch)
treef77a343835c1bec2d40612992a3e68501ffdf110 /libc/string/string.c
parent2f2e72cbed35ff28d89ef16dbbea4497de834617 (diff)
Implement mempcpy
Diffstat (limited to 'libc/string/string.c')
-rw-r--r--libc/string/string.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libc/string/string.c b/libc/string/string.c
index 591f875f9..176ef895b 100644
--- a/libc/string/string.c
+++ b/libc/string/string.c
@@ -308,6 +308,21 @@ void *memcpy(void *dst, const void *src, size_t len)
}
#endif
+/********************** Function mempcpy ************************************/
+
+#ifdef L_mempcpy
+void *mempcpy(void *dst, const void *src, size_t len)
+{
+ register char *a = dst;
+ register const char *b = src;
+
+ while (len--)
+ *a++ = *b++;
+
+ return (void *) a;
+}
+#endif
+
/********************** Function memccpy ************************************/
#ifdef L_memccpy