1104419Sobrien/* 2104419Sobrien * Copyright (c) 1999 3104419Sobrien * David E. O'Brien 4104419Sobrien * Copyright (c) 1988, 1993 5104419Sobrien * The Regents of the University of California. All rights reserved. 6104419Sobrien * 7104419Sobrien * Redistribution and use in source and binary forms, with or without 8104419Sobrien * modification, are permitted provided that the following conditions 9104419Sobrien * are met: 10104419Sobrien * 1. Redistributions of source code must retain the above copyright 11104419Sobrien * notice, this list of conditions and the following disclaimer. 12104419Sobrien * 2. Redistributions in binary form must reproduce the above copyright 13104419Sobrien * notice, this list of conditions and the following disclaimer in the 14104419Sobrien * documentation and/or other materials provided with the distribution. 15104419Sobrien * 3. Neither the name of the University nor the names of its contributors 16104419Sobrien * may be used to endorse or promote products derived from this software 17104419Sobrien * without specific prior written permission. 18104419Sobrien * 19104419Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20104419Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21104419Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22104419Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23104419Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24104419Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25104419Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26104419Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27104419Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28104419Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29104419Sobrien * SUCH DAMAGE. 30104419Sobrien */ 31104419Sobrien 32104419Sobrien#if defined(LIBC_SCCS) && !defined(lint) 33104419Sobrienstatic char sccsid[] = "@(#)strcpy.c 8.1 (Berkeley) 6/4/93"; 34104419Sobrien#endif /* LIBC_SCCS and not lint */ 35104419Sobrien#include <sys/cdefs.h> 36104419Sobrien__FBSDID("$FreeBSD$"); 37104419Sobrien 38104419Sobrien#include <string.h> 39104419Sobrien 40104419Sobrienchar * 41189137Sdasstpcpy(char * __restrict to, const char * __restrict from) 42104419Sobrien{ 43104419Sobrien 44104419Sobrien for (; (*to = *from); ++from, ++to); 45104419Sobrien return(to); 46104419Sobrien} 47