aboutsummaryrefslogtreecommitdiffstats
path: root/missing.d/memcpy.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-15 23:12:49 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-15 23:12:49 +0300
commit3697ec5ca140f686643d204a54181a5ddbf9a799 (patch)
tree592873e8614475012ddd5f4e6d0482acadbfc9e2 /missing.d/memcpy.c
parentf3d9dd233ac07f764a554528c85be3768a1d1ddb (diff)
downloadegawk-3697ec5ca140f686643d204a54181a5ddbf9a799.tar.gz
egawk-3697ec5ca140f686643d204a54181a5ddbf9a799.tar.bz2
egawk-3697ec5ca140f686643d204a54181a5ddbf9a799.zip
Moved to gawk 2.11.
Diffstat (limited to 'missing.d/memcpy.c')
-rw-r--r--missing.d/memcpy.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/missing.d/memcpy.c b/missing.d/memcpy.c
new file mode 100644
index 00000000..3c4accdf
--- /dev/null
+++ b/missing.d/memcpy.c
@@ -0,0 +1,18 @@
+/*
+ * memcpy --- copy strings.
+ *
+ * We supply this routine for those systems that aren't standard yet.
+ */
+
+char *
+memcpy (dest, src, l)
+register char *dest, *src;
+register int l;
+{
+ register char *ret = dest;
+
+ while (l--)
+ *dest++ = *src++;
+
+ return ret;
+}