E
Erik Zawadzki
I'm trying to write a wrapper functions for a function that uses the
stdarg.h ellipses notation for variable arguments. In essense, if the
original function is:
void foo(int n, ...){
//body
}
I want to write a function like:
void foo_wrapper (int n, ...){
//some stuff
foo(n, ##SOMETHING##);
//some other stuff
}
Where the ##SOMETHING## is exactly what satisfied the "...".
How do I do this? I tried naively giving "foo" a va_list, but that lead
to some fun segmentation errors. Any other thoughts?
stdarg.h ellipses notation for variable arguments. In essense, if the
original function is:
void foo(int n, ...){
//body
}
I want to write a function like:
void foo_wrapper (int n, ...){
//some stuff
foo(n, ##SOMETHING##);
//some other stuff
}
Where the ##SOMETHING## is exactly what satisfied the "...".
How do I do this? I tried naively giving "foo" a va_list, but that lead
to some fun segmentation errors. Any other thoughts?