wcpcpy.c revision 189361
1170754Sdelphij/* 2170754Sdelphij * Copyright (c) 1999 3170754Sdelphij * David E. O'Brien 4170754Sdelphij * Copyright (c) 1988, 1993 5170754Sdelphij * The Regents of the University of California. All rights reserved. 6170754Sdelphij * 7170754Sdelphij * Redistribution and use in source and binary forms, with or without 8170754Sdelphij * modification, are permitted provided that the following conditions 9170754Sdelphij * are met: 10170754Sdelphij * 1. Redistributions of source code must retain the above copyright 11170754Sdelphij * notice, this list of conditions and the following disclaimer. 12170754Sdelphij * 2. Redistributions in binary form must reproduce the above copyright 13170754Sdelphij * notice, this list of conditions and the following disclaimer in the 14170754Sdelphij * documentation and/or other materials provided with the distribution. 15170754Sdelphij * 3. Neither the name of the University nor the names of its contributors 16170754Sdelphij * may be used to endorse or promote products derived from this software 17170754Sdelphij * without specific prior written permission. 18170754Sdelphij * 19170754Sdelphij * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20170754Sdelphij * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21170754Sdelphij * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22170754Sdelphij * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23170754Sdelphij * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24170754Sdelphij * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25170754Sdelphij * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26170754Sdelphij * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27170754Sdelphij * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28170754Sdelphij * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29170754Sdelphij * SUCH DAMAGE. 30170754Sdelphij */ 31170754Sdelphij 32170754Sdelphij#if defined(LIBC_SCCS) && !defined(lint) 33170754Sdelphijstatic char sccsid[] = "@(#)strcpy.c 8.1 (Berkeley) 6/4/93"; 34170754Sdelphij#endif /* LIBC_SCCS and not lint */ 35170754Sdelphij#include <sys/cdefs.h> 36170754Sdelphij__FBSDID("$FreeBSD: head/lib/libc/string/wcpcpy.c 189361 2009-03-04 06:01:27Z das $"); 37170754Sdelphij 38170754Sdelphij#include <wchar.h> 39170754Sdelphij 40170754Sdelphijwchar_t * 41170754Sdelphijwcpcpy(wchar_t * __restrict to, const wchar_t * __restrict from) 42170754Sdelphij{ 43170754Sdelphij 44170754Sdelphij for (; (*to = *from); ++from, ++to); 45170754Sdelphij return(to); 46170754Sdelphij} 47170754Sdelphij