diff options
author | Jim Meyering <jim@meyering.net> | 1994-10-17 13:24:35 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-10-17 13:24:35 +0000 |
commit | f45f10b17d36144ad2c28eb3e804c535d6808822 (patch) | |
tree | 3cebcef99935abd2b00e00268be1de83ca297ffd /lib | |
parent | ff18f4c0720e2084e53992c950d9d96c60cd7db2 (diff) | |
download | coreutils-f45f10b17d36144ad2c28eb3e804c535d6808822.tar.xz |
.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stpcpy.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/stpcpy.c b/lib/stpcpy.c index 4a70746ba..5ca0a2e30 100644 --- a/lib/stpcpy.c +++ b/lib/stpcpy.c @@ -15,16 +15,18 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* Copy SOURCE into DEST, stopping after copying the first '\0', and - return a pointer to the '\0' at the end of DEST; - in other words, return DEST + strlen (SOURCE). */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ char * -stpcpy (dest, source) +stpcpy (dest, src) char *dest; - char *source; + const char *src; { - while ((*dest++ = *source++) != '\0') + while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } |