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