The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

vfprintf, vprintf, vsnprintf, vsprintf - format output of a stdarg argument list

 SYNOPSIS



#include <stdarg.h>
#include <stdio.h>

int vfprintf(FILE *stream, const char *format, va_list ap);
int vprintf(const char *format, va_list ap);
int vsnprintf(char *s, size_t n, const char *format, va_list ap);
int vsprintf(char *s, const char *format, va_list ap);

 DESCRIPTION

The vprintf(), vfprintf(), vsnprintf() and vsprintf() functions are the same as printf(), fprintf(), snprintf() and sprintf() respectively, except that instead of being called with a variable number of arguments, they are called with an argument list as defined by <stdarg.h>.

These functions do not invoke the va_end macro. As these functions invoke the va_arg macro, the value of ap after the return is indeterminate.

 RETURN VALUE

Refer to printf().

 ERRORS

Refer to printf().

 EXAMPLES

None.

 APPLICATION USAGE

Applications using these functions should call va_end(ap) afterwards to clean up.

 FUTURE DIRECTIONS

None.

 SEE ALSO

printf(), <stdarg.h>, <stdio.h>.

DERIVATION

Derived from Issue 1 of the SVID.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]