File: refbuf.html

package info (click to toggle)
tla 1.3.5%2Bdfsg1-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 22,292 kB
  • ctags: 11,952
  • sloc: ansic: 149,771; sh: 16,009; xml: 2,689; lisp: 1,927; makefile: 1,064; cpp: 363; tcl: 230; awk: 48; sed: 25
file content (20 lines) | stat: -rw-r--r-- 3,448 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ne_buffer</title><link rel="stylesheet" href="../manual.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="neon HTTP/WebDAV client library"><link rel="up" href="ref.html" title="neon API reference"><link rel="previous" href="refresolve.html" title="ne_addr_resolve"><link rel="next" href="refbufapp.html" title="ne_buffer_append"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ne_buffer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="refresolve.html">Prev</a></td><th width="60%" align="center">neon API reference</th><td width="20%" align="right"><a accesskey="n" href="refbufapp.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="refbuf"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>ne_buffer &#8212; string buffer handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;ne_string.h&gt;

typedef struct {
    char *data;
    size_t used;
    size_t length;
} <i class="type">ne_buffer</i>;</pre></div></div><div class="refsect1" lang="en"><a name="id3023049"></a><h2>Description</h2><p>The <i class="type">ne_buffer</i> type represents an expandable
memory buffer for holding <tt class="literal">NUL</tt>-terminated strings.  The
<i class="structfield"><tt>data</tt></i> field points to the beginnning of the
string, the length of which is given by the
<i class="structfield"><tt>used</tt></i> field.  The current size of memory
allocated is given by the <i class="structfield"><tt>length</tt></i> field.  It
is not recommended that the fields of a buffer are manipulated
directly.  The <i class="structfield"><tt>data</tt></i> pointer may change when
the buffer is modified.</p><p>A buffer is created using <a href="refbufcr.html#ne_buffer_create">ne_buffer_create</a> or <a href="refbufcr.html#ne_buffer_create_sized">ne_buffer_ncreate</a>, and destroyed using <a href="refbufdest.html#ne_buffer_destroy">ne_buffer_destroy</a> or <a href="refbufdest.html#ne_buffer_finish">ne_buffer_finish</a>.
The functions <a href="refbufapp.html#ne_buffer_append">ne_buffer_append</a>, <a href="refbufapp.html#ne_buffer_zappend">ne_buffer_zappend</a> and <a href="refbufapp.html#ne_buffer_concat">ne_buffer_concat</a> are
used to append data to a buffer.</p><p>If the string referenced by the
<i class="structfield"><tt>data</tt></i> pointer is modified directly (rather
than using one of the functions listed above),
<tt class="function">ne_buffer_altered</tt> must be called.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="refresolve.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="ref.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="refbufapp.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ne_addr_resolve</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">ne_buffer_append</td></tr></table></div></body></html>