31 lines
440 B
C
31 lines
440 B
C
#ifndef lint
|
|
static char sccsid[] = "@(#)cat.c 1.1 94/10/31 SMI"; /* from System III 3.1 */
|
|
#endif
|
|
|
|
/*
|
|
Concatenate strings.
|
|
|
|
cat(destination,source1,source2,...,sourcen,0);
|
|
|
|
returns destination.
|
|
*/
|
|
|
|
#include <varargs.h>
|
|
|
|
/*VARARGS1*/
|
|
char *cat(dest,va_alist)
|
|
char *dest;
|
|
va_dcl
|
|
{
|
|
va_list argp;
|
|
register char *d, *s;
|
|
|
|
d = dest;
|
|
va_start(argp);
|
|
while (s = va_arg(argp, char*)) {
|
|
while (*d++ = *s++) ;
|
|
d--;
|
|
}
|
|
return(dest);
|
|
}
|