Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (t - v) vsnprintf(3)
RETURN VALUES
Upon successful completion, this function returns the number of bytes that would have been
stored had n been sufficiently large (not counting the terminating null character). Otherwise, a
negative value is returned. Thus, the null-terminated output has been completely stored if and
only if the returned value is nonnegative and less than n.
The value returned by the vsnprintf( ) function does not include the final ’\0’ (null) character.
RETURN VALUES
Upon successful completion, this function returns the number of bytes in the output string. Oth-
erwise, a negative value is returned.
ERRORS
None. The vsnprintf( ) function does not set errno.
RELATED INFORMATION
Functions: fprintf(3), printf(3), snprintf(3), sprintf(3), vfprintf(3), vprintf(3), vsprintf(3).
STANDARDS CONFORMANCE
The behavior of this function conforms to the UNIX98 specification.
The POSIX standards leave some features to the implementing vendor to define. The following
features are affected in the HP implementation:
• The output of %p conversion is a decimal integer.
The following are HP extensions to the ISO/IEC 9899:1999 specification:
• The conversion specifier L followed by a d, i, o, u, x,orX conversion specifier indicates
that the argument will be treated as a long long or an unsigned long long, which is a 64-
bit integer data type.
527187-017 Hewlett-Packard Company 7−127