]> pd.if.org Git - zos/blobdiff - klib/strcat.c
klib and makefile
[zos] / klib / strcat.c
diff --git a/klib/strcat.c b/klib/strcat.c
new file mode 100644 (file)
index 0000000..33e2648
--- /dev/null
@@ -0,0 +1,10 @@
+#include <string.h>
+
+char *strcat(char *s1, const char *s2) {
+       char *rc = s1;
+       if (*s1) {
+               while(*++s1);
+       }
+       while ( (*s1++ = *s2++) );
+       return rc;
+}