1NE_BUFFER(3) neon API reference NE_BUFFER(3)
2
3
4
6 ne_buffer - string buffer handling
7
9 #include <ne_string.h>
10
11 typedef struct {
12 char *data;
13 size_t used;
14 size_t length; } ne_buffer;
15
16
17
19 The ne_buffer type represents an expandable memory buffer for holding
20 NUL-terminated strings. The data field points to the beginnning of the
21 string, the length of which is given by the used field. The current
22 size of memory allocated is given by the length field. It is not recom‐
23 mended that the fields of a buffer are manipulated directly. The data
24 pointer may change when the buffer is modified.
25
26
27 A buffer is created using ne_buffer_create(3) or ne_buffer_ncreate(3),
28 and destroyed using ne_buffer_destroy(3) or ne_buffer_finish(3). The
29 functions ne_buffer_append(3), ne_buffer_zappend(3) and ne_buffer_con‐
30 cat(3) are used to append data to a buffer.
31
32
33 If the string referenced by the data pointer is modified directly
34 (rather than using one of the functions listed above), ne_buffer_al‐
35 tered must be called.
36
37
39 Joe Orton <neon@webdav.org>.
40
41
42
43neon 0.25.5 20 January 2006 NE_BUFFER(3)