1*cf7dd858SToomas Soome /* 2*cf7dd858SToomas Soome * Copyright (c) 1999 3*cf7dd858SToomas Soome * David E. O'Brien 4*cf7dd858SToomas Soome * Copyright (c) 1988, 1993 5*cf7dd858SToomas Soome * The Regents of the University of California. All rights reserved. 6*cf7dd858SToomas Soome * 7*cf7dd858SToomas Soome * Redistribution and use in source and binary forms, with or without 8*cf7dd858SToomas Soome * modification, are permitted provided that the following conditions 9*cf7dd858SToomas Soome * are met: 10*cf7dd858SToomas Soome * 1. Redistributions of source code must retain the above copyright 11*cf7dd858SToomas Soome * notice, this list of conditions and the following disclaimer. 12*cf7dd858SToomas Soome * 2. Redistributions in binary form must reproduce the above copyright 13*cf7dd858SToomas Soome * notice, this list of conditions and the following disclaimer in the 14*cf7dd858SToomas Soome * documentation and/or other materials provided with the distribution. 15*cf7dd858SToomas Soome * 3. Neither the name of the University nor the names of its contributors 16*cf7dd858SToomas Soome * may be used to endorse or promote products derived from this software 17*cf7dd858SToomas Soome * without specific prior written permission. 18*cf7dd858SToomas Soome * 19*cf7dd858SToomas Soome * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20*cf7dd858SToomas Soome * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21*cf7dd858SToomas Soome * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22*cf7dd858SToomas Soome * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23*cf7dd858SToomas Soome * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24*cf7dd858SToomas Soome * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25*cf7dd858SToomas Soome * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26*cf7dd858SToomas Soome * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27*cf7dd858SToomas Soome * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28*cf7dd858SToomas Soome * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29*cf7dd858SToomas Soome * SUCH DAMAGE. 30*cf7dd858SToomas Soome */ 31*cf7dd858SToomas Soome 32*cf7dd858SToomas Soome #include <sys/cdefs.h> 33*cf7dd858SToomas Soome 34*cf7dd858SToomas Soome #include <string.h> 35*cf7dd858SToomas Soome 36*cf7dd858SToomas Soome char * 37*cf7dd858SToomas Soome stpcpy(char * __restrict to, const char * __restrict from) 38*cf7dd858SToomas Soome { 39*cf7dd858SToomas Soome 40*cf7dd858SToomas Soome for (; (*to = *from); ++from, ++to); 41*cf7dd858SToomas Soome return (to); 42*cf7dd858SToomas Soome } 43