Mail Archives: djgpp/1997/08/05/03:20:03
In article <33e5c2e0 DOT 51066140 AT news DOT bc1 DOT com>
lothloriel AT bc1 DOT com "Burton Radons/Lothloriel, Hollow Dreams" writes:
>Base function:
>
>char *rsprintf(const char *format, ...)
>{
> va_list args;
> char *buffer;
> /* and on and on... */
>}
>
>What would I have to do to... err... set 'args' to '...'? That half of the
>reference manual was stolen several years ago, before I could get to it, so
>fluid-depth arguments are still an absolute mystery to me.
You shouls always check the relevant FAQs before posting to newsgroups.
The following section of the comp.lang.c FAQ is relevant:
15.4: How can I write a function that takes a variable number of
arguments?
and the following may be relevant:
15.5: How can I write a function that takes a format string and a
variable number of arguments, like printf(), and passes them to
printf() to do most of the work?
Most Usenet FAQs are available via ftp from rtfm.mit.edu under /pub/usenet.
--
-----------------------------------------
Lawrence Kirby | fred AT genesis DOT demon DOT co DOT uk
Wilts, England | 70734 DOT 126 AT compuserve DOT com
-----------------------------------------
- Raw text -