C

<platforminterface/printf.h> - C API for printing

Provides C API for printing functions. More...

Header: #include <platforminterface/printf.h>

Macros

int qul_printf(const char *format, ...)
int qul_snprintf(char *buffer, size_t count, const char *format, ...)
int qul_sprintf(char *buffer, const char *format, ...)
int qul_vprintf(const char *format, va_list va)
int qul_vsnprintf(char *buffer, size_t count, const char *format, va_list va)

Detailed Description

Macros

This header file contains C API for the printing.

Macro Documentation

[since Qt Quick Ultralite (Platform) 1.9] int qul_printf(const char *format, ...)

Prints arguments defined by ... according to the format string. Writes the output to PlatformContext::consoleWrite.

format is a pointer to a null-terminated multibyte string specifying how to interpret the data.

... contains arguments specifying data to print.

Returns the number of characters written if successful or a negative value if an error occurred.

Format string parsing is equivalent to C++11 std::printf.

This macro was introduced in Qt Quick Ultralite (Platform) 1.9.

See also Qul::Platform::PlatformContext::consoleWrite().

[since Qt Quick Ultralite (Platform) 1.9] int qul_snprintf(char *buffer, size_t count, const char *format, ...)

Writes the output defined by format to character string buffer.

buffer is a pointer to the buffer where to store the formatted string.

count is the maximum number of characters to write.

format is a pointer to a null-terminated multibyte string specifying how to interpret the data.

... contains arguments specifying data to print.

Returns the number of characters that would have been written if count had been sufficiently large, not counting the terminating null character. Returns negative value if an error occurred.

Format string parsing is equivalent to C++11 std::qul_snprintf.

This macro was introduced in Qt Quick Ultralite (Platform) 1.9.

[since Qt Quick Ultralite (Platform) 1.9] int qul_sprintf(char *buffer, const char *format, ...)

Writes the output defined by format to character string buffer.

buffer is a pointer to the buffer where to store the formatted string.

format is a pointer to a null-terminated multibyte string specifying how to interpret the data.

... contains arguments specifying data to print.

Returns the number of characters written if successful or a negative value if an error occurred. Count does not include the additional null-character automatically appended at the end of the string.

Format string parsing is equivalent to C++11 std::sprintf.

This macro was introduced in Qt Quick Ultralite (Platform) 1.9.

[since Qt Quick Ultralite (Platform) 1.9] int qul_vprintf(const char *format, va_list va)

Prints arguments defined by va according to the format string. Writes the output to PlatformContext::consoleWrite.

format is a pointer to a null-terminated multibyte string specifying how to interpret the data.

va contains arguments specifying data to print.

Returns the number of characters written if successful or a negative value if an error occurred.

Format string parsing is equivalent to C++11 std::vprintf.

This macro was introduced in Qt Quick Ultralite (Platform) 1.9.

See also Qul::Platform::PlatformContext::consoleWrite().

[since Qt Quick Ultralite (Platform) 1.9] int qul_vsnprintf(char *buffer, size_t count, const char *format, va_list va)

Writes the output defined by format to character string buffer.

buffer is a pointer to the buffer where to store the formatted string.

count is the maximum number of characters to write.

format is a pointer to a null-terminated multibyte string specifying how to interpret the data.

va contains arguments specifying data to print.

Returns the number of characters that would have been written if count had been sufficiently large, not counting the terminating null character. Returns negative value if an error occurred.

Format string parsing is equivalent to C++11 std::qul_vsnprintf.

This macro was introduced in Qt Quick Ultralite (Platform) 1.9.

Available under certain Qt licenses.
Find out more.