safec  3.0
Safe C Library - ISO TR24731 Bounds Checking Interface
vprintf_s.c File Reference
#include "safe_lib.h"
+ Include dependency graph for vprintf_s.c:

Functions

EXPORT int vprintf_s (const char *restrict fmt, va_list ap)
 The vprintf_s function composes a string via the format string and writes it to a FILE buffer. More...
 

Function Documentation

◆ vprintf_s()

EXPORT int vprintf_s ( const char *restrict  fmt,
va_list  ap 
)

The vprintf_s function composes a string via the format string and writes it to a FILE buffer.

Note
POSIX specifies that errno is set on error. However, the safeclib extended ES* errors do not set errno, only when the underlying system vprintf call fails, errno is set.
Remarks
SPECIFIED IN
Parameters
[in]fmtformat-control string
[in]apoptional arguments
Precondition
fmt shall not be a null pointer.
fmt shall not contain the conversion specifier n.
None of the arguments corresponding to s is a null pointer. (not yet)
No encoding error shall occur.
Returns
On success the total number of characters written is returned.
On failure a negative number is returned.
Return values
-ESNULLPwhen fmt is NULL pointer
-EINVALwhen fmt contains n
-1on some other error. errno is set then.