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

FreeBSD Manual Pages

  
 
  

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

NAME
       xt_ff_stdin() - Create a	fast file stream attached to descriptor	0

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

SYNOPSIS
       xt_ff_t *xt_ff_stdin(void)

ARGUMENTS
       None

DESCRIPTION
       xt_ff_stdin(3)  is  a  simple  wrapper function for connecting file de-
       scriptor	0 to an	xt_ff_t	object using xt_ff_dopen(3).  This  is	useful
       for  high-performance filter programs, where using the traditional FILE
       *stdin would cause a bottleneck.

       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
       Pointer to an xt_ff_t object if successful, NULL	otherwise

EXAMPLES
       xt_ff_t *stream;

       // "-" as a filename argument traditionally indicates stdin
       if ( strcmp(argv[arg], "-") == 0	)
	   stream = xt_ff_stdin(3);
       else
	   stream = xt_ff_open(argv[arg], O_RDONLY);

SEE ALSO
       xt_ff_open(3), xt_ff_dopen(3)

								xt_ff_stdin(3)

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

home | help