Back to libut API Reference


SYNOPSIS

    #include "libut/ut.h"
    int UT_iob_printf(UT_iob *iob, char *format, ...);


DESCRIPTION

This function appends a printf-formatted string to the given iob. The printf format is followed by its required arguments. All the printf conversions of the underlying platform are available.

The trailing NULL terminator is not appended to the iob. (The iob keeps track of the length without requiring the terminator.) The NULL is omitted so that subsequent calls to UT_iob_printf() extend the string.


RETURN VALUE

The function always returns 0.

If an out-of-memory failure occurs, a Fatal message is logged and the process exits with status -1.


SEE ALSO

UT_iob_create(3), UT_iob_append(3), UT_iob_free(3), UT_iob_writefd(3), UT_iob_bufcmp(3), UT_iob_flatten(3), UT_iob_len(3)


AUTHOR

Troy D. Hanson <thanson@users.sourceforge.net>