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

FreeBSD Manual Pages

  
 
  

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

NAME
     buffer_tosa - initialize buffer for writing to stralloc

SYNTAX
     #include <libowfat/buffer.h>

     int buffer_tosa(buffer* b,stralloc* sa);

DESCRIPTION
     buffer_tosa makes a virtual write buffer from a stralloc.	The buffer writ-
     ing  functions will append data to the stralloc until the stralloc fails to
     allocate more memory.  You still need to flush the buffer.

     Note that in the end the stralloc will have allocated more memory	than  is
     needed to hold the actual contents.  The waste is 1024 bytes.

RETURN VALUE
     buffer_tosa  returns  0 if everything was fine, -1 if it failed to allocate
     space for the initial data in the stralloc.

SEE ALSO
     buffer_tosa(3), buffer_init(3), buffer(3)

								  buffer_tosa(3)

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

home | help