xref: /csrg-svn/lib/libc/string/strcpy.c (revision 40557)
18316Sroot /*
235097Sbostic  * Copyright (c) 1988 Regents of the University of California.
335097Sbostic  * All rights reserved.
435097Sbostic  *
535097Sbostic  * Redistribution and use in source and binary forms are permitted
635097Sbostic  * provided that the above copyright notice and this paragraph are
735097Sbostic  * duplicated in all such forms and that any documentation,
835097Sbostic  * advertising materials, and other materials related to such
935097Sbostic  * distribution and use acknowledge that the software was developed
1035097Sbostic  * by the University of California, Berkeley.  The name of the
1135097Sbostic  * University may not be used to endorse or promote products derived
1235097Sbostic  * from this software without specific prior written permission.
1335097Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1435097Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1535097Sbostic  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
168316Sroot  */
178316Sroot 
1835097Sbostic #if defined(LIBC_SCCS) && !defined(lint)
19*40557Sbostic static char sccsid[] = "@(#)strcpy.c	5.4 (Berkeley) 03/21/90";
2035097Sbostic #endif /* LIBC_SCCS and not lint */
2135097Sbostic 
228316Sroot char *
2335097Sbostic strcpy(to, from)
2435097Sbostic 	register char *to, *from;
258316Sroot {
2635097Sbostic 	char *save = to;
278316Sroot 
28*40557Sbostic 	for (; *to = *from; ++from, ++to);
2935097Sbostic 	return(save);
308316Sroot }
31