1buffer_fromsa(3) Library Functions Manual buffer_fromsa(3)
2
3
4
6 buffer_fromsa - initialize buffer structure from stralloc
7
9 #include <buffer.h>
10
11 void buffer_fromsa(buffer* b,const stralloc* sa);
12
14 buffer_fromsa makes a virtual read buffer from a stralloc. The buffer
15 reading functions will be able to read until the end of the data in the
16 stralloc, then signal EOF. The buffer does not have its own buffer
17 space, it reuses the one in the stralloc.
18
19 Do not touch the stralloc until you are done with the buffer! In par‐
20 ticular, do not call stralloc_free on it!
21
22 Reading data from the buffer will not change the stralloc.
23
25 buffer_tosa(3), buffer_init(3), buffer(3), buffer_frombuf(3), buf‐
26 fer_fromarray(3)
27
28
29
30 buffer_fromsa(3)