aboutsummaryrefslogtreecommitdiffstats
path: root/missing.d/memset.c
diff options
context:
space:
mode:
Diffstat (limited to 'missing.d/memset.c')
-rw-r--r--missing.d/memset.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/missing.d/memset.c b/missing.d/memset.c
new file mode 100644
index 00000000..120bdcb4
--- /dev/null
+++ b/missing.d/memset.c
@@ -0,0 +1,18 @@
+/*
+ * memset --- initialize memory
+ *
+ * We supply this routine for those systems that aren't standard yet.
+ */
+
+char *
+memset (dest, val, l)
+register char *dest, val;
+register int l;
+{
+ register char *ret = dest;
+
+ while (l--)
+ *dest++ = val;
+
+ return ret;
+}