xref: /csrg-svn/lib/libc/string/strcpy.c (revision 35097)
18316Sroot /*
2*35097Sbostic  * Copyright (c) 1988 Regents of the University of California.
3*35097Sbostic  * All rights reserved.
4*35097Sbostic  *
5*35097Sbostic  * Redistribution and use in source and binary forms are permitted
6*35097Sbostic  * provided that the above copyright notice and this paragraph are
7*35097Sbostic  * duplicated in all such forms and that any documentation,
8*35097Sbostic  * advertising materials, and other materials related to such
9*35097Sbostic  * distribution and use acknowledge that the software was developed
10*35097Sbostic  * by the University of California, Berkeley.  The name of the
11*35097Sbostic  * University may not be used to endorse or promote products derived
12*35097Sbostic  * from this software without specific prior written permission.
13*35097Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14*35097Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15*35097Sbostic  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
168316Sroot  */
178316Sroot 
18*35097Sbostic #if defined(LIBC_SCCS) && !defined(lint)
19*35097Sbostic static char sccsid[] = "@(#)strcpy.c	5.3 (Berkeley) 07/18/88";
20*35097Sbostic #endif /* LIBC_SCCS and not lint */
21*35097Sbostic 
228316Sroot char *
23*35097Sbostic strcpy(to, from)
24*35097Sbostic 	register char *to, *from;
258316Sroot {
26*35097Sbostic 	char *save = to;
278316Sroot 
28*35097Sbostic 	for (; *from = *to; ++from, ++to);
29*35097Sbostic 	return(save);
308316Sroot }
31