SYS_vsprintf
Application Program Interface
2-465
Between the % and the conversion character, the following symbols or
specifiers contained within square brackets can appear, in the order
shown.
%[-][0][width]type
A dash (-) symbol causes the converted argument to be left-justified
within a field of width characters with blanks following. A 0 (zero) causes
the converted argument to be right-justified within a field of size width with
leading 0s. If neither a dash nor 0 are given, the converted argument is
right-justified in a field of size width, with leading blanks. The width is a
decimal integer. The converted argument is not modified if it has more
than width characters, or if width is not given.
The length modifier l can precede %d, %u, %o, and %x if the
corresponding argument is a long integer.
SYS_vprintf is equivalent to SYS_printf, except that the optional set of
arguments is replaced by a va_list on which the standard C macro
va_start has already been applied. SYS_sprintf and SYS_vsprintf are
counterparts of SYS_printf and SYS_vprintf, respectively, in which output
is placed in a specified buffer.
Both SYS_printf and SYS_vprintf internally call the function SYS_putchar
to output individual characters in a system-dependent fashion via the
configuration parameter Putc function. This parameter is bound to a
function that displays output on a debugger if one is running, or places
output in an output buffer between PUTCEND and PUTCBEG.
Constraints and
Calling Context
❏
The function bound to Exit function or any of the handler functions
are not reentrant; SYS_exit must be called atomically.
See Also