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

FreeBSD Manual Pages

  
 
  

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

NAME
       xt_ff_gets_malloc()  -  Read a line from	a fast file stream, allocating
       memory as needed

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

SYNOPSIS
       int     xt_ff_gets_malloc(xt_ff_t *stream, char **buff, size_t *buff_size,
       size_t *len)

ARGUMENTS
       stream:	   xt_ff_t stream from which field is read
       buff:	   Character buffer into which field is	copied
       buff_size:  Size	of the array passed to buff
       len:	   Pointer to a	variable which will receive the	field length

DESCRIPTION
       xt_ff_gets_malloc(3) reads a single line	of text	(up to the  next  new-
       line  or	 EOF)  from  stream,  allocating and/or	extending the provided
       buffer if needed.

RETURN VALUES
       Delimiter ending	the read: either newline or EOF

EXAMPLES
       xt_ff_t *stream;
       char    *buff;
       size_t  buff_len, len;

       while ( xt_ff_ile_read_line_malloc(stream, buff,	&buff_len, &len) != EOF	)
       {
       }

SEE ALSO
       xt_dsv_read_field_malloc(3), xt_ff_getc(3)

							  xt_ff_gets_malloc(3)

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

home | help