Sat, 19 Oct 2024 13:49:44 +0200
remove <sys/types.h> include from common.h
390 | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
2 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
3 | <head> | |
4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | |
5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> | |
6 | <meta name="generator" content="Doxygen 1.8.13"/> | |
7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> | |
8 | <title>ucx: /home/mike/workspace/c/ucx/src/ucx/buffer.h Source File</title> | |
9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> | |
10 | <script type="text/javascript" src="jquery.js"></script> | |
11 | <script type="text/javascript" src="dynsections.js"></script> | |
12 | <link href="search/search.css" rel="stylesheet" type="text/css"/> | |
13 | <script type="text/javascript" src="search/searchdata.js"></script> | |
14 | <script type="text/javascript" src="search/search.js"></script> | |
15 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> | |
16 | </head> | |
17 | <body> | |
18 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> | |
19 | <div id="titlearea"> | |
20 | <table cellspacing="0" cellpadding="0"> | |
21 | <tbody> | |
22 | <tr style="height: 56px;"> | |
23 | <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td> | |
24 | <td id="projectalign" style="padding-left: 0.5em;"> | |
25 | <div id="projectname">ucx | |
26 | </div> | |
27 | <div id="projectbrief">UAP Common Extensions</div> | |
28 | </td> | |
29 | </tr> | |
30 | </tbody> | |
31 | </table> | |
32 | </div> | |
33 | <!-- end header part --> | |
34 | <!-- Generated by Doxygen 1.8.13 --> | |
35 | <script type="text/javascript"> | |
36 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); | |
37 | </script> | |
38 | <script type="text/javascript" src="menudata.js"></script> | |
39 | <script type="text/javascript" src="menu.js"></script> | |
40 | <script type="text/javascript"> | |
41 | $(function() { | |
42 | initMenu('',true,false,'search.php','Search'); | |
43 | $(document).ready(function() { init_search(); }); | |
44 | }); | |
45 | </script> | |
46 | <div id="main-nav"></div> | |
47 | <!-- window showing the filter options --> | |
48 | <div id="MSearchSelectWindow" | |
49 | onmouseover="return searchBox.OnSearchSelectShow()" | |
50 | onmouseout="return searchBox.OnSearchSelectHide()" | |
51 | onkeydown="return searchBox.OnSearchSelectKey(event)"> | |
52 | </div> | |
53 | ||
54 | <!-- iframe showing the search results (closed by default) --> | |
55 | <div id="MSearchResultsWindow"> | |
56 | <iframe src="javascript:void(0)" frameborder="0" | |
57 | name="MSearchResults" id="MSearchResults"> | |
58 | </iframe> | |
59 | </div> | |
60 | ||
61 | <div id="nav-path" class="navpath"> | |
62 | <ul> | |
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> | |
64 | </div> | |
65 | </div><!-- top --> | |
66 | <div class="header"> | |
67 | <div class="headertitle"> | |
68 | <div class="title">buffer.h</div> </div> | |
69 | </div><!--header--> | |
70 | <div class="contents"> | |
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> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <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> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <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> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <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> <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> <span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <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> <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> <span class="comment"> *</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <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> <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> <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> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <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> <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> <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> <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> <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> <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> <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> <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> <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> <span class="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor">#ifndef UCX_BUFFER_H</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#define UCX_BUFFER_H</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor">#include "<a class="code" href="ucx_8h.html">ucx.h</a>"</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor">#include <sys/types.h></span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="preprocessor">#include <stdio.h></span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="buffer_8h.html#acc77c8ed7b26854f555d4a5d11e49ea2"> 60</a></span> <span class="preprocessor">#define UCX_BUFFER_DEFAULT 0x00</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="buffer_8h.html#a8bab11ad8a76719228b9ee91e2e45535"> 65</a></span> <span class="preprocessor">#define UCX_BUFFER_AUTOFREE 0x01</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="buffer_8h.html#a05f9565f2d04399168c3b1c152a632be"> 70</a></span> <span class="preprocessor">#define UCX_BUFFER_AUTOEXTEND 0x02</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="structUcxBuffer.html"> 73</a></span> <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>  <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>  <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>  <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>  <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>  <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> } <a class="code" href="structUcxBuffer.html">UcxBuffer</a>;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <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> </div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <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> </div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <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>  <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> </div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="buffer_8h.html#a828353846428c2c2f695f9938f059e52"> 137</a></span> <span class="preprocessor">#define ucx_buffer_clone(src,flags) \</span></div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="preprocessor"> ucx_buffer_extract(src, 0, (src)->capacity, flags)</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> </div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <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> </div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <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> </div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span> <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> </div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> </div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span> <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> </div><div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="buffer_8h.html#a374abd5aabfcc3ee0777a79d5fe651ab"> 229</a></span> <span class="preprocessor">#define ucx_buffer_clear(buffer) memset((buffer)->space, 0, (buffer)->size); \</span></div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span> <span class="preprocessor"> (buffer)->size = 0; (buffer)->pos = 0;</span></div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span> </div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span> <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> </div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span> </div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span> <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> </div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span> <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>  <a class="code" href="structUcxBuffer.html">UcxBuffer</a> *buffer);</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span> </div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span> <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>  <a class="code" href="structUcxBuffer.html">UcxBuffer</a> *buffer);</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span> </div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span> <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> </div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span> <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> </div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span> <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> </div><div class="line"><a name="l00332"></a><span class="lineno"><a class="line" href="buffer_8h.html#a0f4b64f1b3a74c4f6c5d9409d6b6086a"> 332</a></span> <span class="preprocessor">#define ucx_buffer_to_sstr(buffer) sstrn((buffer)->space, (buffer)->size)</span></div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span> </div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span> }</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span> </div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span> <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> </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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
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> | |
92 | </div><!-- fragment --></div><!-- contents --> | |
93 | <!-- start footer part --> | |
94 | <hr class="footer"/><address class="footer"><small> | |
95 | Generated on Thu Dec 19 2019 19:58:24 for ucx by  <a href="http://www.doxygen.org/index.html"> | |
96 | <img class="footer" src="doxygen.png" alt="doxygen"/> | |
97 | </a> 1.8.13 | |
98 | </small></address> | |
99 | </body> | |
100 | </html> |