DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T m

⟦ace68af3e⟧ TextFile

    Length: 871 (0x367)
    Types: TextFile
    Names: »multcat.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z« 
        └─⟦e5a54fb17⟧ 
            └─⟦this⟧ »pp-5.0/Lib/util/multcat.c« 

TextFile

/* multcat: concatenate strings together */

# ifndef lint
static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Lib/util/RCS/multcat.c,v 5.0 90/09/20 16:17:31 pp Exp Locker: pp $";
# endif

/*
 * $Header: /cs/research/pp/hubris/pp-beta/Lib/util/RCS/multcat.c,v 5.0 90/09/20 16:17:31 pp Exp Locker: pp $
 *
 * $Log:	multcat.c,v $
 * Revision 5.0  90/09/20  16:17:31  pp
 * rcsforce : 5.0 public release
 * 
 */



#include "util.h"
#include <varargs.h>

/* VARARGS 1*/
char *
multcat (va_alist)
va_dcl
{
	register va_list ap;
	register char  *oldstr, *ptr;
	char    *newstr;
	unsigned  newlen;

	va_start(ap);
	for (newlen = 1; oldstr = va_arg(ap, char *);)
		newlen += strlen (oldstr);
	va_end(ap);

	ptr = newstr = smalloc (newlen);

	va_start(ap);
	for (; oldstr = va_arg(ap, char *); ptr--)
		while(*ptr++ = *oldstr++);
	va_end(ap);

	return (newstr);
}