va_list + function pointers



Hello.

I'm trying to figure out how can I make use of stdarg.h/va_list with
function pointers as variable arguments.

In particular I don't know which type I should put in va_arg call and
which name I should put in va_start call.

Do you know how to implement it in C?

Thanks!

e.g. (just tentative)
double myFunc(int k, double x, double (*fp1)(double,int), ...)
{
double result;
va_list vl;

va_start(vl, ????????);

do {
double (*fp_new)(double,int) = va_arg(vl, ???????);

// do stuff

} while ( (*fp_new) != NULL );

va_end(vl);

return result;
}
.