It's been a while since I used K&R C, but IIRC it supported variable argument lists like this;
Code:
#include <varargs.h>
int function(va_alist)
va_dcl
{
va_list ap;
/* Assume we are interpreting the first argument as a char * and second as an int */
char *firstarg;
int secondarg;
va_start(ap);
firstarg = va_arg(ap, char *);
secondarg = va_arg(ap, int);
/* do something with those two arguments */
va_end(ap);
return 42; /* Meaning of life ... */
}
To call such a function, it was not even necessary to have a prototype, as a K&R C compiler would implicitly declare any called (but undeclared) function as returning int, and accepting an arbitrary number of arguments.
However, if one wants a prototype of such a function, the form is
where "int" is optional.
If you think the above is ugly .... yeah! Very early versions of K&R C did not allow implementation of functions with variable argument lists either - it was introduced later as a hack to allow functions like printf() to be implemented in K&R C. Before that, functions like printf() could not be implemented in K&R C, and had to be implemented in another language (eg assembler).
As to whether bcc supports this .... no idea.