12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- '\" t
- .\" Title: ne_buffer
- .\" Author:
- .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
- .\" Date: 21 January 2023
- .\" Manual: neon API reference
- .\" Source: neon 0.32.5
- .\" Language: English
- .\"
- .TH "NE_BUFFER" "3" "21 January 2023" "neon 0.32.5" "neon API reference"
- .\" -----------------------------------------------------------------
- .\" * Define some portability stuff
- .\" -----------------------------------------------------------------
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .\" http://bugs.debian.org/507673
- .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .ie \n(.g .ds Aq \(aq
- .el .ds Aq '
- .\" -----------------------------------------------------------------
- .\" * set default formatting
- .\" -----------------------------------------------------------------
- .\" disable hyphenation
- .nh
- .\" disable justification (adjust text to left margin only)
- .ad l
- .\" -----------------------------------------------------------------
- .\" * MAIN CONTENT STARTS HERE *
- .\" -----------------------------------------------------------------
- .SH "NAME"
- ne_buffer \- string buffer handling
- .SH "SYNOPSIS"
- .sp
- .ft B
- .nf
- #include <ne_string\&.h>
- typedef struct {
- char *data;
- size_t used;
- size_t length;
- } ne_buffer;
- .fi
- .ft
- .SH "DESCRIPTION"
- .PP
- The
- \fBne_buffer\fR
- type represents an expandable memory buffer for holding
- NUL\-terminated strings\&. The
- \fIdata\fR
- field points to the beginning of the string, the length of which is given by the
- \fIused\fR
- field\&. The current size of memory allocated is given by the
- \fIlength\fR
- field\&. It is not recommended that the fields of a buffer are manipulated directly\&. The
- \fIdata\fR
- pointer may change when the buffer is modified\&.
- .PP
- A buffer is created using
- ne_buffer_create
- or
- ne_buffer_ncreate, and destroyed using
- ne_buffer_destroy
- or
- ne_buffer_finish\&. The functions
- ne_buffer_append,
- ne_buffer_zappend
- and
- ne_buffer_concat
- are used to append data to a buffer\&.
- .PP
- If the string referenced by the
- \fIdata\fR
- pointer is modified directly (rather than using one of the functions listed above),
- \fBne_buffer_altered\fR
- must be called\&.
- .SH "AUTHOR"
- .PP
- \fBJoe Orton\fR
- .RS 4
- Author.
- .RE
- .SH "COPYRIGHT"
- .br
|