summaryrefslogtreecommitdiff
path: root/str_cpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'str_cpy.c')
-rw-r--r--str_cpy.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/str_cpy.c b/str_cpy.c
new file mode 100644
index 0000000..453d790
--- /dev/null
+++ b/str_cpy.c
@@ -0,0 +1,16 @@
+#include "str.h"
+
+unsigned int str_copy(s,t)
+register char *s;
+register char *t;
+{
+ register int len;
+
+ len = 0;
+ for (;;) {
+ if (!(*s = *t)) return len; ++s; ++t; ++len;
+ if (!(*s = *t)) return len; ++s; ++t; ++len;
+ if (!(*s = *t)) return len; ++s; ++t; ++len;
+ if (!(*s = *t)) return len; ++s; ++t; ++len;
+ }
+}