<divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment"> This file is part of Pretty Curved Privacy (pcp1).</span></div>
<divclass="line"><aname="l00006"></a><spanclass="lineno"> 6</span> <spanclass="comment"> This program is free software: you can redistribute it and/or modify</span></div>
<divclass="line"><aname="l00007"></a><spanclass="lineno"> 7</span> <spanclass="comment"> it under the terms of the GNU General Public License as published by</span></div>
<divclass="line"><aname="l00008"></a><spanclass="lineno"> 8</span> <spanclass="comment"> the Free Software Foundation, either version 3 of the License, or</span></div>
<divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> <spanclass="comment"> (at your option) any later version.</span></div>
<divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment"> This program is distributed in the hope that it will be useful,</span></div>
<divclass="line"><aname="l00012"></a><spanclass="lineno"> 12</span> <spanclass="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<divclass="line"><aname="l00013"></a><spanclass="lineno"> 13</span> <spanclass="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div>
<divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="comment"> GNU General Public License for more details.</span></div>
<divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="comment"> You should have received a copy of the GNU General Public License</span></div>
<divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="comment"> along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div>
<divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="comment"> You can contact me by mail: <tom AT vondein DOT org>.</span></div>
<divclass="line"><aname="l00051"></a><spanclass="lineno"><aclass="code"href="struct__pcp__buffer.html#aa45619703bed4597d1ac7a45c40b92e3"> 51</a></span> <spanclass="keywordtype">char</span> *<aclass="code"href="struct__pcp__buffer.html#aa45619703bed4597d1ac7a45c40b92e3"title="just for convenience in error messages and the like, so we know which buffer cause trouble...">name</a>; </div>
<divclass="line"><aname="l00052"></a><spanclass="lineno"><aclass="code"href="struct__pcp__buffer.html#a48fee003c319d92f8d9a5e4c2c735e6f"> 52</a></span>  uint8_t <aclass="code"href="struct__pcp__buffer.html#a48fee003c319d92f8d9a5e4c2c735e6f"title="marks the buffer as allocated">allocated</a>; </div>
<divclass="line"><aname="l00053"></a><spanclass="lineno"><aclass="code"href="struct__pcp__buffer.html#a7fdd9e4a9ed7abfc5eec36cb1eca281a"> 53</a></span> <spanclass="keywordtype">size_t</span><aclass="code"href="struct__pcp__buffer.html#a7fdd9e4a9ed7abfc5eec36cb1eca281a"title="the blocksize to use when resizing, also used for initial malloc()">blocksize</a>; </div>
<divclass="line"><aname="l00054"></a><spanclass="lineno"><aclass="code"href="struct__pcp__buffer.html#a8bf9eb28e7fa878847212133ece0c482"> 54</a></span> <spanclass="keywordtype">size_t</span><aclass="code"href="struct__pcp__buffer.html#a8bf9eb28e7fa878847212133ece0c482"title="stores the current allocated size of the object">size</a>; </div>
<divclass="line"><aname="l00075"></a><spanclass="lineno"> 75</span> <aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *<aclass="code"href="group__Buffer.html#ga55e468b36750f28308b7fa5dfea5b564"title="Create a new buffer.">buffer_new</a>(<spanclass="keywordtype">size_t</span><aclass="code"href="struct__pcp__buffer.html#a7fdd9e4a9ed7abfc5eec36cb1eca281a"title="the blocksize to use when resizing, also used for initial malloc()">blocksize</a>, <spanclass="keywordtype">char</span> *<aclass="code"href="struct__pcp__buffer.html#aa45619703bed4597d1ac7a45c40b92e3"title="just for convenience in error messages and the like, so we know which buffer cause trouble...">name</a>);</div>
<divclass="line"><aname="l00086"></a><spanclass="lineno"> 86</span> <aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *<aclass="code"href="group__Buffer.html#ga770f9c4e3caf1bcf315666a56312246f"title="Create a new string buffer.">buffer_new_str</a>(<spanclass="keywordtype">char</span> *<aclass="code"href="struct__pcp__buffer.html#aa45619703bed4597d1ac7a45c40b92e3"title="just for convenience in error messages and the like, so we know which buffer cause trouble...">name</a>);</div>
<divclass="line"><aname="l00155"></a><spanclass="lineno"> 155</span> <aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *<aclass="code"href="group__Buffer.html#ga924b013cdf1e6f7b38ba9d10b3b7112e"title="Create a new buffer from existing data.">buffer_new_buf</a>(<spanclass="keywordtype">char</span> *<aclass="code"href="struct__pcp__buffer.html#aa45619703bed4597d1ac7a45c40b92e3"title="just for convenience in error messages and the like, so we know which buffer cause trouble...">name</a>, <spanclass="keywordtype">void</span> *data, <spanclass="keywordtype">size_t</span> datasize);</div>
<divclass="line"><aname="l00157"></a><spanclass="lineno"> 157</span> <spanclass="comment">/* initialize buffer vars */</span></div>
<divclass="line"><aname="l00158"></a><spanclass="lineno"> 158</span> <spanclass="keywordtype">void</span> buffer_init(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, <spanclass="keywordtype">size_t</span><aclass="code"href="struct__pcp__buffer.html#a7fdd9e4a9ed7abfc5eec36cb1eca281a"title="the blocksize to use when resizing, also used for initial malloc()">blocksize</a>, <spanclass="keywordtype">char</span> *<aclass="code"href="struct__pcp__buffer.html#aa45619703bed4597d1ac7a45c40b92e3"title="just for convenience in error messages and the like, so we know which buffer cause trouble...">name</a>);</div>
<divclass="line"><aname="l00168"></a><spanclass="lineno"> 168</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#gaa1c00049898e0ea7d6570748bf9a0e9e"title="Clears and frees the Buffer.">buffer_free</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00203"></a><spanclass="lineno"> 203</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#ga17edc4ffe7ea459a42ffdd6540d5f213"title="Add data to the buffer.">buffer_add</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, <spanclass="keyword">const</span><spanclass="keywordtype">void</span> *data, <spanclass="keywordtype">size_t</span> len);</div>
<divclass="line"><aname="l00217"></a><spanclass="lineno"> 217</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#gab3b5de7a9eb3cca96a9df0b8f90766eb"title="Add data to the buffer.">buffer_add_buf</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *dst, <aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *src);</div>
<divclass="line"><aname="l00256"></a><spanclass="lineno"> 256</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#ga3a57658aba6c18d93219334b369e8663"title="Add data as hex string to the buffer.">buffer_add_hex</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, <spanclass="keywordtype">void</span> *data, <spanclass="keywordtype">size_t</span> len);</div>
<divclass="line"><aname="l00258"></a><spanclass="lineno"> 258</span> <spanclass="comment">/* resize the buffer if necessary, used internally only */</span></div>
<divclass="line"><aname="l00270"></a><spanclass="lineno"> 270</span> <spanclass="keywordtype">int</span><aclass="code"href="group__Buffer.html#ga914506665c6fac92ccb17f92cefd0914"title="Tell if there are no more bytes to read.">buffer_done</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00303"></a><spanclass="lineno"> 303</span> <spanclass="keywordtype">size_t</span><aclass="code"href="group__Buffer.html#gaddf2e52378c6cd765b940617cdef2bd2"title="Read some chunk of data from the Buffer.">buffer_get_chunk</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, <spanclass="keywordtype">void</span> *<aclass="code"href="struct__pcp__buffer.html#a8d80e52785446bcc9e2fd4456c97daf5"title="the actual storage buffer">buf</a>, <spanclass="keywordtype">size_t</span> len);</div>
<divclass="line"><aname="l00381"></a><spanclass="lineno"> 381</span> <spanclass="keywordtype">unsigned</span><spanclass="keywordtype">char</span> *<aclass="code"href="group__Buffer.html#gaeafab0893e204b624eb5181954cbc9ca"title="Read the remaining data after current read offset.">buffer_get_remainder</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00424"></a><spanclass="lineno"> 424</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#ga0e0f433cbd077d3048ebdda35aa9ccb6"title="Dump the Buffer contents to stderr in hex form.">buffer_dump</a>(<spanclass="keyword">const</span><aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00442"></a><spanclass="lineno"> 442</span> <spanclass="keywordtype">size_t</span><aclass="code"href="group__Buffer.html#ga714b0a831d0f31a33e66e8ef76a26e46"title="Tell how much data there is in the buffer available.">buffer_size</a>(<spanclass="keyword">const</span><aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00472"></a><spanclass="lineno"> 472</span> <spanclass="keywordtype">size_t</span><aclass="code"href="group__Buffer.html#gaedba431c6b8e302e0d94cd9fafc3d292"title="Tell how much data is left to read in the Buffer.">buffer_left</a>(<spanclass="keyword">const</span><aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00480"></a><spanclass="lineno"> 480</span> uint8_t <aclass="code"href="group__Buffer.html#gae6a7aec563f6d66a94abc1fd3e10bf1e"title="Read 1 byte (8 bit) number from a Buffer.">buffer_get8</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00488"></a><spanclass="lineno"> 488</span> uint16_t <aclass="code"href="group__Buffer.html#ga5b9bd1a6b474438db8cf4901ed750b92"title="Read 2 bytes (16 bit) number from a Buffer.">buffer_get16</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00496"></a><spanclass="lineno"> 496</span> uint32_t <aclass="code"href="group__Buffer.html#ga42354f61519e2c7d6ae81a695f36d580"title="Read 4 byte (32 bit) number from a Buffer.">buffer_get32</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00512"></a><spanclass="lineno"> 512</span> uint16_t <aclass="code"href="group__Buffer.html#ga1d71a1ae861f7d9763f8f59ca317ad49"title="Read 2 bytes (16 bit) number from a Buffer, converted to host endian.">buffer_get16na</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00520"></a><spanclass="lineno"> 520</span> uint32_t <aclass="code"href="group__Buffer.html#ga46f10bed24ace6987844d4b12b39362f"title="Read 4 byte (32 bit) number from a Buffer, converted to host endian.">buffer_get32na</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00538"></a><spanclass="lineno"> 538</span> uint8_t <aclass="code"href="group__Buffer.html#ga29dc7e7f34028600a92f8b85c8f94c38"title="Read the last 1 byte (8 bit) number from a Buffer.">buffer_last8</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00548"></a><spanclass="lineno"> 548</span> uint16_t <aclass="code"href="group__Buffer.html#ga32959cf4cfad7c456e46fa93175508e4"title="Read the last 2 byte (16 bit) number from a Buffer.">buffer_last16</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00558"></a><spanclass="lineno"> 558</span> uint32_t <aclass="code"href="group__Buffer.html#gafe524705c638959590e08ed3f63da37e"title="Read the last 4 byte (32 bit) number from a Buffer.">buffer_last32</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00568"></a><spanclass="lineno"> 568</span> uint64_t <aclass="code"href="group__Buffer.html#ga48e50f95c09c029c265c37f2af7755f3"title="Read the last 8 byte (64 bit) number from a Buffer.">buffer_last64</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b);</div>
<divclass="line"><aname="l00586"></a><spanclass="lineno"> 586</span> <spanclass="keywordtype">size_t</span><aclass="code"href="group__Buffer.html#ga2330b241d4fd267d193b05b508035935"title="Read data from a file directly into a Buffer.">buffer_fd_read</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, FILE *in, <spanclass="keywordtype">size_t</span> len);</div>
<divclass="line"><aname="l00594"></a><spanclass="lineno"> 594</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#ga9125df8f37c49ae4443364acf711ae36"title="Write a 1 byte (8 bit) number in binary form into the buffer.">buffer_add8</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, uint8_t v);</div>
<divclass="line"><aname="l00602"></a><spanclass="lineno"> 602</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#ga5f1e47affe629232ebdabb1070f9c8c6"title="Write a 2 byte (16 bit) number in binary form into the buffer.">buffer_add16</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, uint16_t v);</div>
<divclass="line"><aname="l00610"></a><spanclass="lineno"> 610</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#ga2f36174e848271c8b0c525ea36d884fa"title="Write a 4 byte (32 bit) number in binary form into the buffer.">buffer_add32</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, uint32_t v);</div>
<divclass="line"><aname="l00618"></a><spanclass="lineno"> 618</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#ga4d37d8261c678d747472e47b30c6299f"title="Write a 8 byte (64 bit) number in binary form into the buffer.">buffer_add64</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, uint64_t v);</div>
<divclass="line"><aname="l00626"></a><spanclass="lineno"> 626</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#gab2141b987b8eb383da3f336f285384c5"title="Write a 2 byte (16 bit) number in binary form into the buffer, converted to big endian.">buffer_add16be</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, uint16_t v);</div>
<divclass="line"><aname="l00634"></a><spanclass="lineno"> 634</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#ga601c4d9cd62c52639f0536524830dfa5"title="Write a 4 byte (32 bit) number in binary form into the buffer, converted to big endian.">buffer_add32be</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, uint32_t v);</div>
<divclass="line"><aname="l00642"></a><spanclass="lineno"> 642</span> <spanclass="keywordtype">void</span><aclass="code"href="group__Buffer.html#ga6bbc5298e3c0a31eda31d48bfd63943a"title="Write a 8 byte (64 bit) number in binary form into the buffer, converted to big endian.">buffer_add64be</a>(<aclass="code"href="struct__pcp__buffer.html"title="A flexible buffer object wich automatically resizes, if neccessary.">Buffer</a> *b, uint64_t v);</div>