stdarg

           ************************************************
          *  Functions taking variable number of arguments *
           ************************************************

	On Ansi C, you can use <stdarg.h> macro package to write variable
argument function.  And variable argument is implied by "...".  Here's simple
example:

#include <stdarg.h>

/* multiple strcat */

char *mstrcat(int nsrc, char *dst, char *src1, ...)	
/*... means more args to come */
{
	va_list srcs;	/* va_list is typically void ** */
	va_start(srcs, src1);	/* now srcs = &src1 */
	while(nsrc--){	/* repeat nsrc times */
		strcat(dst, va_arg(char *, srcs));
		/* va_arg(type, valist) returns *(type)valist 
		  then inclements valist */
	}
	va_end(srcs);	/* clears stack or do nothing: compiler dependent */
	return dst;
}

	You can get more details from K&R.  The most important thing to
remember is that in C you have to know how many number of what types of
arguments are there.  Your C compiler will not take care of you.

There is a document titled "Notes On Writing Portable Programs In C"
available via anon. ftp from sauna.hut.fi [130.233.251.253].
The files are portableC.tex, portableC.bib, portableC.ps.Z
in ~ftp/pub/CompSciLab/doc. These files are in the public domain.


The .tex and .bib files are also available as pub/cport.tar.Z from
cs.washington.edu (128.95.1.4) via anonymous ftp.