docs/api-2.1/buffer_8h_source.html

Sun, 09 Apr 2023 19:03:58 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 09 Apr 2023 19:03:58 +0200
changeset 677
b09aae58bba4
parent 390
d345541018fa
permissions
-rw-r--r--

refactoring of collections to make use of destructors in map implementations

390
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 <html xmlns="http://www.w3.org/1999/xhtml">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 <head>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 <meta name="generator" content="Doxygen 1.8.13"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 <title>ucx: /home/mike/workspace/c/ucx/src/ucx/buffer.h Source File</title>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 <script type="text/javascript" src="jquery.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 <script type="text/javascript" src="dynsections.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 <link href="search/search.css" rel="stylesheet" type="text/css"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 <script type="text/javascript" src="search/searchdata.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 <script type="text/javascript" src="search/search.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 <link href="doxygen.css" rel="stylesheet" type="text/css" />
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 </head>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 <body>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 <div id="titlearea">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 <table cellspacing="0" cellpadding="0">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 <tbody>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 <tr style="height: 56px;">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 <td id="projectalign" style="padding-left: 0.5em;">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 <div id="projectname">ucx
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 <div id="projectbrief">UAP Common Extensions</div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 </tbody>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33 <!-- end header part -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 <!-- Generated by Doxygen 1.8.13 -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 <script type="text/javascript">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 var searchBox = new SearchBox("searchBox", "search",false,'Search');
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 </script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 <script type="text/javascript" src="menudata.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 <script type="text/javascript" src="menu.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 <script type="text/javascript">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 $(function() {
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 initMenu('',true,false,'search.php','Search');
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43 $(document).ready(function() { init_search(); });
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 });
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45 </script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 <div id="main-nav"></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 <!-- window showing the filter options -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48 <div id="MSearchSelectWindow"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 onmouseover="return searchBox.OnSearchSelectShow()"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 onmouseout="return searchBox.OnSearchSelectHide()"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 onkeydown="return searchBox.OnSearchSelectKey(event)">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 <!-- iframe showing the search results (closed by default) -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 <div id="MSearchResultsWindow">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56 <iframe src="javascript:void(0)" frameborder="0"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57 name="MSearchResults" id="MSearchResults">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58 </iframe>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61 <div id="nav-path" class="navpath">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 <ul>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63 <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_69f4ea29401808fe6229564976cde3ce.html">ucx</a></li> </ul>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 </div><!-- top -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66 <div class="header">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 <div class="headertitle">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
68 <div class="title">buffer.h</div> </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
69 </div><!--header-->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70 <div class="contents">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
71 <a href="buffer_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"> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Copyright 2017 Mike Becker, Olaf Wintermann All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions are met:</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * 1. Redistributions of source code must retain the above copyright</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer in the</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * documentation and/or other materials provided with the distribution.</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"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="preprocessor">#ifndef UCX_BUFFER_H</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#define UCX_BUFFER_H</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="ucx_8h.html">ucx.h</a>&quot;</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="preprocessor">#include &lt;sys/types.h&gt;</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="buffer_8h.html#acc77c8ed7b26854f555d4a5d11e49ea2"> 60</a></span>&#160;<span class="preprocessor">#define UCX_BUFFER_DEFAULT 0x00</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="buffer_8h.html#a8bab11ad8a76719228b9ee91e2e45535"> 65</a></span>&#160;<span class="preprocessor">#define UCX_BUFFER_AUTOFREE 0x01</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="buffer_8h.html#a05f9565f2d04399168c3b1c152a632be"> 70</a></span>&#160;<span class="preprocessor">#define UCX_BUFFER_AUTOEXTEND 0x02</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="structUcxBuffer.html"> 73</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="structUcxBuffer.html#a1a5076e85acb84b715a53bc0f37fb721"> 75</a></span>&#160; <span class="keywordtype">char</span> *<a class="code" href="structUcxBuffer.html#a1a5076e85acb84b715a53bc0f37fb721">space</a>;</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="structUcxBuffer.html#a7a64288f002cf62b492e2ea49c79615c"> 77</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structUcxBuffer.html#a7a64288f002cf62b492e2ea49c79615c">pos</a>;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="structUcxBuffer.html#a385661894f3cee9c549bfe07a8b316bf"> 79</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structUcxBuffer.html#a385661894f3cee9c549bfe07a8b316bf">capacity</a>;</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="structUcxBuffer.html#aec0aea8325394951d5ad4a9fbb8e1ac7"> 81</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structUcxBuffer.html#aec0aea8325394951d5ad4a9fbb8e1ac7">size</a>;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="structUcxBuffer.html#ac642e07b0a03be5aac48eb4aa5bec2f7"> 88</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="structUcxBuffer.html#ac642e07b0a03be5aac48eb4aa5bec2f7">flags</a>;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;} <a class="code" href="structUcxBuffer.html">UcxBuffer</a>;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;<a class="code" href="structUcxBuffer.html">UcxBuffer</a> *<a class="code" href="buffer_8h.html#aacea876d692193ec6f859ce98da7351c">ucx_buffer_new</a>(<span class="keywordtype">void</span> *space, <span class="keywordtype">size_t</span> capacity, <span class="keywordtype">int</span> flags);</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<span class="keywordtype">void</span> <a class="code" href="buffer_8h.html#a2af8646d8905c22c7322e7540b0440af">ucx_buffer_free</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a>* buffer);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<a class="code" href="structUcxBuffer.html">UcxBuffer</a>* <a class="code" href="buffer_8h.html#a33fa7bb35fe08bbb3542f227514332ef">ucx_buffer_extract</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a> *src,</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordtype">size_t</span> start, <span class="keywordtype">size_t</span> length, <span class="keywordtype">int</span> flags);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="buffer_8h.html#a828353846428c2c2f695f9938f059e52"> 137</a></span>&#160;<span class="preprocessor">#define ucx_buffer_clone(src,flags) \</span></div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;<span class="preprocessor"> ucx_buffer_extract(src, 0, (src)-&gt;capacity, flags)</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;<span class="keywordtype">int</span> <a class="code" href="buffer_8h.html#a12a0c6a2379ef080043e6286bb8bad69">ucx_buffer_shift</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a>* buffer, off_t shift);</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;<span class="keywordtype">int</span> <a class="code" href="buffer_8h.html#a4fa10b6471495547eb981248fd4f1bc2">ucx_buffer_shift_right</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a>* buffer, <span class="keywordtype">size_t</span> shift);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;<span class="keywordtype">int</span> <a class="code" href="buffer_8h.html#a20431dd0ed6a6fe9f15333bd72afe4db">ucx_buffer_shift_left</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a>* buffer, <span class="keywordtype">size_t</span> shift);</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;<span class="keywordtype">int</span> <a class="code" href="buffer_8h.html#a47d98482662073c74f35deb0957d15d1">ucx_buffer_seek</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a> *buffer, off_t offset, <span class="keywordtype">int</span> whence);</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="buffer_8h.html#a374abd5aabfcc3ee0777a79d5fe651ab"> 229</a></span>&#160;<span class="preprocessor">#define ucx_buffer_clear(buffer) memset((buffer)-&gt;space, 0, (buffer)-&gt;size); \</span></div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;<span class="preprocessor"> (buffer)-&gt;size = 0; (buffer)-&gt;pos = 0;</span></div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;<span class="keywordtype">int</span> <a class="code" href="buffer_8h.html#abad7fd9ad5061224c780b8d1d4c55f09">ucx_buffer_eof</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a> *buffer);</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160;</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;<span class="keywordtype">int</span> <a class="code" href="buffer_8h.html#afaf97d2cd7e9faad79a9d35fe33e30c6">ucx_buffer_extend</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a> *buffer, <span class="keywordtype">size_t</span> additional_bytes);</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160;</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;<span class="keywordtype">size_t</span> <a class="code" href="buffer_8h.html#af8aacc7401814392b58c1b7b81bffc05">ucx_buffer_write</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *ptr, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> nitems,</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; <a class="code" href="structUcxBuffer.html">UcxBuffer</a> *buffer);</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;<span class="keywordtype">size_t</span> <a class="code" href="buffer_8h.html#ae5c3430759f0059547b35d5a254d4da5">ucx_buffer_read</a>(<span class="keywordtype">void</span> *ptr, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> nitems,</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <a class="code" href="structUcxBuffer.html">UcxBuffer</a> *buffer);</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;<span class="keywordtype">int</span> <a class="code" href="buffer_8h.html#a7d6f01b9d631b0123475dfb98fb849ac">ucx_buffer_putc</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a> *buffer, <span class="keywordtype">int</span> c);</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160;<span class="keywordtype">int</span> <a class="code" href="buffer_8h.html#a396339022159ce4ca6d069de9f9209b0">ucx_buffer_getc</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a> *buffer);</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160;<span class="keywordtype">size_t</span> <a class="code" href="buffer_8h.html#af1d4b478e04b3ae0bf30e7c2ea964ea2">ucx_buffer_puts</a>(<a class="code" href="structUcxBuffer.html">UcxBuffer</a> *buffer, <span class="keyword">const</span> <span class="keywordtype">char</span> *str);</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160;</div><div class="line"><a name="l00332"></a><span class="lineno"><a class="line" href="buffer_8h.html#a0f4b64f1b3a74c4f6c5d9409d6b6086a"> 332</a></span>&#160;<span class="preprocessor">#define ucx_buffer_to_sstr(buffer) sstrn((buffer)-&gt;space, (buffer)-&gt;size)</span></div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160;</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160;}</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160;</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* UCX_BUFFER_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160;</div><div class="ttc" id="structUcxBuffer_html_ac642e07b0a03be5aac48eb4aa5bec2f7"><div class="ttname"><a href="structUcxBuffer.html#ac642e07b0a03be5aac48eb4aa5bec2f7">UcxBuffer::flags</a></div><div class="ttdeci">int flags</div><div class="ttdoc">Flag register for buffer features. </div><div class="ttdef"><b>Definition:</b> buffer.h:88</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72 <div class="ttc" id="buffer_8h_html_a47d98482662073c74f35deb0957d15d1"><div class="ttname"><a href="buffer_8h.html#a47d98482662073c74f35deb0957d15d1">ucx_buffer_seek</a></div><div class="ttdeci">int ucx_buffer_seek(UcxBuffer *buffer, off_t offset, int whence)</div><div class="ttdoc">Moves the position of the buffer. </div><div class="ttdef"><b>Definition:</b> buffer.c:90</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 <div class="ttc" id="buffer_8h_html_ae5c3430759f0059547b35d5a254d4da5"><div class="ttname"><a href="buffer_8h.html#ae5c3430759f0059547b35d5a254d4da5">ucx_buffer_read</a></div><div class="ttdeci">size_t ucx_buffer_read(void *ptr, size_t size, size_t nitems, UcxBuffer *buffer)</div><div class="ttdoc">Reads data from a UcxBuffer. </div><div class="ttdef"><b>Definition:</b> buffer.c:189</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
74 <div class="ttc" id="buffer_8h_html_a20431dd0ed6a6fe9f15333bd72afe4db"><div class="ttname"><a href="buffer_8h.html#a20431dd0ed6a6fe9f15333bd72afe4db">ucx_buffer_shift_left</a></div><div class="ttdeci">int ucx_buffer_shift_left(UcxBuffer *buffer, size_t shift)</div><div class="ttdoc">Shifts the buffer to the left. </div><div class="ttdef"><b>Definition:</b> buffer.c:244</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75 <div class="ttc" id="ucx_8h_html"><div class="ttname"><a href="ucx_8h.html">ucx.h</a></div><div class="ttdoc">Main UCX Header providing most common definitions. </div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
76 <div class="ttc" id="buffer_8h_html_afaf97d2cd7e9faad79a9d35fe33e30c6"><div class="ttname"><a href="buffer_8h.html#afaf97d2cd7e9faad79a9d35fe33e30c6">ucx_buffer_extend</a></div><div class="ttdeci">int ucx_buffer_extend(UcxBuffer *buffer, size_t additional_bytes)</div><div class="ttdoc">Extends the capacity of the buffer. </div><div class="ttdef"><b>Definition:</b> buffer.c:126</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 <div class="ttc" id="buffer_8h_html_a2af8646d8905c22c7322e7540b0440af"><div class="ttname"><a href="buffer_8h.html#a2af8646d8905c22c7322e7540b0440af">ucx_buffer_free</a></div><div class="ttdeci">void ucx_buffer_free(UcxBuffer *buffer)</div><div class="ttdoc">Destroys a buffer. </div><div class="ttdef"><b>Definition:</b> buffer.c:59</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
78 <div class="ttc" id="structUcxBuffer_html_a7a64288f002cf62b492e2ea49c79615c"><div class="ttname"><a href="structUcxBuffer.html#a7a64288f002cf62b492e2ea49c79615c">UcxBuffer::pos</a></div><div class="ttdeci">size_t pos</div><div class="ttdoc">Current position of the buffer. </div><div class="ttdef"><b>Definition:</b> buffer.h:77</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 <div class="ttc" id="buffer_8h_html_af8aacc7401814392b58c1b7b81bffc05"><div class="ttname"><a href="buffer_8h.html#af8aacc7401814392b58c1b7b81bffc05">ucx_buffer_write</a></div><div class="ttdeci">size_t ucx_buffer_write(const void *ptr, size_t size, size_t nitems, UcxBuffer *buffer)</div><div class="ttdoc">Writes data to a UcxBuffer. </div><div class="ttdef"><b>Definition:</b> buffer.c:152</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 <div class="ttc" id="structUcxBuffer_html_a385661894f3cee9c549bfe07a8b316bf"><div class="ttname"><a href="structUcxBuffer.html#a385661894f3cee9c549bfe07a8b316bf">UcxBuffer::capacity</a></div><div class="ttdeci">size_t capacity</div><div class="ttdoc">Current capacity (i.e. </div><div class="ttdef"><b>Definition:</b> buffer.h:79</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81 <div class="ttc" id="structUcxBuffer_html_a1a5076e85acb84b715a53bc0f37fb721"><div class="ttname"><a href="structUcxBuffer.html#a1a5076e85acb84b715a53bc0f37fb721">UcxBuffer::space</a></div><div class="ttdeci">char * space</div><div class="ttdoc">A pointer to the buffer contents. </div><div class="ttdef"><b>Definition:</b> buffer.h:75</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82 <div class="ttc" id="buffer_8h_html_abad7fd9ad5061224c780b8d1d4c55f09"><div class="ttname"><a href="buffer_8h.html#abad7fd9ad5061224c780b8d1d4c55f09">ucx_buffer_eof</a></div><div class="ttdeci">int ucx_buffer_eof(UcxBuffer *buffer)</div><div class="ttdoc">Tests, if the buffer position has exceeded the buffer capacity. </div><div class="ttdef"><b>Definition:</b> buffer.c:122</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 <div class="ttc" id="structUcxBuffer_html"><div class="ttname"><a href="structUcxBuffer.html">UcxBuffer</a></div><div class="ttdoc">UCX Buffer. </div><div class="ttdef"><b>Definition:</b> buffer.h:73</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 <div class="ttc" id="buffer_8h_html_af1d4b478e04b3ae0bf30e7c2ea964ea2"><div class="ttname"><a href="buffer_8h.html#af1d4b478e04b3ae0bf30e7c2ea964ea2">ucx_buffer_puts</a></div><div class="ttdeci">size_t ucx_buffer_puts(UcxBuffer *buffer, const char *str)</div><div class="ttdoc">Writes a string to a buffer. </div><div class="ttdef"><b>Definition:</b> buffer.c:240</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 <div class="ttc" id="buffer_8h_html_a7d6f01b9d631b0123475dfb98fb849ac"><div class="ttname"><a href="buffer_8h.html#a7d6f01b9d631b0123475dfb98fb849ac">ucx_buffer_putc</a></div><div class="ttdeci">int ucx_buffer_putc(UcxBuffer *buffer, int c)</div><div class="ttdoc">Writes a character to a buffer. </div><div class="ttdef"><b>Definition:</b> buffer.c:210</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 <div class="ttc" id="buffer_8h_html_a12a0c6a2379ef080043e6286bb8bad69"><div class="ttname"><a href="buffer_8h.html#a12a0c6a2379ef080043e6286bb8bad69">ucx_buffer_shift</a></div><div class="ttdeci">int ucx_buffer_shift(UcxBuffer *buffer, off_t shift)</div><div class="ttdoc">Shifts the contents of the buffer by the given offset. </div><div class="ttdef"><b>Definition:</b> buffer.c:289</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 <div class="ttc" id="buffer_8h_html_aacea876d692193ec6f859ce98da7351c"><div class="ttname"><a href="buffer_8h.html#aacea876d692193ec6f859ce98da7351c">ucx_buffer_new</a></div><div class="ttdeci">UcxBuffer * ucx_buffer_new(void *space, size_t capacity, int flags)</div><div class="ttdoc">Creates a new buffer. </div><div class="ttdef"><b>Definition:</b> buffer.c:35</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88 <div class="ttc" id="buffer_8h_html_a33fa7bb35fe08bbb3542f227514332ef"><div class="ttname"><a href="buffer_8h.html#a33fa7bb35fe08bbb3542f227514332ef">ucx_buffer_extract</a></div><div class="ttdeci">UcxBuffer * ucx_buffer_extract(UcxBuffer *src, size_t start, size_t length, int flags)</div><div class="ttdoc">Creates a new buffer and fills it with extracted content from another buffer. </div><div class="ttdef"><b>Definition:</b> buffer.c:66</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 <div class="ttc" id="structUcxBuffer_html_aec0aea8325394951d5ad4a9fbb8e1ac7"><div class="ttname"><a href="structUcxBuffer.html#aec0aea8325394951d5ad4a9fbb8e1ac7">UcxBuffer::size</a></div><div class="ttdeci">size_t size</div><div class="ttdoc">Current size of the buffer content. </div><div class="ttdef"><b>Definition:</b> buffer.h:81</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90 <div class="ttc" id="buffer_8h_html_a396339022159ce4ca6d069de9f9209b0"><div class="ttname"><a href="buffer_8h.html#a396339022159ce4ca6d069de9f9209b0">ucx_buffer_getc</a></div><div class="ttdeci">int ucx_buffer_getc(UcxBuffer *buffer)</div><div class="ttdoc">Gets a character from a buffer. </div><div class="ttdef"><b>Definition:</b> buffer.c:230</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 <div class="ttc" id="buffer_8h_html_a4fa10b6471495547eb981248fd4f1bc2"><div class="ttname"><a href="buffer_8h.html#a4fa10b6471495547eb981248fd4f1bc2">ucx_buffer_shift_right</a></div><div class="ttdeci">int ucx_buffer_shift_right(UcxBuffer *buffer, size_t shift)</div><div class="ttdoc">Shifts the buffer to the right. </div><div class="ttdef"><b>Definition:</b> buffer.c:260</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 </div><!-- fragment --></div><!-- contents -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93 <!-- start footer part -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 <hr class="footer"/><address class="footer"><small>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 Generated on Thu Dec 19 2019 19:58:24 for ucx by &#160;<a href="http://www.doxygen.org/index.html">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96 <img class="footer" src="doxygen.png" alt="doxygen"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97 </a> 1.8.13
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
98 </small></address>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 </body>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
100 </html>

mercurial