ffprintf(3)

LIBRARY
#include <xtend/fast-file.h>
-lxtend

SYNOPSIS

int     ffprintf(ffile_t *stream, const char *format, ...)

ARGUMENTS
stream  Pointer to an ffile_t object opened by ffopen(3)
format  Format string indicating how remaining arguments are printed

DESCRIPTION
ffprintf(3) writes formatted data to a ffile_t stream the same was as fprintf(3) writes to a FILE stream. The ffile_t system is simpler than and several times as fast as FILE on typical systems. It is intended for processing large files character-by-character, where low-level block I/O is not convenient, but FILE I/O causes a bottleneck.

RETURN VALUES
The number of characters written

EXAMPLES
ffile_t *stream;
int     count = 1;
if ( (stream = ffopen(filename, O_WRONLY|O_CREAT|O_TRUNC)) == NULL )
{
    fprintf(stderr, "Could not open %s.n", filename);
    exit(EX_CANTCREAT);
}
ffprintf(stream, "%dn", count);
ffclose(stream);

SEE ALSO
fprintf(3), ffopen(3), ffclose(3), ffputc(3)