qdb_snprintf()

Print formatted output to a string, up to a given maximum number of characters

Synopsis:

#include <qdb/qdb.h>

char * qdb_snprintf( int n,
                     char *buf,
                     const char *format, ...);

Arguments:

n
The maximum number of characters to store in the buffer, including a terminating null character. The function will always write a zero-terminator if n is positive.
buf
A pointer to the buffer where you want the function to store the formatted string.
format
A pointer to a formatting string to process. The formatting string determines what additional arguments you need to provide. For more information, see printf() in the Neutrino Library Reference.

Library:

qdb

Description:

This function is a variant of the snprintf() from the standard C library. However, it is different from snprintf() in these ways:

For more information about additional formatting options, see qdb_mprintf().


Caution: You shouldn't use the return value of this function. In future versions, it may be changed to return the number of characters written rather than a pointer to the buffer.

Returns:

A pointer to buf
Success.
NULL
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

qdb_mprintf(), printf() in the Neutrino Library Reference