/*
 *			a g g r e g . c
 */

/*)LIBRARY
*/

#ifdef DOCUMENTATION

title	aggreg	Multiple String Concatenation
index		multiple String concatenation

synopsis

	int
	aggreg(destr, numstr, s1, s2, s3, ... sn)
	 char *destr;		/* destination string */
	 unsigned numstr;	/* number of concatenations */
	 char *s1,*s2...;	/* strings to be concatenated */

description

	aggreg() concatenates numstr strings to the end of destr.
	Returns a pointer to where we started concatenating.

bugs

author

	Machiavelli Systems

#endif



aggreg(dest, nump, p1)
char *dest;	/* where to put it */
unsigned nump;	/* number of strings to concatenate */
char *p1;	/* first parameter */
{
	char **pptr;	/* pointer to string pointers */
	unsigned i;	/* counter for paramter copying */
	char *desret;	/* pointer that we return */

	/* point it at string pointer parameter list */
	pptr = &p1;

	/* set the pointer to be returned */
	desret = dest;

	/* point dest at byte to load at */
	dest += strlen(dest);

	/* copy each string into the destination */
	for (i=0; i<nump ; dest=cpystr(dest,*(pptr+(i++))) );

	return(desret);

}
