summaryrefslogtreecommitdiff
path: root/doc/ref/bufutil.xml
blob: 3f3f3c5dccf0a48f225baea6598f5bf2f7f98ee0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    <refentry id="refbufutil">

      <refmeta>
	<refentrytitle>ne_buffer_clear</refentrytitle>
	<manvolnum>3</manvolnum>
      </refmeta>

      <refnamediv>
	<refname id="ne_buffer_clear">ne_buffer_clear</refname>
	<refname id="ne_buffer_grow">ne_buffer_grow</refname>
	<refname id="ne_buffer_altered">ne_buffer_altered</refname>
	<refpurpose>general purpose of group of functions</refpurpose>
      </refnamediv>
      
      <refsynopsisdiv>
	
	<funcsynopsis>

	  <funcsynopsisinfo>#include &lt;ne_string.h&gt;</funcsynopsisinfo>

	  <funcprototype>
	    <funcdef>void <function>ne_buffer_clear</function></funcdef>
	    <paramdef>ne_buffer *<parameter>buf</parameter></paramdef>
	  </funcprototype>

	  <funcprototype>
	    <funcdef>void <function>ne_buffer_altered</function></funcdef>
	    <paramdef>ne_buffer *<parameter>buf</parameter></paramdef>
	  </funcprototype>

	  <funcprototype>
	    <funcdef>void <function>ne_buffer_grow</function></funcdef>
	    <paramdef>ne_buffer *<parameter>buf</parameter></paramdef>
	    <paramdef>size_t <parameter>size</parameter></paramdef>
	  </funcprototype>

	</funcsynopsis>
	
      </refsynopsisdiv>

      <refsect1>
	<title>Description</title>

	<para>The <function>ne_buffer_clear</function> function sets
the string stored in <parameter>buf</parameter> to be the empty string
(<literal>""</literal>).</para>

	<para>The <function>ne_buffer_altered</function> function must
be used after the string stored in the buffer
<parameter>buf</parameter> is modified by directly rather than using
<xref linkend="ne_buffer_append"/>, <xref linkend="ne_buffer_zappend"/> 
or <xref linkend="ne_buffer_concat"/>.</para>

	<para>The <function>ne_buffer_grow</function> function
ensures that at least <parameter>size</parameter> 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.</para>

      </refsect1>

    </refentry>