Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/3/84; site talcott.UUCP Path: utzoo!linus!decvax!genrad!wjh12!talcott!kendall From: kendall@talcott.UUCP (Sam Kendall) Newsgroups: net.lang.c Subject: va_apply (Re: Re: gripe: variable arg lists) Message-ID: <115@talcott.UUCP> Date: Sun, 18-Nov-84 17:04:33 EST Article-I.D.: talcott.115 Posted: Sun Nov 18 17:04:33 1984 Date-Received: Tue, 20-Nov-84 07:22:01 EST References: <9891@watmath.UUCP> Organization: Sociology Dept., Harvard Univ. Lines: 19 > How about another addition to , 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