home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!monty@intuitiveedge.com
- From: monty@intuitiveedge.com (Montgomery Zukowski)
- Subject: recursive variable arguments, can it be done?
- Message-ID: <9212142052.AA00201@intuitiveedge.com>
- Sender: daemon@magnus.acs.ohio-state.edu
- Reply-To: monty@intuitiveedge.com
- Organization: The Ohio State University
- Date: Mon, 14 Dec 1992 20:52:26 GMT
- Lines: 25
-
- Let's say I have two functions f1(...) and f2(...) which take a variable
- argument lists.
-
- Is there any way to have f1 call f2 function like printf() by passing part of
- the variable argument list (the last part), or if not, then the whole thing?
-
- In other words how could I call
- f2(va_list ap)
-
- instead of
-
- f2(arg1,arg2,arg3,arg4, etc...)
-
- I know that printf() has another function vprintf() which has that sort of
- functionality, but I wonder if there is a simpler way to specify a va_list so
- I don't have to have another function declaration like vprintf does for
- printf.
-
- I'm using gcc.
-
- Please email me responses since I don't read this newsgroup often.
- monty@IntuitiveEdge.com
-
- Thanks,
- Monty
-