xref: /csrg-svn/lib/libc/string/strcat.c (revision 42181)
11980Swnj /*
235094Sbostic  * Copyright (c) 1988 Regents of the University of California.
335094Sbostic  * All rights reserved.
435094Sbostic  *
535094Sbostic  * Redistribution and use in source and binary forms are permitted
635094Sbostic  * provided that the above copyright notice and this paragraph are
735094Sbostic  * duplicated in all such forms and that any documentation,
835094Sbostic  * advertising materials, and other materials related to such
935094Sbostic  * distribution and use acknowledge that the software was developed
1035094Sbostic  * by the University of California, Berkeley.  The name of the
1135094Sbostic  * University may not be used to endorse or promote products derived
1235094Sbostic  * from this software without specific prior written permission.
1335094Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1435094Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1535094Sbostic  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
161980Swnj  */
171980Swnj 
1835094Sbostic #if defined(LIBC_SCCS) && !defined(lint)
19*42181Sbostic static char sccsid[] = "@(#)strcat.c	5.4 (Berkeley) 05/17/90";
2035094Sbostic #endif /* LIBC_SCCS and not lint */
2135094Sbostic 
22*42181Sbostic #include <string.h>
23*42181Sbostic 
241980Swnj char *
2535094Sbostic strcat(s, append)
2635094Sbostic 	register char *s, *append;
271980Swnj {
2835094Sbostic 	char *save = s;
291980Swnj 
3035094Sbostic 	for (; *s; ++s);
3135094Sbostic 	while (*s++ = *append++);
3235094Sbostic 	return(save);
331980Swnj }
34