libc.info: va_arg

Go forward to va_end
Go backward to va_start
Go up to Stdarg
Go to the top op libc

Extract a value from argument list

   *Synopsis*
     #include <stdarg.h>
     TYPE va_arg(va_list AP, TYPE);
   *Description*
`va_arg' returns the next unprocessed value from a variable argument
list AP (which you must previously create with VA_START).  Specify the
type for the value as the second parameter to the macro, TYPE.
   You may pass a `va_list' object AP to a subfunction, and use
`va_arg' from the subfunction rather than from the function actually
declared with an ellipsis in the header; however, in that case you may
_only_ use `va_arg' from the subfunction.  ANSI C does not permit
extracting successive values from a single variable-argument list from
different levels of the calling stack.
   There is no mechanism for testing whether there is actually a next
argument available; you might instead pass an argument count (or some
other data that implies an argument count) as one of the fixed arguments
in your function call.
   *Returns*
`va_arg' returns the next argument, an object of type TYPE.
   *Portability*
ANSI C requires `va_arg'.