1buffer_tosa(3)             Library Functions Manual             buffer_tosa(3)
2
3
4

NAME

6       buffer_tosa - initialize buffer for writing to stralloc
7

SYNTAX

9       #include <buffer.h>
10
11       int buffer_tosa(buffer* b,stralloc* sa);
12

DESCRIPTION

14       buffer_tosa  makes  a virtual write buffer from a stralloc.  The buffer
15       writing functions will append data to the stralloc until  the  stralloc
16       fails to allocate more memory.  You still need to flush the buffer.
17
18       Note  that in the end the stralloc will have allocated more memory than
19       is needed to hold the actual contents.  The waste is 1024 bytes.
20

RETURN VALUE

22       buffer_tosa returns 0 if everything was fine, -1 if it failed to  allo‐
23       cate space for the initial data in the stralloc.
24

SEE ALSO

26       buffer_tosa(3), buffer_init(3), buffer(3)
27
28
29
30                                                                buffer_tosa(3)
Impressum