1155e9eb1SToomas Soome /*
2155e9eb1SToomas Soome * Copyright (c) 1999
3155e9eb1SToomas Soome * David E. O'Brien
4155e9eb1SToomas Soome * Copyright (c) 1988, 1993
5155e9eb1SToomas Soome * The Regents of the University of California. All rights reserved.
6155e9eb1SToomas Soome *
7155e9eb1SToomas Soome * Redistribution and use in source and binary forms, with or without
8155e9eb1SToomas Soome * modification, are permitted provided that the following conditions
9155e9eb1SToomas Soome * are met:
10155e9eb1SToomas Soome * 1. Redistributions of source code must retain the above copyright
11155e9eb1SToomas Soome * notice, this list of conditions and the following disclaimer.
12155e9eb1SToomas Soome * 2. Redistributions in binary form must reproduce the above copyright
13155e9eb1SToomas Soome * notice, this list of conditions and the following disclaimer in the
14155e9eb1SToomas Soome * documentation and/or other materials provided with the distribution.
15155e9eb1SToomas Soome * 3. Neither the name of the University nor the names of its contributors
16155e9eb1SToomas Soome * may be used to endorse or promote products derived from this software
17155e9eb1SToomas Soome * without specific prior written permission.
18155e9eb1SToomas Soome *
19155e9eb1SToomas Soome * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20155e9eb1SToomas Soome * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21155e9eb1SToomas Soome * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22155e9eb1SToomas Soome * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23155e9eb1SToomas Soome * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24155e9eb1SToomas Soome * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25155e9eb1SToomas Soome * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26155e9eb1SToomas Soome * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27155e9eb1SToomas Soome * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28155e9eb1SToomas Soome * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29155e9eb1SToomas Soome * SUCH DAMAGE.
30155e9eb1SToomas Soome */
31155e9eb1SToomas Soome
32155e9eb1SToomas Soome #include <sys/cdefs.h>
33155e9eb1SToomas Soome
34155e9eb1SToomas Soome #include <string.h>
35155e9eb1SToomas Soome
36155e9eb1SToomas Soome char *
stpcpy(char * __restrict to,const char * __restrict from)37155e9eb1SToomas Soome stpcpy(char * __restrict to, const char * __restrict from)
38155e9eb1SToomas Soome {
39155e9eb1SToomas Soome
40155e9eb1SToomas Soome for (; (*to = *from); ++from, ++to);
41155e9eb1SToomas Soome return (to);
42155e9eb1SToomas Soome }
43