summaryrefslogtreecommitdiff
path: root/apidocs/icalmemory_8h_source.html
blob: 41069533efe178d7a15441a668ef9d3b9febef7f (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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="viewport" content="width=device-width, initial-scale=1"/>
<title>Libical API Documentation: icalmemory.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Libical API Documentation
   &#160;<span id="projectnumber">3.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<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');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b7a0ea939f6e83384f3c571d31a84be9.html">libical</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">icalmemory.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="icalmemory_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*======================================================================</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> FILE: icalmemory.h</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> CREATOR: eric 30 June 1999</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> (C) COPYRIGHT 2000, Eric Busboom &lt;eric@softwarestudio.org&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">     http://www.softwarestudio.org</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> This library is free software; you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> it under the terms of either:</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">    The LGPL as published by the Free Software Foundation, version</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">    2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> Or:</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">    The Mozilla Public License Version 2.0. You may obtain a copy of</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">    the License at http://www.mozilla.org/MPL/</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> The Initial Developer of the Original Code is Eric Busboom</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">======================================================================*/</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifndef ICALMEMORY_H</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define ICALMEMORY_H</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#include &quot;libical_ical_export.h&quot;</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> *<a class="code" href="icalmemory_8h.html#ad73fe2ed5791e8d4d4513b1e23f7b86e">icalmemory_tmp_buffer</a>(<span class="keywordtype">size_t</span> size);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;LIBICAL_ICAL_EXPORT <span class="keywordtype">char</span> *<a class="code" href="icalmemory_8h.html#a3f5eccaa6b37d176a970b7d3a9f7aa66">icalmemory_tmp_copy</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *str);</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code" href="icalmemory_8h.html#ae9f1799733a1577748a028181098be48">icalmemory_add_tmp_buffer</a>(<span class="keywordtype">void</span> *buf);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code" href="icalmemory_8h.html#a175daa67f089bae6aefd4360fcd0d664">icalmemory_free_ring</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="comment">/* Non-tmp buffers must be freed. These are mostly wrappers around</span></div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="comment"> * malloc, etc, but are used so the caller can change the memory</span></div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="comment"> * allocators in a future version of the library */</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> *<a class="code" href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54">icalmemory_new_buffer</a>(<span class="keywordtype">size_t</span> size);</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> *<a class="code" href="icalmemory_8h.html#a4e657ee861bf1f00ed4e6eb03cd4a0a5">icalmemory_resize_buffer</a>(<span class="keywordtype">void</span> *buf, <span class="keywordtype">size_t</span> size);</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code" href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a>(<span class="keywordtype">void</span> *buf);</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;<span class="comment">/* THESE ROUTINES CAN NOT BE USED ON TMP BUFFERS. Only use them on</span></div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="comment">   normally allocated memory, or on buffers created from</span></div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="comment">   icalmemory_new_buffer, never with buffers created by</span></div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;<span class="comment">   icalmemory_tmp_buffer. If icalmemory_append_string has to resize a</span></div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;<span class="comment">   buffer on the ring, the ring will loose track of it an you will</span></div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="comment">   have memory problems. */</span></div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code" href="icalmemory_8h.html#a647bf5dab81fc5b83a0ed8f8ad769ea6">icalmemory_append_string</a>(<span class="keywordtype">char</span> **buf, <span class="keywordtype">char</span> **pos, <span class="keywordtype">size_t</span> *buf_size,</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;                                                  <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>);</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code" href="icalmemory_8h.html#addac122edb16bc41a193895c86bd5ff5">icalmemory_append_char</a>(<span class="keywordtype">char</span> **buf, <span class="keywordtype">char</span> **pos, <span class="keywordtype">size_t</span> *buf_size, <span class="keywordtype">char</span> ch);</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;LIBICAL_ICAL_EXPORT <span class="keywordtype">char</span> *<a class="code" href="icalmemory_8h.html#aeae6b906a9fcba61eb725d060361b180">icalmemory_strdup</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *s);</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* !ICALMEMORY_H */</span><span class="preprocessor"></span></div><div class="ttc" id="icalmemory_8h_html_a175daa67f089bae6aefd4360fcd0d664"><div class="ttname"><a href="icalmemory_8h.html#a175daa67f089bae6aefd4360fcd0d664">icalmemory_free_ring</a></div><div class="ttdeci">void icalmemory_free_ring(void)</div><div class="ttdoc">Free all memory used in the ring. </div><div class="ttdef"><b>Definition:</b> icalmemory.c:232</div></div>
<div class="ttc" id="icalmemory_8h_html_aeae6b906a9fcba61eb725d060361b180"><div class="ttname"><a href="icalmemory_8h.html#aeae6b906a9fcba61eb725d060361b180">icalmemory_strdup</a></div><div class="ttdeci">char * icalmemory_strdup(const char *s)</div><div class="ttdoc">Create a duplicate of a string. </div><div class="ttdef"><b>Definition:</b> icalmemory.c:256</div></div>
<div class="ttc" id="icalmemory_8h_html_a2f164cb87c67f06b5dc04a5f21384879"><div class="ttname"><a href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a></div><div class="ttdeci">void icalmemory_free_buffer(void *buf)</div><div class="ttdoc">Releases a buffer. </div><div class="ttdef"><b>Definition:</b> icalmemory.c:292</div></div>
<div class="ttc" id="icalmemory_8h_html_ad73fe2ed5791e8d4d4513b1e23f7b86e"><div class="ttname"><a href="icalmemory_8h.html#ad73fe2ed5791e8d4d4513b1e23f7b86e">icalmemory_tmp_buffer</a></div><div class="ttdeci">void * icalmemory_tmp_buffer(size_t size)</div><div class="ttdoc">Creates a new temporary buffer on the ring and returns it. </div><div class="ttdef"><b>Definition:</b> icalmemory.c:210</div></div>
<div class="ttc" id="icalmemory_8h_html_addac122edb16bc41a193895c86bd5ff5"><div class="ttname"><a href="icalmemory_8h.html#addac122edb16bc41a193895c86bd5ff5">icalmemory_append_char</a></div><div class="ttdeci">void icalmemory_append_char(char **buf, char **pos, size_t *buf_size, char ch)</div><div class="ttdoc">Append a character to a buffer. </div><div class="ttdef"><b>Definition:</b> icalmemory.c:335</div></div>
<div class="ttc" id="icalmemory_8h_html_a4e657ee861bf1f00ed4e6eb03cd4a0a5"><div class="ttname"><a href="icalmemory_8h.html#a4e657ee861bf1f00ed4e6eb03cd4a0a5">icalmemory_resize_buffer</a></div><div class="ttdeci">void * icalmemory_resize_buffer(void *buf, size_t size)</div><div class="ttdoc">Resizes a buffer created with icalmemory_new_buffer(). </div><div class="ttdef"><b>Definition:</b> icalmemory.c:280</div></div>
<div class="ttc" id="icalmemory_8h_html_a3f5eccaa6b37d176a970b7d3a9f7aa66"><div class="ttname"><a href="icalmemory_8h.html#a3f5eccaa6b37d176a970b7d3a9f7aa66">icalmemory_tmp_copy</a></div><div class="ttdeci">char * icalmemory_tmp_copy(const char *str)</div><div class="ttdoc">Creates a copy of the given string, stored on the ring buffer, and returns it. </div><div class="ttdef"><b>Definition:</b> icalmemory.c:247</div></div>
<div class="ttc" id="icalmemory_8h_html_a44986d86c778125a313d423b70cd2b54"><div class="ttname"><a href="icalmemory_8h.html#a44986d86c778125a313d423b70cd2b54">icalmemory_new_buffer</a></div><div class="ttdeci">void * icalmemory_new_buffer(size_t size)</div><div class="ttdoc">Creates new buffer with the specified size. </div><div class="ttdef"><b>Definition:</b> icalmemory.c:266</div></div>
<div class="ttc" id="icalmemory_8h_html_a647bf5dab81fc5b83a0ed8f8ad769ea6"><div class="ttname"><a href="icalmemory_8h.html#a647bf5dab81fc5b83a0ed8f8ad769ea6">icalmemory_append_string</a></div><div class="ttdeci">void icalmemory_append_string(char **buf, char **pos, size_t *buf_size, const char *string)</div><div class="ttdoc">Append a string to a buffer. </div><div class="ttdef"><b>Definition:</b> icalmemory.c:297</div></div>
<div class="ttc" id="icalmemory_8h_html_ae9f1799733a1577748a028181098be48"><div class="ttname"><a href="icalmemory_8h.html#ae9f1799733a1577748a028181098be48">icalmemory_add_tmp_buffer</a></div><div class="ttdeci">void icalmemory_add_tmp_buffer(void *buf)</div><div class="ttdoc">Add an externally allocated buffer to the ring. </div><div class="ttdef"><b>Definition:</b> icalmemory.c:187</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<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
</small></address>
</body>
</html>