J
j0mbolar
given this example:
void bar(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
baz(fmt, ap);
va_end(ap);
}
void baz(const char *fmt, va_list ap)
{
char msg[MSG_SIZE];
vsnprintf(msg, sizeof msg, fmt, ap);
display(msg);
}
is this usage well defined? that is, passing a va_list
from one function and using it in another.
also, i've been wondering about something.
where in the standard is the following explained?
void func(int foo);
....
(****func)(foo); /* where is this method of calling func explained? */
void bar(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
baz(fmt, ap);
va_end(ap);
}
void baz(const char *fmt, va_list ap)
{
char msg[MSG_SIZE];
vsnprintf(msg, sizeof msg, fmt, ap);
display(msg);
}
is this usage well defined? that is, passing a va_list
from one function and using it in another.
also, i've been wondering about something.
where in the standard is the following explained?
void func(int foo);
....
(****func)(foo); /* where is this method of calling func explained? */