|
From: Julian S. <js...@ac...> - 2003-12-21 23:29:47
|
CVS commit by jseward:
Add a vanilla implementation of stpcpy(). Does not do overlap checking
(it should).
M +17 -0 mac_replace_strmem.c 1.9
--- valgrind/memcheck/mac_replace_strmem.c #1.8:1.9
@@ -321,4 +321,21 @@ int memcmp ( const void *s1V, const void
}
+/* glibc-2.3.2/sysdeps/generic/stpcpy.c */
+/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
+char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ register char *d = dest;
+ register const char *s = src;
+
+ do
+ *d++ = *s;
+ while (*s++ != '\0');
+
+ return d - 1;
+}
+
/*--------------------------------------------------------------------*/
/*--- end mac_replace_strmem.c ---*/
|