

#include <nitro/os.h>
int OS_VSNPrintfEx( char *dst, size_t len, const char *fmt, va_list vlist );
dst |
Storage destination buffer for the output string. |
len |
Storage destination buffer size for the output string. |
fmt |
Output format string. |
vlist |
Variable argument list. |
Returns the number of characters with the format string output properly. The termination character ( \0 ) is not included in this number.
The output string is written to dst. If the output string is less than len, all of the strings and termination character ( \0 ) are written.
If the output string is greater than or equal to len AND
(1) len is not set to zero, the termination character ( \0 ) is written to dst[len - 1].
(2) If len is zero, nothing is done with dst.
Returns the simplified version of the format string. This extends the features of the OS_VSNPrintf function and supports non-standard conversion specifiers. The currently supported conversion specifiers are as follows.
Converts argument specified as unsignedchararray elements to unsigned hexadecimal values. Whenbis specified,abcedfis used, and forB,ABCDEFis used. Precision can be specified beforeb/B. The precision dictates the number of bytes to display. If you use a period (.) when specifying precision, the value after the period indicates the number of bytes at which to wrap the line. When the precision is not specified, a single byte is output. Software can be configured to output a space or a colon (:) every byte by adding a space or a colon (:) after%as a flag string.
Example:
OS_TPrintfEx("%:6.3B\n", mac_address);  ↓
00:09:BF<newline>12:34:56
This function is compiled with weak symbols. Therefore, you can overwrite them with your own function definitions.
2006/10/23 Initial version.
CONFIDENTIAL