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

FreeBSD Manual Pages

  
 
  

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

NAME
       xt_ff_getc() - Read next	character from a fast file stream

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

SYNOPSIS
       inline int     xt_ff_getc(xt_ff_t *stream)

ARGUMENTS
       stream  Pointer to an xt_ff_t object

DESCRIPTION
       xt_ff_getc(3)  reads a single character from a xt_ff_t stream opened by
       xt_ff_open(3).

       The xt_ff_t system is simpler than and  much  faster  than  traditional
       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 character read, or EOF if no	more data are available

EXAMPLES
       xt_ff_t *stream;
       int     ch;

       if ( (stream = xt_ff_open(filename, O_RDONLY)) == NULL )
       {
	   fprintf(stderr, "Cannot open	%s for reading.n", filename);
	   exit(EX_NOINPUT);
       }
       while ( (ch = xt_ff_getc(stream)) != EOF	)
       {
       }
       xt_ff_close(stream);

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

								 xt_ff_getc(3)

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

home | help