Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
xt_ff_printf(3) 	    Library Functions Manual		 xt_ff_printf(3)

NAME
     xt_ff_printf() - Print formatted data to a fast file stream

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

SYNOPSIS
     int     xt_ff_printf(xt_ff_t *stream, const char *format, ...)

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

DESCRIPTION
     xt_ff_printf(3)  writes  formatted data to a xt_ff_t stream the same was as
     fprintf(3) writes to a FILE stream.

     The xt_ff_ile_t system is simpler than and  much  faster  than  traditional
     FILE on typical systems.  It is intended for processing large files charac-
     ter-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
     xt_ff_ile_t *stream;
     int     count = 1;

     if ( (stream = xt_ff_open(filename, O_WRONLY|O_CREAT|O_TRUNC)) == NULL )
     {
	 fprintf(stderr, "Could not open %s.n", filename);
	 exit(EX_CANTCREAT);
     }
     xt_ff_printf(stream, "%dn", count);
     xt_ff_close(stream);

SEE ALSO
     fprintf(3), xt_ff_open(3), xt_ff_close(3), xt_ff_putc(3), xt_ff_puts(3)

								 xt_ff_printf(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=xt_ff_printf&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help