va_apply (Re: Re: gripe: variable arg lists)
Sam Kendall
kendall at talcott.UUCP
Mon Nov 19 08:04:33 AEST 1984
> How about another addition to <varargs.h>, which, given a function,
> its return type, and one of the (partially-used) va_list's, passes
> the remaining arguments referred to by the va_list to the function?
> retval = va_apply( printf, int, nextarg );
> Obviously, va_apply is a macro, but it usually needs a library routine
> written in (shudder) assembler to copy and build another argument list.
>
> ...
>
> (Yes, we have implemented va_apply, and I have used it)
> Kevin Martin, UofW Software Development Group
I don't think va_apply can be specified portably. How does va_apply
know how many args are left, and what types they are? How are you even
going to pass that information? A table of types? Too cumbersome to use
for printf.
Sam Kendall {allegra,ihnp4,ima,amd}!wjh12!kendall
Delft Consulting Corp. decvax!genrad!wjh12!kendall
More information about the Comp.lang.c
mailing list