summaryrefslogtreecommitdiff
path: root/apidocs/icalmemory_8h.html
diff options
context:
space:
mode:
Diffstat (limited to 'apidocs/icalmemory_8h.html')
-rw-r--r--apidocs/icalmemory_8h.html71
1 files changed, 31 insertions, 40 deletions
diff --git a/apidocs/icalmemory_8h.html b/apidocs/icalmemory_8h.html
index 6decde4b..ce563cc6 100644
--- a/apidocs/icalmemory_8h.html
+++ b/apidocs/icalmemory_8h.html
@@ -1,9 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Libical API Documentation: icalmemory.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,7 +30,7 @@
</table>
</div>
<!-- end header part -->
-<!-- Generated by Doxygen 1.8.14 -->
+<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
@@ -99,7 +99,7 @@ Functions</h2></td></tr>
<tr class="memdesc:a44986d86c778125a313d423b70cd2b54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates new buffer with the specified size. <a href="#a44986d86c778125a313d423b70cd2b54">More...</a><br /></td></tr>
<tr class="separator:a44986d86c778125a313d423b70cd2b54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e657ee861bf1f00ed4e6eb03cd4a0a5"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalmemory_8h.html#a4e657ee861bf1f00ed4e6eb03cd4a0a5">icalmemory_resize_buffer</a> (void *buf, size_t size)</td></tr>
-<tr class="memdesc:a4e657ee861bf1f00ed4e6eb03cd4a0a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resizes a buffer created with <a class="el" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54" title="Creates new buffer with the specified size. ">icalmemory_new_buffer()</a>. <a href="#a4e657ee861bf1f00ed4e6eb03cd4a0a5">More...</a><br /></td></tr>
+<tr class="memdesc:a4e657ee861bf1f00ed4e6eb03cd4a0a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resizes a buffer created with <a class="el" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54" title="Creates new buffer with the specified size.">icalmemory_new_buffer()</a>. <a href="#a4e657ee861bf1f00ed4e6eb03cd4a0a5">More...</a><br /></td></tr>
<tr class="separator:a4e657ee861bf1f00ed4e6eb03cd4a0a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeae6b906a9fcba61eb725d060361b180"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalmemory_8h.html#aeae6b906a9fcba61eb725d060361b180">icalmemory_strdup</a> (const char *s)</td></tr>
<tr class="memdesc:aeae6b906a9fcba61eb725d060361b180"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a duplicate of a string. <a href="#aeae6b906a9fcba61eb725d060361b180">More...</a><br /></td></tr>
@@ -115,7 +115,7 @@ Functions</h2></td></tr>
<div class="textblock"><p>Common memory management routines. </p>
<p>libical often passes strings back to the caller. To make these interfaces simple, I did not want the caller to have to pass in a memory buffer, but having libical pass out newly allocated memory makes it difficult to de-allocate the memory.</p>
<p>The ring buffer in this scheme makes it possible for libical to pass out references to memory which the caller does not own, and be able to de-allocate the memory later. The ring allows libical to have several buffers active simultaneously, which is handy when creating string representations of components. Methods for working with these temporary buffers are marked with <code>icalmemory_tmp_*()</code>.</p>
-<p>Other memory management routines include wrappers around the system management routines like <a class="el" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54" title="Creates new buffer with the specified size. ">icalmemory_new_buffer()</a> and <a class="el" href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879" title="Releases a buffer. ">icalmemory_free_buffer()</a> as well as routines to work with strings, like <a class="el" href="icalmemory_8h.html#a647bf5dab81fc5b83a0ed8f8ad769ea6" title="Append a string to a buffer. ">icalmemory_append_string()</a>. </p>
+<p>Other memory management routines include wrappers around the system management routines like <a class="el" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54" title="Creates new buffer with the specified size.">icalmemory_new_buffer()</a> and <a class="el" href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879" title="Releases a buffer.">icalmemory_free_buffer()</a> as well as routines to work with strings, like <a class="el" href="icalmemory_8h.html#a647bf5dab81fc5b83a0ed8f8ad769ea6" title="Append a string to a buffer.">icalmemory_append_string()</a>. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae9f1799733a1577748a028181098be48"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9f1799733a1577748a028181098be48">&#9670;&nbsp;</a></span>icalmemory_add_tmp_buffer()</h2>
@@ -140,11 +140,10 @@ Functions</h2></td></tr>
</table>
</dd>
</dl>
-<p>Adds an externally allocated buffer to the ring. This ensures that libical will <code>free()</code> the buffer automatically, either after <a class="el" href="icalmemory_8c.html#af3bf1c77cd63373bfec5de0ab595c0da" title="Determines the size of the ring buffer used for keeping track of temporary buffers. ">BUFFER_RING_SIZE</a> other buffers have been created or added, or after <a class="el" href="icalmemory_8h.html#a175daa67f089bae6aefd4360fcd0d664" title="Free all memory used in the ring. ">icalmemory_free_ring()</a> has been called.</p>
+<p>Adds an externally allocated buffer to the ring. This ensures that libical will <code>free()</code> the buffer automatically, either after <a class="el" href="icalmemory_8c.html#af3bf1c77cd63373bfec5de0ab595c0da" title="Determines the size of the ring buffer used for keeping track of temporary buffers.">BUFFER_RING_SIZE</a> other buffers have been created or added, or after <a class="el" href="icalmemory_8h.html#a175daa67f089bae6aefd4360fcd0d664" title="Free all memory used in the ring.">icalmemory_free_ring()</a> has been called.</p>
<dl class="section user"><dt>Error handling</dt><dd>No error is raised if <em>buf</em> is <code>NULL</code>.</dd></dl>
<dl class="section user"><dt>Ownership</dt><dd>After adding <em>buf</em> to the ring, it becomes owned by icalmemory and must not be <code>free()</code>d manually anymore, it leads to a double-<code>free()</code> when icalmemory reclaims the memory.</dd></dl>
-<h3>Usage</h3>
-<div class="fragment"><div class="line"><span class="keywordtype">char</span> *buf = calloc(256, <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"></div><div class="line"><a class="code" href="icalmemory_8c.html#ae9f1799733a1577748a028181098be48">icalmemory_add_tmp_buffer</a>(buf);</div></div><!-- fragment -->
+<p>### Usage </p><div class="fragment"><div class="line"><span class="keywordtype">char</span> *buf = calloc(256, <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"></div><div class="line"><a class="code" href="icalmemory_8c.html#ae9f1799733a1577748a028181098be48">icalmemory_add_tmp_buffer</a>(buf);</div></div><!-- fragment -->
</div>
</div>
<a id="addac122edb16bc41a193895c86bd5ff5"></a>
@@ -195,11 +194,10 @@ Functions</h2></td></tr>
</table>
</dd>
</dl>
-<dl class="section warning"><dt>Warning</dt><dd>This method may not be used for temporary buffers (buffers allocated with <a class="el" href="icalmemory_8h.html#ad73fe2ed5791e8d4d4513b1e23f7b86e" title="Creates a new temporary buffer on the ring and returns it. ">icalmemory_tmp_buffer()</a> and related functions)!</dd></dl>
-<dl class="section user"><dt>Error handling</dt><dd>Sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value. ">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a> if <em>buf</em>, <code>*buf</code>, <em>pos</em>, <code>* pos</code>, or <em>buf_size</em> <code>NULL</code>.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>This method may not be used for temporary buffers (buffers allocated with <a class="el" href="icalmemory_8h.html#ad73fe2ed5791e8d4d4513b1e23f7b86e" title="Creates a new temporary buffer on the ring and returns it.">icalmemory_tmp_buffer()</a> and related functions)!</dd></dl>
+<dl class="section user"><dt>Error handling</dt><dd>Sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a> if <em>buf</em>, <code>*buf</code>, <em>pos</em>, <code>* pos</code>, or <em>buf_size</em> <code>NULL</code>.</dd></dl>
<p>This method will copy the character <em>ch</em> and a &lsquo;&rsquo;\0'` character after it to the buffer <em>buf</em> starting at position <em>pos</em>, reallocing <em>buf</em> if it is too small. <em>buf_size</em> is the size of <em>buf</em> and will be changed if <em>buf</em> is reallocated. <em>pos</em> will point to the new terminating &lsquo;&rsquo;\0'` character <em>buf</em>.</p>
-<h3>Example</h3>
-<div class="fragment"><div class="line"><span class="comment">// creates a new buffer</span></div><div class="line"><span class="keywordtype">int</span> buffer_len = 15;</div><div class="line"><span class="keywordtype">char</span> *buffer = <a class="code" href="icalmemory_8c.html#a44986d86c778125a313d423b70cd2b54">icalmemory_new_buffer</a>(buffer_len);</div><div class="line">strcpy(buffer, <span class="stringliteral">&quot;My number is: &quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// append a char to the buffer</span></div><div class="line"><span class="keywordtype">int</span> buffer_end = strlen(buffer);</div><div class="line"><span class="keywordtype">char</span> *buffer_end_pos = buffer[buffer_str_end];</div><div class="line"><a class="code" href="icalmemory_8c.html#addac122edb16bc41a193895c86bd5ff5">icalmemory_append_char</a>(&amp;buffer, &amp;buffer_end_pos, &amp;buffer_len, <span class="charliteral">&#39;7&#39;</span>);</div><div class="line"></div><div class="line"><span class="comment">// print string</span></div><div class="line">printf(<span class="stringliteral">&quot;%s\n&quot;</span>, buffer);</div><div class="line"></div><div class="line"><span class="comment">// release memory</span></div><div class="line"><a class="code" href="icalmemory_8c.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a>(buffer);</div></div><!-- fragment -->
+<p>### Example </p><div class="fragment"><div class="line"><span class="comment">// creates a new buffer</span></div><div class="line"><span class="keywordtype">int</span> buffer_len = 15;</div><div class="line"><span class="keywordtype">char</span> *buffer = <a class="code" href="icalmemory_8c.html#a44986d86c778125a313d423b70cd2b54">icalmemory_new_buffer</a>(buffer_len);</div><div class="line">strcpy(buffer, <span class="stringliteral">&quot;My number is: &quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// append a char to the buffer</span></div><div class="line"><span class="keywordtype">int</span> buffer_end = strlen(buffer);</div><div class="line"><span class="keywordtype">char</span> *buffer_end_pos = buffer[buffer_str_end];</div><div class="line"><a class="code" href="icalmemory_8c.html#addac122edb16bc41a193895c86bd5ff5">icalmemory_append_char</a>(&amp;buffer, &amp;buffer_end_pos, &amp;buffer_len, <span class="charliteral">&#39;7&#39;</span>);</div><div class="line"></div><div class="line"><span class="comment">// print string</span></div><div class="line">printf(<span class="stringliteral">&quot;%s\n&quot;</span>, buffer);</div><div class="line"></div><div class="line"><span class="comment">// release memory</span></div><div class="line"><a class="code" href="icalmemory_8c.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a>(buffer);</div></div><!-- fragment -->
</div>
</div>
<a id="a647bf5dab81fc5b83a0ed8f8ad769ea6"></a>
@@ -250,11 +248,10 @@ Functions</h2></td></tr>
</table>
</dd>
</dl>
-<dl class="section warning"><dt>Warning</dt><dd>This method may not be used for temporary buffers (buffers allocated with <a class="el" href="icalmemory_8h.html#ad73fe2ed5791e8d4d4513b1e23f7b86e" title="Creates a new temporary buffer on the ring and returns it. ">icalmemory_tmp_buffer()</a> and related functions)!</dd></dl>
-<dl class="section user"><dt>Error handling</dt><dd>Sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value. ">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a> if <em>buf</em>, <code>*buf</code>, <em>pos</em>, <code>* pos</code>, <em>buf_size</em> or <em>string</em> are <code>NULL</code>.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>This method may not be used for temporary buffers (buffers allocated with <a class="el" href="icalmemory_8h.html#ad73fe2ed5791e8d4d4513b1e23f7b86e" title="Creates a new temporary buffer on the ring and returns it.">icalmemory_tmp_buffer()</a> and related functions)!</dd></dl>
+<dl class="section user"><dt>Error handling</dt><dd>Sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a> if <em>buf</em>, <code>*buf</code>, <em>pos</em>, <code>* pos</code>, <em>buf_size</em> or <em>string</em> are <code>NULL</code>.</dd></dl>
<p>This method will copy the string <em>string</em> to the buffer <em>buf</em> starting at position <em>pos</em>, reallocing <em>buf</em> if it is too small. <em>buf_size</em> is the size of <em>buf</em> and will be changed if <em>buf</em> is reallocated. <em>pos</em> will point to the last byte of the new string in <em>buf</em>, usually a &lsquo;&rsquo;\0'`</p>
-<h3>Example</h3>
-<div class="fragment"><div class="line"><span class="comment">// creates a new buffer</span></div><div class="line"><span class="keywordtype">int</span> buffer_len = 15;</div><div class="line"><span class="keywordtype">char</span> *buffer = <a class="code" href="icalmemory_8c.html#a44986d86c778125a313d423b70cd2b54">icalmemory_new_buffer</a>(buffer_len);</div><div class="line">strcpy(buffer, <span class="stringliteral">&quot;My name is: &quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// append a string to the buffer</span></div><div class="line"><span class="keywordtype">int</span> buffer_end = strlen(buffer);</div><div class="line"><span class="keywordtype">char</span> *buffer_end_pos = buffer[buffer_str_end];</div><div class="line"><a class="code" href="icalmemory_8c.html#a647bf5dab81fc5b83a0ed8f8ad769ea6">icalmemory_append_string</a>(&amp;buffer, &amp;buffer_end_pos, &amp;buffer_len, <span class="stringliteral">&quot;John Doe&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// print string</span></div><div class="line">printf(<span class="stringliteral">&quot;%s\n&quot;</span>, buffer);</div><div class="line"></div><div class="line"><span class="comment">// release memory</span></div><div class="line"><a class="code" href="icalmemory_8c.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a>(buffer);</div></div><!-- fragment -->
+<p>### Example </p><div class="fragment"><div class="line"><span class="comment">// creates a new buffer</span></div><div class="line"><span class="keywordtype">int</span> buffer_len = 15;</div><div class="line"><span class="keywordtype">char</span> *buffer = <a class="code" href="icalmemory_8c.html#a44986d86c778125a313d423b70cd2b54">icalmemory_new_buffer</a>(buffer_len);</div><div class="line">strcpy(buffer, <span class="stringliteral">&quot;My name is: &quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// append a string to the buffer</span></div><div class="line"><span class="keywordtype">int</span> buffer_end = strlen(buffer);</div><div class="line"><span class="keywordtype">char</span> *buffer_end_pos = buffer[buffer_str_end];</div><div class="line"><a class="code" href="icalmemory_8c.html#a647bf5dab81fc5b83a0ed8f8ad769ea6">icalmemory_append_string</a>(&amp;buffer, &amp;buffer_end_pos, &amp;buffer_len, <span class="stringliteral">&quot;John Doe&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// print string</span></div><div class="line">printf(<span class="stringliteral">&quot;%s\n&quot;</span>, buffer);</div><div class="line"></div><div class="line"><span class="comment">// release memory</span></div><div class="line"><a class="code" href="icalmemory_8c.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a>(buffer);</div></div><!-- fragment -->
</div>
</div>
<a id="a2f164cb87c67f06b5dc04a5f21384879"></a>
@@ -280,7 +277,7 @@ Functions</h2></td></tr>
</table>
</dd>
</dl>
-<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54" title="Creates new buffer with the specified size. ">icalmemory_new_buffer()</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54" title="Creates new buffer with the specified size.">icalmemory_new_buffer()</a></dd></dl>
<p>Releases the memory of the buffer. </p>
</div>
@@ -303,8 +300,7 @@ Functions</h2></td></tr>
<p>Free all memory used in the ring. </p>
<p>Frees all memory used in the ring. Depending on if ::HAVE_PTHREAD is set or not, the ring buffer is allocated on a per-thread basis, meaning that if all rings are to be released, it must be called once in every thread.</p>
-<h3>Usage</h3>
-<div class="fragment"><div class="line"><span class="keywordtype">void</span> *buf = <a class="code" href="icalmemory_8c.html#ad73fe2ed5791e8d4d4513b1e23f7b86e">icalmemory_tmp_buffer</a>(256);</div><div class="line"></div><div class="line"><span class="comment">// use buf</span></div><div class="line"></div><div class="line"><span class="comment">// release buf and all other memory in the ring buffer</span></div><div class="line"><a class="code" href="icalmemory_8c.html#a2a5f97e68688bcaac234db8fc9e4b240">icalmemory_free_ring</a>();</div></div><!-- fragment -->
+<p>### Usage </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> *buf = <a class="code" href="icalmemory_8c.html#ad73fe2ed5791e8d4d4513b1e23f7b86e">icalmemory_tmp_buffer</a>(256);</div><div class="line"></div><div class="line"><span class="comment">// use buf</span></div><div class="line"></div><div class="line"><span class="comment">// release buf and all other memory in the ring buffer</span></div><div class="line"><a class="code" href="icalmemory_8c.html#a2a5f97e68688bcaac234db8fc9e4b240">icalmemory_free_ring</a>();</div></div><!-- fragment -->
</div>
</div>
<a id="a44986d86c778125a313d423b70cd2b54"></a>
@@ -331,12 +327,11 @@ Functions</h2></td></tr>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the newly-created buffer. </dd></dl>
-<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879" title="Releases a buffer. ">icalmemory_free_buffer()</a></dd></dl>
-<dl class="section user"><dt>Error handling</dt><dd>If there is a problem allocating memory, it sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value. ">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a055394ffaf6701aa12491dc10767f07d">ICAL_NEWFAILED_ERROR</a> and returns <code>NULL</code>.</dd></dl>
-<dl class="section user"><dt>Ownership</dt><dd>Buffers created with this method are owned by the caller. The must be released with the appropriate <a class="el" href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879" title="Releases a buffer. ">icalmemory_free_buffer()</a> method.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879" title="Releases a buffer.">icalmemory_free_buffer()</a></dd></dl>
+<dl class="section user"><dt>Error handling</dt><dd>If there is a problem allocating memory, it sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a055394ffaf6701aa12491dc10767f07d">ICAL_NEWFAILED_ERROR</a> and returns <code>NULL</code>.</dd></dl>
+<dl class="section user"><dt>Ownership</dt><dd>Buffers created with this method are owned by the caller. The must be released with the appropriate <a class="el" href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879" title="Releases a buffer.">icalmemory_free_buffer()</a> method.</dd></dl>
<p>This creates a new (non-temporary) buffer of the specified <em>size</em>. All buffers returned by this method are zeroed-out.</p>
-<h3>Usage</h3>
-<div class="fragment"><div class="line"><span class="comment">// create buffer</span></div><div class="line"><span class="keywordtype">char</span> *buffer = <a class="code" href="icalmemory_8c.html#a44986d86c778125a313d423b70cd2b54">icalmemory_new_buffer</a>(50);</div><div class="line"></div><div class="line"><span class="comment">// fill buffer</span></div><div class="line">strcpy(buffer, <span class="stringliteral">&quot;some data&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// release buffer</span></div><div class="line"><a class="code" href="icalmemory_8c.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a>(buffer);</div></div><!-- fragment -->
+<p>### Usage </p><div class="fragment"><div class="line"><span class="comment">// create buffer</span></div><div class="line"><span class="keywordtype">char</span> *buffer = <a class="code" href="icalmemory_8c.html#a44986d86c778125a313d423b70cd2b54">icalmemory_new_buffer</a>(50);</div><div class="line"></div><div class="line"><span class="comment">// fill buffer</span></div><div class="line">strcpy(buffer, <span class="stringliteral">&quot;some data&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// release buffer</span></div><div class="line"><a class="code" href="icalmemory_8c.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a>(buffer);</div></div><!-- fragment -->
</div>
</div>
<a id="a4e657ee861bf1f00ed4e6eb03cd4a0a5"></a>
@@ -365,7 +360,7 @@ Functions</h2></td></tr>
</table>
</div><div class="memdoc">
-<p>Resizes a buffer created with <a class="el" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54" title="Creates new buffer with the specified size. ">icalmemory_new_buffer()</a>. </p>
+<p>Resizes a buffer created with <a class="el" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54" title="Creates new buffer with the specified size.">icalmemory_new_buffer()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">buf</td><td>The buffer to be resized. </td></tr>
@@ -374,12 +369,11 @@ Functions</h2></td></tr>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new, resized buffer. </dd></dl>
-<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54" title="Creates new buffer with the specified size. ">icalmemory_new_buffer()</a> </dd></dl>
-<dl class="section warning"><dt>Warning</dt><dd>This method may not be used for temporary buffers (buffers allocated with <a class="el" href="icalmemory_8h.html#ad73fe2ed5791e8d4d4513b1e23f7b86e" title="Creates a new temporary buffer on the ring and returns it. ">icalmemory_tmp_buffer()</a> and related functions)!</dd></dl>
-<dl class="section user"><dt>Error handling</dt><dd>If there is a problem while reallocating the buffer, the method sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value. ">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a055394ffaf6701aa12491dc10767f07d">ICAL_NEWFAILED_ERROR</a> and returns <code>NULL</code>.</dd></dl>
-<dl class="section user"><dt>Ownership</dt><dd>The returned buffer is owned by the caller and needs to be released with the appropriate <a class="el" href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879" title="Releases a buffer. ">icalmemory_free_buffer()</a> method. The old buffer, <em>buf</em>, can not be used anymore after calling this method.</dd></dl>
-<h3>Usage</h3>
-<div class="fragment"><div class="line"><span class="comment">// create new buffer</span></div><div class="line"><span class="keywordtype">char</span> *buffer = <a class="code" href="icalmemory_8c.html#a44986d86c778125a313d423b70cd2b54">icalmemory_new_buffer</a>(10);</div><div class="line"></div><div class="line"><span class="comment">// fill buffer</span></div><div class="line">strcpy(buffer, <span class="stringliteral">&quot;some data&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// expand buffer</span></div><div class="line">buffer = <a class="code" href="icalmemory_8c.html#a4e657ee861bf1f00ed4e6eb03cd4a0a5">icalmemory_resize_buffer</a>(buffer, 20);</div><div class="line"></div><div class="line"><span class="comment">// fill with more data</span></div><div class="line">strcpy(buffer, <span class="stringliteral">&quot;a lot more data&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// release</span></div><div class="line"><a class="code" href="icalmemory_8c.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a>(buffer);</div></div><!-- fragment -->
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54" title="Creates new buffer with the specified size.">icalmemory_new_buffer()</a> </dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>This method may not be used for temporary buffers (buffers allocated with <a class="el" href="icalmemory_8h.html#ad73fe2ed5791e8d4d4513b1e23f7b86e" title="Creates a new temporary buffer on the ring and returns it.">icalmemory_tmp_buffer()</a> and related functions)!</dd></dl>
+<dl class="section user"><dt>Error handling</dt><dd>If there is a problem while reallocating the buffer, the method sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a055394ffaf6701aa12491dc10767f07d">ICAL_NEWFAILED_ERROR</a> and returns <code>NULL</code>.</dd></dl>
+<dl class="section user"><dt>Ownership</dt><dd>The returned buffer is owned by the caller and needs to be released with the appropriate <a class="el" href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879" title="Releases a buffer.">icalmemory_free_buffer()</a> method. The old buffer, <em>buf</em>, can not be used anymore after calling this method.</dd></dl>
+<p>### Usage </p><div class="fragment"><div class="line"><span class="comment">// create new buffer</span></div><div class="line"><span class="keywordtype">char</span> *buffer = <a class="code" href="icalmemory_8c.html#a44986d86c778125a313d423b70cd2b54">icalmemory_new_buffer</a>(10);</div><div class="line"></div><div class="line"><span class="comment">// fill buffer</span></div><div class="line">strcpy(buffer, <span class="stringliteral">&quot;some data&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// expand buffer</span></div><div class="line">buffer = <a class="code" href="icalmemory_8c.html#a4e657ee861bf1f00ed4e6eb03cd4a0a5">icalmemory_resize_buffer</a>(buffer, 20);</div><div class="line"></div><div class="line"><span class="comment">// fill with more data</span></div><div class="line">strcpy(buffer, <span class="stringliteral">&quot;a lot more data&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// release</span></div><div class="line"><a class="code" href="icalmemory_8c.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a>(buffer);</div></div><!-- fragment -->
</div>
</div>
<a id="aeae6b906a9fcba61eb725d060361b180"></a>
@@ -409,8 +403,7 @@ Functions</h2></td></tr>
<dl class="section user"><dt>Error handling</dt><dd>The string <em>s</em> must not be <code>NULL</code>, otherwise depending on the <code>libc</code> used, it might lead to undefined behaviour (read: segfaults).</dd></dl>
<dl class="section user"><dt>Ownership</dt><dd>The returned string is owned by the caller and needs to be released with the appropriate <code>free()</code> method.</dd></dl>
<p>A wrapper around <code>strdup()</code>. Partly to trap calls to <code>strdup()</code>, partly because in <code>-ansi</code>, <code>gcc</code> on Red Hat claims that <code>strdup()</code> is undeclared.</p>
-<h3>Usage</h3>
-<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> *my_str = <span class="stringliteral">&quot;LibIcal&quot;</span>;</div><div class="line"><span class="keywordtype">char</span> *dup = <a class="code" href="icalmemory_8c.html#aeae6b906a9fcba61eb725d060361b180">icalmemory_strdup</a>(my_str);</div><div class="line">printf(<span class="stringliteral">&quot;%s\n&quot;</span>, dup);</div><div class="line">free(dup);</div></div><!-- fragment -->
+<p>### Usage </p><div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> *my_str = <span class="stringliteral">&quot;LibIcal&quot;</span>;</div><div class="line"><span class="keywordtype">char</span> *dup = <a class="code" href="icalmemory_8c.html#aeae6b906a9fcba61eb725d060361b180">icalmemory_strdup</a>(my_str);</div><div class="line">printf(<span class="stringliteral">&quot;%s\n&quot;</span>, dup);</div><div class="line">free(dup);</div></div><!-- fragment -->
</div>
</div>
<a id="ad73fe2ed5791e8d4d4513b1e23f7b86e"></a>
@@ -437,11 +430,10 @@ Functions</h2></td></tr>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the newly created buffer on the ring</dd></dl>
-<p>Creates a temporary buffer on the ring. Regardless of what <em>size</em> you specify, the buffer will always be at least <a class="el" href="icalmemory_8c.html#a01464ed9cb0292540d7e0fb3d16d3844" title="Determines the minimal size of buffers in the ring that are created with icalmemory_tmp_buffer(). ">MIN_BUFFER_SIZE</a> big, and it will be zeroed out.</p>
-<dl class="section user"><dt>Error handling</dt><dd>If there is a problem allocating memory for the buffer, it sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value. ">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a055394ffaf6701aa12491dc10767f07d">ICAL_NEWFAILED_ERROR</a> and returns <code>NULL</code>.</dd></dl>
+<p>Creates a temporary buffer on the ring. Regardless of what <em>size</em> you specify, the buffer will always be at least <a class="el" href="icalmemory_8c.html#a01464ed9cb0292540d7e0fb3d16d3844" title="Determines the minimal size of buffers in the ring that are created with icalmemory_tmp_buffer().">MIN_BUFFER_SIZE</a> big, and it will be zeroed out.</p>
+<dl class="section user"><dt>Error handling</dt><dd>If there is a problem allocating memory for the buffer, it sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a055394ffaf6701aa12491dc10767f07d">ICAL_NEWFAILED_ERROR</a> and returns <code>NULL</code>.</dd></dl>
<dl class="section user"><dt>Ownership</dt><dd>The returned buffer is owned by icalmemory. It must not be freed by the caller and the returned memory will be automatically reclaimed as more items are added to the ring buffer.</dd></dl>
-<h3>Usage</h3>
-<div class="fragment"><div class="line"><span class="keywordtype">char</span> *str = <a class="code" href="icalmemory_8c.html#ad73fe2ed5791e8d4d4513b1e23f7b86e">icalmemory_tmp_buffer</a>(256);</div><div class="line">strcpy(str, <span class="stringliteral">&quot;some data&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// use str</span></div></div><!-- fragment -->
+<p>### Usage </p><div class="fragment"><div class="line"><span class="keywordtype">char</span> *str = <a class="code" href="icalmemory_8c.html#ad73fe2ed5791e8d4d4513b1e23f7b86e">icalmemory_tmp_buffer</a>(256);</div><div class="line">strcpy(str, <span class="stringliteral">&quot;some data&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// use str</span></div></div><!-- fragment -->
</div>
</div>
<a id="a3f5eccaa6b37d176a970b7d3a9f7aa66"></a>
@@ -470,8 +462,7 @@ Functions</h2></td></tr>
<dl class="section return"><dt>Returns</dt><dd>A copy of <em>str</em>, which has been placed on the ring buffer for automatic reclamation.</dd></dl>
<dl class="section user"><dt>Error handling</dt><dd>The passed string <em>str</em> must not be <code>NULL</code>, otherwise a segfault might ensue, since the routine calls <code>strlen()</code> on it.</dd></dl>
<dl class="section user"><dt>Ownership</dt><dd>The returned string is owned by icalmemory. It must not be freed by the caller, and it will be automatically reclaimed as more items are added to the buffer.</dd></dl>
-<h3>Usage</h3>
-<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> *str = <span class="stringliteral">&quot;Example string&quot;</span>;</div><div class="line"><span class="keywordtype">char</span> *tmp_copy = <a class="code" href="icalmemory_8c.html#a3f5eccaa6b37d176a970b7d3a9f7aa66">icalmemory_tmp_copy</a>(str);</div></div><!-- fragment -->
+<p>### Usage </p><div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> *str = <span class="stringliteral">&quot;Example string&quot;</span>;</div><div class="line"><span class="keywordtype">char</span> *tmp_copy = <a class="code" href="icalmemory_8c.html#a3f5eccaa6b37d176a970b7d3a9f7aa66">icalmemory_tmp_copy</a>(str);</div></div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
@@ -479,7 +470,7 @@ Functions</h2></td></tr>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
-</a> 1.8.14
+</a> 1.8.15
</small></address>
</body>
</html>