The vfprintf_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 vfprintf call fails, errno is set.
- Parameters
-
| [out] | stream | output file stream to write to |
| [in] | fmt | format-control string. |
| [in] | ap | optional arguments |
- Precondition
- Neither stream nor fmt shall 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
-
| -ESNULLP | when stream or fmt is NULL pointer |
| -EINVAL | when fmt contains n |
| -1 | on some other error. errno is set then. |