Added stpcpy() implementation for the sake of compatibility (it's not a POSIX function).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9735 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -8,6 +8,7 @@ KernelMergeObject posix_string.o :
|
|||||||
memcpy.c
|
memcpy.c
|
||||||
memmove.c
|
memmove.c
|
||||||
memset.c
|
memset.c
|
||||||
|
stpcpy.c
|
||||||
strcasecmp.c
|
strcasecmp.c
|
||||||
strcasestr.c
|
strcasestr.c
|
||||||
strcat.c
|
strcat.c
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
|
** Distributed under the terms of the Haiku License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* This is not a POSIX function, but since BeOS exports it, we need to, as well. */
|
||||||
|
|
||||||
|
char *
|
||||||
|
stpcpy(char *dest, char const *src)
|
||||||
|
{
|
||||||
|
while ((*dest++ = *src++) != '\0')
|
||||||
|
;
|
||||||
|
|
||||||
|
return dest - 1;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user