search for: c5fc607d

Displaying 1 result from an estimated 1 matches for "c5fc607d".

2020 Mar 28
0
[klibc:update-dash] Implement stpcpy() and stpncpy()
...cpy.o strrchr.o \ strxspn.o strspn.o strcspn.o strpbrk.o strsep.o strtok.o \ strtok_r.o \ + stpcpy.o stpncpy.o \ fnmatch.o \ gethostname.o getdomainname.o getcwd.o \ seteuid.o setegid.o \ diff --git a/usr/klibc/stpcpy.c b/usr/klibc/stpcpy.c new file mode 100644 index 00000000..c5fc607d --- /dev/null +++ b/usr/klibc/stpcpy.c @@ -0,0 +1,19 @@ +/* + * stpcpy.c + */ + +#include <string.h> + +char *stpcpy(char *dst, const char *src) +{ + char ch; + + for (;;) { + *dst = ch = *src++; + if (!ch) + break; + dst++; + } + + return dst; +} diff --git a/usr/klibc/stpncpy.c b/usr/k...