Commit | Line | Data |
---|---|---|
6f577349 | 1 | /* |
fdd5a593 KB |
2 | * Copyright (c) 1988 Regents of the University of California. |
3 | * All rights reserved. | |
4 | * | |
019bea33 | 5 | * %sccs.include.redist.c% |
6f577349 BJ |
6 | */ |
7 | ||
fdd5a593 | 8 | #if defined(LIBC_SCCS) && !defined(lint) |
46b5f26a | 9 | static char sccsid[] = "@(#)strcpy.c 5.7 (Berkeley) %G%"; |
fdd5a593 KB |
10 | #endif /* LIBC_SCCS and not lint */ |
11 | ||
46b5f26a | 12 | #include <sys/cdefs.h> |
336401ac KB |
13 | #include <string.h> |
14 | ||
6f577349 | 15 | char * |
fdd5a593 | 16 | strcpy(to, from) |
46b5f26a KB |
17 | register char *to; |
18 | register const char *from; | |
6f577349 | 19 | { |
fdd5a593 | 20 | char *save = to; |
6f577349 | 21 | |
523dfe1e | 22 | for (; *to = *from; ++from, ++to); |
fdd5a593 | 23 | return(save); |
6f577349 | 24 | } |