Mail Archives: djgpp/2001/01/31/10:15:19
Christian Merz <cmerz AT bndlg DOT de> wrote:
> can anybody tell me how the va_list, va_start() and va_end() works?
Unless you want to re-implement them on your own, in assembly or so,
you don't need to know how they work. Just how you're supposed to use
them.
> I have to include the "<stdarg.h>" file, because I'll write my own
> printf function for my os, but I guess va_list, va_start() and
> va_end() uses some memory allocation routines for allocating some
> lists and so on , right?
No memory allocation, no. The arguments have been put on the stack by
the calling function. All va_start() and friends to is hand them over
to your code, one by one.
> So what I have to do to get the "va" stuff working?
Just use them. They already do work --- if they don't, you're not done
yet with porting GCC to that OS :-)
info libc alpha varargs
has all you need to know, I think.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -