Debian Codegraph @

deps/libneon/doc/man/ne_buffer.3

raw
1 '\" t
2 .\" Title: ne_buffer
3 .\" Author:
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\" Date: 3 May 2011
6 .\" Manual: neon API reference
7 .\" Source: neon 0.29.6
8 .\" Language: English
9 .\"
10 .TH "NE_BUFFER" "3" "3 May 2011" "neon 0.29.6" "neon API reference"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 ne_buffer \- string buffer handling
32 .SH "SYNOPSIS"
33 .sp
34 .ft B
35 .nf
36 #include <ne_string\&.h>
37
38 typedef struct {
39 char *data;
40 size_t used;
41 size_t length;
42 } ne_buffer;
43 .fi
44 .ft
45 .SH "DESCRIPTION"
46 .PP
47 The
48 \fBne_buffer\fR
49 type represents an expandable memory buffer for holding
50 NUL\-terminated strings\&. The
51 \fIdata\fR
52 field points to the beginnning of the string, the length of which is given by the
53 \fIused\fR
54 field\&. The current size of memory allocated is given by the
55 \fIlength\fR
56 field\&. It is not recommended that the fields of a buffer are manipulated directly\&. The
57 \fIdata\fR
58 pointer may change when the buffer is modified\&.
59 .PP
60 A buffer is created using
61 ne_buffer_create
62 or
63 ne_buffer_ncreate, and destroyed using
64 ne_buffer_destroy
65 or
66 ne_buffer_finish\&. The functions
67 ne_buffer_append,
68 ne_buffer_zappend
69 and
70 ne_buffer_concat
71 are used to append data to a buffer\&.
72 .PP
73 If the string referenced by the
74 \fIdata\fR
75 pointer is modified directly (rather than using one of the functions listed above),
76 \fBne_buffer_altered\fR
77 must be called\&.
78 .SH "AUTHOR"
79 .PP
80 \fBJoe Orton\fR <\&[email protected]\&>
81 .RS 4
82 Author.
83 .RE
84 .SH "COPYRIGHT"
85 .br