| 1 |
'\" t |
| 2 |
.\" Title: ne_buffer_clear |
| 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_CLEAR" "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_clear, ne_buffer_grow, ne_buffer_altered \- clear, grow, or mark as altered a string buffer |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.sp |
| 34 |
.ft B |
| 35 |
.nf |
| 36 |
#include <ne_string\&.h> |
| 37 |
.fi |
| 38 |
.ft |
| 39 |
.HP \w'void\ ne_buffer_clear('u |
| 40 |
.BI "void ne_buffer_clear(ne_buffer\ *" "buf" ");" |
| 41 |
.HP \w'void\ ne_buffer_altered('u |
| 42 |
.BI "void ne_buffer_altered(ne_buffer\ *" "buf" ");" |
| 43 |
.HP \w'void\ ne_buffer_grow('u |
| 44 |
.BI "void ne_buffer_grow(ne_buffer\ *" "buf" ", size_t\ " "size" ");" |
| 45 |
.SH "DESCRIPTION" |
| 46 |
.PP |
| 47 |
The |
| 48 |
\fBne_buffer_clear\fR |
| 49 |
function sets the string stored in |
| 50 |
\fIbuf\fR |
| 51 |
to be the empty string ("")\&. |
| 52 |
.PP |
| 53 |
The |
| 54 |
\fBne_buffer_altered\fR |
| 55 |
function must be used after the string stored in the buffer |
| 56 |
\fIbuf\fR |
| 57 |
is modified by directly rather than using |
| 58 |
ne_buffer_append, |
| 59 |
ne_buffer_zappend |
| 60 |
or |
| 61 |
ne_buffer_concat\&. |
| 62 |
.PP |
| 63 |
The |
| 64 |
\fBne_buffer_grow\fR |
| 65 |
function ensures that at least |
| 66 |
\fIsize\fR |
| 67 |
bytes are allocated for the string; this can be used if a large amount of data is going to be appended to the buffer and may result in more efficient memory allocation\&. |
| 68 |
.SH "AUTHOR" |
| 69 |
.PP |
| 70 |
\fBJoe Orton\fR <\&[email protected]\&> |
| 71 |
.RS 4 |
| 72 |
Author. |
| 73 |
.RE |
| 74 |
.SH "COPYRIGHT" |
| 75 |
.br |