varargs -> varargs mystery

Mark W. Schumann catfood at NCoast.ORG
Mon May 6 14:08:25 AEST 1991


richard at aiai.uucp (Richard Tobin) writes:
>In article <1991May2.170148.12655 at sparky.IMD.Sterling.COM> rick at sparky.IMD.Sterling.COM (Richard Ohnemus) writes:
>>In article <3099 at cirrusl.UUCP> Rahul Dhesi <dhesi at cirrus.COM> writes:
>>>Suppose A is a varargs function, and it uses the first argument
>>>supplied, and passes on the rest to B, which is also a varargs
>>>function.  What is the right way to do it?
>
>It can't be done.  What Rahul wants is the equivalent of Lisp's
>"apply", and C doesn't have one.
>
>>Just pass the variable argument list pointer instead of the address of 
>>the pointer.
>
>Note that he wanted to pass the arguments on to another varargs
>function, not one that took a single va_list argument.
>
Actually, I think this can be done, but not in any guaranteed
portable way.  (To many, that means it can't be done.  :-)  )

-- 
============================================================
Mark W. Schumann  3111 Mapledale Avenue, Cleveland 44109 USA
Domain: catfood at ncoast.org
UUCP:   ...!mailrus!usenet.ins.cwru.edu!ncoast!catfood



More information about the Comp.lang.c mailing list