summaryrefslogtreecommitdiff
path: root/apidocs/icalmemory_8h_source.html
blob: 5422472095d386627ad86296fc13134c81c1bf92 (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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!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=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<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 id="projectrow">
  <td id="projectalign">
   <div id="projectname">Libical API Documentation<span id="projectnumber">&#160;3.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(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 id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*======================================================================</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> FILE: icalmemory.h</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> CREATOR: eric 30 June 1999</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"></span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> SPDX-FileCopyrightText: 2000, Eric Busboom &lt;eric@civicknowledge.com&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"></span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"> SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"></span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"> The Initial Developer of the Original Code is Eric Busboom</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">======================================================================*/</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#ifndef ICALMEMORY_H</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#define ICALMEMORY_H</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#include &quot;libical_ical_export.h&quot;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> *<a class="code hl_function" href="icalmemory_8h.html#aeaf6a28b3908f695bb0a7e35d1dfc8f7">icalmemory_tmp_buffer</a>(<span class="keywordtype">size_t</span> size);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">char</span> *<a class="code hl_function" href="icalmemory_8h.html#aa5f6b34db6cc88a33bd1cd745d44f977">icalmemory_tmp_copy</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *str);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code hl_function" href="icalmemory_8h.html#ae9f1799733a1577748a028181098be48">icalmemory_add_tmp_buffer</a>(<span class="keywordtype">void</span> *buf);</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span> </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code hl_function" href="icalmemory_8h.html#a175daa67f089bae6aefd4360fcd0d664">icalmemory_free_ring</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span><span class="keyword">typedef</span> <span class="keywordtype">void</span> *(*icalmemory_malloc_f)(size_t);</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span><span class="keyword">typedef</span> <span class="keywordtype">void</span> *(*icalmemory_realloc_f)(<span class="keywordtype">void</span> *, size_t);</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span><span class="keyword">typedef</span> void (*icalmemory_free_f)(<span class="keywordtype">void</span> *);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span> </div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code hl_function" href="icalmemory_8h.html#aeaa82604d4c5ccf150ecd2fb6bfca30d">icalmemory_set_mem_alloc_funcs</a>(icalmemory_malloc_f f_malloc,</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>                                                        icalmemory_realloc_f f_realloc,</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>                                                        icalmemory_free_f f_free);</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span> </div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code hl_function" href="icalmemory_8h.html#ae1659b63eaac2744cae912c727655721">icalmemory_get_mem_alloc_funcs</a>(icalmemory_malloc_f *f_malloc,</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span>                                                        icalmemory_realloc_f *f_realloc, icalmemory_free_f *f_free);</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span> </div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> *<a class="code hl_function" href="icalmemory_8h.html#a9b645edbcc1a05dbb64df5d86adbc367">icalmemory_new_buffer</a>(<span class="keywordtype">size_t</span> size);</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span> </div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> *<a class="code hl_function" href="icalmemory_8h.html#a6cf9578649d6f12bf8eae97e4ef537e9">icalmemory_resize_buffer</a>(<span class="keywordtype">void</span> *buf, <span class="keywordtype">size_t</span> size);</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span> </div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code hl_function" href="icalmemory_8h.html#a2f164cb87c67f06b5dc04a5f21384879">icalmemory_free_buffer</a>(<span class="keywordtype">void</span> *buf);</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno">  262</span> </div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno">  263</span><span class="comment">/* THESE ROUTINES CAN NOT BE USED ON TMP BUFFERS. Only use them on</span></div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno">  264</span><span class="comment">   normally allocated memory, or on buffers created from</span></div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span><span class="comment">   icalmemory_new_buffer, never with buffers created by</span></div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno">  266</span><span class="comment">   icalmemory_tmp_buffer. If icalmemory_append_string has to resize a</span></div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span><span class="comment">   buffer on the ring, the ring will loose track of it an you will</span></div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span><span class="comment">   have memory problems. */</span></div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno">  269</span> </div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno">  308</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code hl_function" 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 id="l00309" name="l00309"></a><span class="lineno">  309</span>                                                  <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>);</div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno">  310</span> </div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno">  350</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">void</span> <a class="code hl_function" 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 id="l00351" name="l00351"></a><span class="lineno">  351</span> </div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno">  378</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">char</span> *<a class="code hl_function" href="icalmemory_8h.html#a313a5fd91cb6100f9ecc1b8f24acc336">icalmemory_strdup</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *s);</div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno">  379</span> </div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno">  380</span><span class="preprocessor">#endif </span><span class="comment">/* !ICALMEMORY_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="aicalmemory_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">Frees all memory used in the ring.</div><div class="ttdef"><b>Definition:</b> icalmemory.c:215</div></div>
<div class="ttc" id="aicalmemory_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:359</div></div>
<div class="ttc" id="aicalmemory_8h_html_a313a5fd91cb6100f9ecc1b8f24acc336"><div class="ttname"><a href="icalmemory_8h.html#a313a5fd91cb6100f9ecc1b8f24acc336">icalmemory_strdup</a></div><div class="ttdeci">char * icalmemory_strdup(const char *s)</div><div class="ttdoc">Creates a duplicate of a string.</div><div class="ttdef"><b>Definition:</b> icalmemory.c:249</div></div>
<div class="ttc" id="aicalmemory_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">Appends a string to a buffer.</div><div class="ttdef"><b>Definition:</b> icalmemory.c:369</div></div>
<div class="ttc" id="aicalmemory_8h_html_a6cf9578649d6f12bf8eae97e4ef537e9"><div class="ttname"><a href="icalmemory_8h.html#a6cf9578649d6f12bf8eae97e4ef537e9">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:340</div></div>
<div class="ttc" id="aicalmemory_8h_html_a9b645edbcc1a05dbb64df5d86adbc367"><div class="ttname"><a href="icalmemory_8h.html#a9b645edbcc1a05dbb64df5d86adbc367">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:319</div></div>
<div class="ttc" id="aicalmemory_8h_html_aa5f6b34db6cc88a33bd1cd745d44f977"><div class="ttname"><a href="icalmemory_8h.html#aa5f6b34db6cc88a33bd1cd745d44f977">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:232</div></div>
<div class="ttc" id="aicalmemory_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">Appends a character to a buffer.</div><div class="ttdef"><b>Definition:</b> icalmemory.c:411</div></div>
<div class="ttc" id="aicalmemory_8h_html_ae1659b63eaac2744cae912c727655721"><div class="ttname"><a href="icalmemory_8h.html#ae1659b63eaac2744cae912c727655721">icalmemory_get_mem_alloc_funcs</a></div><div class="ttdeci">void icalmemory_get_mem_alloc_funcs(icalmemory_malloc_f *f_malloc, icalmemory_realloc_f *f_realloc, icalmemory_free_f *f_free)</div><div class="ttdoc">Returns the functions used for memory management.</div><div class="ttdef"><b>Definition:</b> icalmemory.c:300</div></div>
<div class="ttc" id="aicalmemory_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">Adds an externally allocated buffer to the ring.</div><div class="ttdef"><b>Definition:</b> icalmemory.c:167</div></div>
<div class="ttc" id="aicalmemory_8h_html_aeaa82604d4c5ccf150ecd2fb6bfca30d"><div class="ttname"><a href="icalmemory_8h.html#aeaa82604d4c5ccf150ecd2fb6bfca30d">icalmemory_set_mem_alloc_funcs</a></div><div class="ttdeci">void icalmemory_set_mem_alloc_funcs(icalmemory_malloc_f f_malloc, icalmemory_realloc_f f_realloc, icalmemory_free_f f_free)</div><div class="ttdoc">Configures the functions to use for memory management.</div><div class="ttdef"><b>Definition:</b> icalmemory.c:291</div></div>
<div class="ttc" id="aicalmemory_8h_html_aeaf6a28b3908f695bb0a7e35d1dfc8f7"><div class="ttname"><a href="icalmemory_8h.html#aeaf6a28b3908f695bb0a7e35d1dfc8f7">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:193</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Jun 25 2022 08:55:43 for Libical API Documentation by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3
</small></address>
</body>
</html>