<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcbor: src/cbor/ints.c 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" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libcbor
 <span id="projectnumber">0.5.0</span>
</div>
<div id="projectbrief">libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</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_cb565ba51d82ea933604984cbab6233d.html">cbor</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">ints.c</div> </div>
</div><!--header-->
<div class="contents">
<a href="ints_8c.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"> * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com></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"> * libcbor is free software; you can redistribute it and/or modify</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * it under the terms of the MIT license. See LICENSE for details.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> */</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include "<a class="code" href="ints_8h.html">ints.h</a>"</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="ints_8h.html#a30bcfb58aa41d4c44bc2d5d6b7de105d"> 10</a></span> <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57">cbor_int_width</a> <a class="code" href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> {</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  <span class="keywordflow">return</span> item-><a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a9dbedd1621e78d4817c359849ffd75a9">int_metadata</a>.<a class="code" href="struct__cbor__int__metadata.html#a7a402d748e607c9942e5eefdb875582d">width</a>;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> }</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="ints_8h.html#a2379bf36318e8e4faa7434c74d8553fb"> 16</a></span> uint8_t <a class="code" href="ints_8c.html#a2379bf36318e8e4faa7434c74d8553fb">cbor_get_uint8</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> {</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  assert(<a class="code" href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a>(item) == <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57aaa167d7a4fac34f2bae123761b4b6fc8">CBOR_INT_8</a>);</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <span class="keywordflow">return</span> *item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> }</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="ints_8h.html#a06a0997aed16fe6aa540f57bf40ce400"> 23</a></span> uint16_t <a class="code" href="ints_8c.html#a06a0997aed16fe6aa540f57bf40ce400">cbor_get_uint16</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> {</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  assert(<a class="code" href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a>(item) == <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57a3a9caf604c45ce423b332e91f7370822">CBOR_INT_16</a>);</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="keywordflow">return</span> *(uint16_t *) item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> }</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="ints_8h.html#a0480e5b5849b757aa9416a4c1d51b36d"> 30</a></span> uint32_t <a class="code" href="ints_8c.html#a0480e5b5849b757aa9416a4c1d51b36d">cbor_get_uint32</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> {</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  assert(<a class="code" href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a>(item) == <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57ad429fc90ccfb94ec85996920fe115b51">CBOR_INT_32</a>);</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keywordflow">return</span> *(uint32_t *) item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> }</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="ints_8h.html#a839ec2dc97dda1db54657cec50387a12"> 37</a></span> uint64_t <a class="code" href="ints_8c.html#a839ec2dc97dda1db54657cec50387a12">cbor_get_uint64</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  assert(<a class="code" href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a>(item) == <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57aafaef7945451a7f4d12298f12f8acb2d">CBOR_INT_64</a>);</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keywordflow">return</span> *(uint64_t *) item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> }</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="ints_8h.html#aacf93e9a8a2c4217d5cd84207b957cba"> 44</a></span> uint64_t <a class="code" href="ints_8c.html#aacf93e9a8a2c4217d5cd84207b957cba">cbor_get_int</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> * item)</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> {</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">switch</span>(<a class="code" href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a>(item)) {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordflow">case</span> <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57aaa167d7a4fac34f2bae123761b4b6fc8">CBOR_INT_8</a>: <span class="keywordflow">return</span> <a class="code" href="ints_8c.html#a2379bf36318e8e4faa7434c74d8553fb">cbor_get_uint8</a>(item);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordflow">case</span> <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57a3a9caf604c45ce423b332e91f7370822">CBOR_INT_16</a>: <span class="keywordflow">return</span> <a class="code" href="ints_8c.html#a06a0997aed16fe6aa540f57bf40ce400">cbor_get_uint16</a>(item);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordflow">case</span> <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57ad429fc90ccfb94ec85996920fe115b51">CBOR_INT_32</a>: <span class="keywordflow">return</span> <a class="code" href="ints_8c.html#a0480e5b5849b757aa9416a4c1d51b36d">cbor_get_uint32</a>(item);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordflow">case</span> <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57aafaef7945451a7f4d12298f12f8acb2d">CBOR_INT_64</a>: <span class="keywordflow">return</span> <a class="code" href="ints_8c.html#a839ec2dc97dda1db54657cec50387a12">cbor_get_uint64</a>(item);</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="keywordflow">return</span> 0xDEADBEEF; <span class="comment">/* Compiler complaints */</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> }</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="ints_8h.html#a62e9cd557438c1a5b8cf9a29c1f64baa"> 56</a></span> <span class="keywordtype">void</span> <a class="code" href="ints_8c.html#a62e9cd557438c1a5b8cf9a29c1f64baa">cbor_set_uint8</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item, uint8_t value)</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> {</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  assert(<a class="code" href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a>(item) == <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57aaa167d7a4fac34f2bae123761b4b6fc8">CBOR_INT_8</a>);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  *item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a> = value;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> }</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="ints_8h.html#a13b3dff419830b59c77ee18d4c03f6eb"> 63</a></span> <span class="keywordtype">void</span> <a class="code" href="ints_8c.html#a13b3dff419830b59c77ee18d4c03f6eb">cbor_set_uint16</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item, uint16_t value)</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> {</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  assert(<a class="code" href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a>(item) == <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57a3a9caf604c45ce423b332e91f7370822">CBOR_INT_16</a>);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  *(uint16_t *) item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a> = value;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> }</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="ints_8h.html#a2db697fb733dcbdbbef8714fd182a185"> 71</a></span> <span class="keywordtype">void</span> <a class="code" href="ints_8c.html#a2db697fb733dcbdbbef8714fd182a185">cbor_set_uint32</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item, uint32_t value)</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> {</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  assert(<a class="code" href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a>(item) == <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57ad429fc90ccfb94ec85996920fe115b51">CBOR_INT_32</a>);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  *(uint32_t *) item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a> = value;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> }</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="ints_8h.html#af82a3961109f2a36324157e218680016"> 78</a></span> <span class="keywordtype">void</span> <a class="code" href="ints_8c.html#af82a3961109f2a36324157e218680016">cbor_set_uint64</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item, uint64_t value)</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> {</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  assert(<a class="code" href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a>(item) == <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57aafaef7945451a7f4d12298f12f8acb2d">CBOR_INT_64</a>);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  *(uint64_t *) item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a> = value;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> }</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="ints_8h.html#aed6a5a44245b8447a768c95e351c2c0c"> 85</a></span> <span class="keywordtype">void</span> <a class="code" href="ints_8c.html#aed6a5a44245b8447a768c95e351c2c0c">cbor_mark_uint</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> {</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  item-><a class="code" href="structcbor__item__t.html#a6743a75cf89e1b455ddf3198ff98842a">type</a> = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a2137d55d8028e37ff4319a633ef0634f">CBOR_TYPE_UINT</a>;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> }</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="ints_8h.html#a6ef24d3e2636c02de092fdfc337276b1"> 91</a></span> <span class="keywordtype">void</span> <a class="code" href="ints_8c.html#a6ef24d3e2636c02de092fdfc337276b1">cbor_mark_negint</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> {</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  assert(<a class="code" href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a>(item));</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  item-><a class="code" href="structcbor__item__t.html#a6743a75cf89e1b455ddf3198ff98842a">type</a> = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae140516103af792c8f2af84390acfdcd">CBOR_TYPE_NEGINT</a>;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> }</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="ints_8h.html#ae4562e1314b122ae89712dbf0c48c14c"> 97</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#ae4562e1314b122ae89712dbf0c48c14c">cbor_new_int8</a>()</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> {</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>) + 1);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  *item = (<a class="code" href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a>) {</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  .<a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a> = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *) item + <span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>),</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  .<a class="code" href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">refcount</a> = 1,</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  .metadata = {.int_metadata = {.width = <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57aaa167d7a4fac34f2bae123761b4b6fc8">CBOR_INT_8</a>}},</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  .type = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a2137d55d8028e37ff4319a633ef0634f">CBOR_TYPE_UINT</a></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  };</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> }</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="ints_8h.html#a68f71f9574e0085f02a27bd0f58d4b55"> 109</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#a68f71f9574e0085f02a27bd0f58d4b55">cbor_new_int16</a>()</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span> {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>) + 2);</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  *item = (<a class="code" href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a>) {</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  .<a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a> = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *) item + <span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>),</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  .<a class="code" href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">refcount</a> = 1,</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  .metadata = {.int_metadata = {.width = <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57a3a9caf604c45ce423b332e91f7370822">CBOR_INT_16</a>}},</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  .type = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a2137d55d8028e37ff4319a633ef0634f">CBOR_TYPE_UINT</a></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  };</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="ints_8h.html#a9cf9db24315a0e622746a546cc112467"> 121</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#a9cf9db24315a0e622746a546cc112467">cbor_new_int32</a>()</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> {</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>) + 4);</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  *item = (<a class="code" href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a>) {</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  .<a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a> = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *) item + <span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>),</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  .<a class="code" href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">refcount</a> = 1,</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  .metadata = {.int_metadata = {.width = <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57ad429fc90ccfb94ec85996920fe115b51">CBOR_INT_32</a>}},</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  .type = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a2137d55d8028e37ff4319a633ef0634f">CBOR_TYPE_UINT</a></div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  };</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> </div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="ints_8h.html#ab863f47b9de930c5d014e0dbb5523d9d"> 133</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#ab863f47b9de930c5d014e0dbb5523d9d">cbor_new_int64</a>()</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> {</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>) + 8);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  *item = (<a class="code" href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a>) {</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  .<a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a> = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *) item + <span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>),</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  .<a class="code" href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">refcount</a> = 1,</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  .metadata = {.int_metadata = {.width = <a class="code" href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57aafaef7945451a7f4d12298f12f8acb2d">CBOR_INT_64</a>}},</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  .type = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a2137d55d8028e37ff4319a633ef0634f">CBOR_TYPE_UINT</a></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  };</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> }</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span> </div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="ints_8h.html#ad4d9f92f14c640544386e6655283052d"> 145</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#ad4d9f92f14c640544386e6655283052d">cbor_build_uint8</a>(uint8_t value)</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> {</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="ints_8c.html#ae4562e1314b122ae89712dbf0c48c14c">cbor_new_int8</a>();</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <a class="code" href="ints_8c.html#a62e9cd557438c1a5b8cf9a29c1f64baa">cbor_set_uint8</a>(item, value);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <a class="code" href="ints_8c.html#aed6a5a44245b8447a768c95e351c2c0c">cbor_mark_uint</a>(item);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span> }</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span> </div><div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="ints_8h.html#a88f05c625ad9fa182bc95c9c97f87dda"> 153</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#a88f05c625ad9fa182bc95c9c97f87dda">cbor_build_uint16</a>(uint16_t value)</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> {</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="ints_8c.html#a68f71f9574e0085f02a27bd0f58d4b55">cbor_new_int16</a>();</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="ints_8c.html#a13b3dff419830b59c77ee18d4c03f6eb">cbor_set_uint16</a>(item, value);</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="code" href="ints_8c.html#aed6a5a44245b8447a768c95e351c2c0c">cbor_mark_uint</a>(item);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> }</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> </div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="ints_8h.html#afcefa3190eeeff1e5ed0b5217761ad5a"> 161</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#afcefa3190eeeff1e5ed0b5217761ad5a">cbor_build_uint32</a>(uint32_t value)</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> {</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="ints_8c.html#a9cf9db24315a0e622746a546cc112467">cbor_new_int32</a>();</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="ints_8c.html#a2db697fb733dcbdbbef8714fd182a185">cbor_set_uint32</a>(item, value);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="ints_8c.html#aed6a5a44245b8447a768c95e351c2c0c">cbor_mark_uint</a>(item);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span> }</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span> </div><div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="ints_8h.html#adff4351ebc5bb6f69d8a2ea0c9439fc5"> 169</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#adff4351ebc5bb6f69d8a2ea0c9439fc5">cbor_build_uint64</a>(uint64_t value)</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> {</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="ints_8c.html#ab863f47b9de930c5d014e0dbb5523d9d">cbor_new_int64</a>();</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <a class="code" href="ints_8c.html#af82a3961109f2a36324157e218680016">cbor_set_uint64</a>(item, value);</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <a class="code" href="ints_8c.html#aed6a5a44245b8447a768c95e351c2c0c">cbor_mark_uint</a>(item);</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> }</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div><div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="ints_8h.html#a28553eb079f8778babebf869e33f27a2"> 177</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#a28553eb079f8778babebf869e33f27a2">cbor_build_negint8</a>(uint8_t value)</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> {</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="ints_8c.html#ae4562e1314b122ae89712dbf0c48c14c">cbor_new_int8</a>();</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <a class="code" href="ints_8c.html#a62e9cd557438c1a5b8cf9a29c1f64baa">cbor_set_uint8</a>(item, value);</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <a class="code" href="ints_8c.html#a6ef24d3e2636c02de092fdfc337276b1">cbor_mark_negint</a>(item);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span> }</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="ints_8h.html#ae40a5af0998889c6550ceb0914b2cd9b"> 185</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#ae40a5af0998889c6550ceb0914b2cd9b">cbor_build_negint16</a>(uint16_t value)</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span> {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="ints_8c.html#a68f71f9574e0085f02a27bd0f58d4b55">cbor_new_int16</a>();</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <a class="code" href="ints_8c.html#a13b3dff419830b59c77ee18d4c03f6eb">cbor_set_uint16</a>(item, value);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <a class="code" href="ints_8c.html#a6ef24d3e2636c02de092fdfc337276b1">cbor_mark_negint</a>(item);</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span> }</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> </div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="ints_8h.html#a35d8b500ae33d4fc0262de4830382529"> 193</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#a35d8b500ae33d4fc0262de4830382529">cbor_build_negint32</a>(uint32_t value)</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> {</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="ints_8c.html#a9cf9db24315a0e622746a546cc112467">cbor_new_int32</a>();</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <a class="code" href="ints_8c.html#a2db697fb733dcbdbbef8714fd182a185">cbor_set_uint32</a>(item, value);</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <a class="code" href="ints_8c.html#a6ef24d3e2636c02de092fdfc337276b1">cbor_mark_negint</a>(item);</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordflow">return</span> item;</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="l00201"></a><span class="lineno"><a class="line" href="ints_8h.html#ae24074614ece5da3024a536093d21678"> 201</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="ints_8c.html#ae24074614ece5da3024a536093d21678">cbor_build_negint64</a>(uint64_t value)</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span> {</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="ints_8c.html#ab863f47b9de930c5d014e0dbb5523d9d">cbor_new_int64</a>();</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <a class="code" href="ints_8c.html#af82a3961109f2a36324157e218680016">cbor_set_uint64</a>(item, value);</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <a class="code" href="ints_8c.html#a6ef24d3e2636c02de092fdfc337276b1">cbor_mark_negint</a>(item);</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> }</div><div class="ttc" id="ints_8c_html_ad4d9f92f14c640544386e6655283052d"><div class="ttname"><a href="ints_8c.html#ad4d9f92f14c640544386e6655283052d">cbor_build_uint8</a></div><div class="ttdeci">cbor_item_t * cbor_build_uint8(uint8_t value)</div><div class="ttdoc">Constructs a new positive integer. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00145">ints.c:145</a></div></div>
<div class="ttc" id="data_8h_html_afdaa4bcbbdd295d719e39ce0b5519419"><div class="ttname"><a href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a></div><div class="ttdeci">struct cbor_item_t cbor_item_t</div><div class="ttdoc">The item handle. </div></div>
<div class="ttc" id="ints_8c_html_ae24074614ece5da3024a536093d21678"><div class="ttname"><a href="ints_8c.html#ae24074614ece5da3024a536093d21678">cbor_build_negint64</a></div><div class="ttdeci">cbor_item_t * cbor_build_negint64(uint64_t value)</div><div class="ttdoc">Constructs a new negative integer. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00201">ints.c:201</a></div></div>
<div class="ttc" id="data_8h_html_ae0fc9740f108f0f0078b93712b061e57aaa167d7a4fac34f2bae123761b4b6fc8"><div class="ttname"><a href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57aaa167d7a4fac34f2bae123761b4b6fc8">CBOR_INT_8</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00047">data.h:47</a></div></div>
<div class="ttc" id="ints_8c_html_ab863f47b9de930c5d014e0dbb5523d9d"><div class="ttname"><a href="ints_8c.html#ab863f47b9de930c5d014e0dbb5523d9d">cbor_new_int64</a></div><div class="ttdeci">cbor_item_t * cbor_new_int64()</div><div class="ttdoc">Allocates new integer with 8B width. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00133">ints.c:133</a></div></div>
<div class="ttc" id="ints_8c_html_aacf93e9a8a2c4217d5cd84207b957cba"><div class="ttname"><a href="ints_8c.html#aacf93e9a8a2c4217d5cd84207b957cba">cbor_get_int</a></div><div class="ttdeci">uint64_t cbor_get_int(const cbor_item_t *item)</div><div class="ttdoc">Extracts the integer value. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00044">ints.c:44</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a7d97fa5cdf027ca0499c37ec19acf843"><div class="ttname"><a href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">cbor_item_t::metadata</a></div><div class="ttdeci">union cbor_item_metadata metadata</div><div class="ttdoc">Discriminated by type. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00151">data.h:151</a></div></div>
<div class="ttc" id="ints_8c_html_a13b3dff419830b59c77ee18d4c03f6eb"><div class="ttname"><a href="ints_8c.html#a13b3dff419830b59c77ee18d4c03f6eb">cbor_set_uint16</a></div><div class="ttdeci">void cbor_set_uint16(cbor_item_t *item, uint16_t value)</div><div class="ttdoc">Assigns the integer value. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00063">ints.c:63</a></div></div>
<div class="ttc" id="ints_8c_html_a30bcfb58aa41d4c44bc2d5d6b7de105d"><div class="ttname"><a href="ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d">cbor_int_get_width</a></div><div class="ttdeci">cbor_int_width cbor_int_get_width(const cbor_item_t *item)</div><div class="ttdoc">Queries the integer width. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00010">ints.c:10</a></div></div>
<div class="ttc" id="ints_8c_html_ae4562e1314b122ae89712dbf0c48c14c"><div class="ttname"><a href="ints_8c.html#ae4562e1314b122ae89712dbf0c48c14c">cbor_new_int8</a></div><div class="ttdeci">cbor_item_t * cbor_new_int8()</div><div class="ttdoc">Allocates new integer with 1B width. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00097">ints.c:97</a></div></div>
<div class="ttc" id="common_8c_html_a4e705f34221ba434756a4a1f8e3325e6"><div class="ttname"><a href="common_8c.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a></div><div class="ttdeci">bool cbor_is_int(const cbor_item_t *item)</div><div class="ttdoc">Is the item an integer, either positive or negative? </div><div class="ttdef"><b>Definition:</b> <a href="common_8c_source.html#l00065">common.c:65</a></div></div>
<div class="ttc" id="ints_8c_html_ae40a5af0998889c6550ceb0914b2cd9b"><div class="ttname"><a href="ints_8c.html#ae40a5af0998889c6550ceb0914b2cd9b">cbor_build_negint16</a></div><div class="ttdeci">cbor_item_t * cbor_build_negint16(uint16_t value)</div><div class="ttdoc">Constructs a new negative integer. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00185">ints.c:185</a></div></div>
<div class="ttc" id="ints_8c_html_a35d8b500ae33d4fc0262de4830382529"><div class="ttname"><a href="ints_8c.html#a35d8b500ae33d4fc0262de4830382529">cbor_build_negint32</a></div><div class="ttdeci">cbor_item_t * cbor_build_negint32(uint32_t value)</div><div class="ttdoc">Constructs a new negative integer. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00193">ints.c:193</a></div></div>
<div class="ttc" id="data_8h_html_ae0fc9740f108f0f0078b93712b061e57ad429fc90ccfb94ec85996920fe115b51"><div class="ttname"><a href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57ad429fc90ccfb94ec85996920fe115b51">CBOR_INT_32</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00049">data.h:49</a></div></div>
<div class="ttc" id="ints_8c_html_a62e9cd557438c1a5b8cf9a29c1f64baa"><div class="ttname"><a href="ints_8c.html#a62e9cd557438c1a5b8cf9a29c1f64baa">cbor_set_uint8</a></div><div class="ttdeci">void cbor_set_uint8(cbor_item_t *item, uint8_t value)</div><div class="ttdoc">Assigns the integer value. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00056">ints.c:56</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a6743a75cf89e1b455ddf3198ff98842a"><div class="ttname"><a href="structcbor__item__t.html#a6743a75cf89e1b455ddf3198ff98842a">cbor_item_t::type</a></div><div class="ttdeci">cbor_type type</div><div class="ttdoc">Major type discriminator. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00155">data.h:155</a></div></div>
<div class="ttc" id="ints_8c_html_a0480e5b5849b757aa9416a4c1d51b36d"><div class="ttname"><a href="ints_8c.html#a0480e5b5849b757aa9416a4c1d51b36d">cbor_get_uint32</a></div><div class="ttdeci">uint32_t cbor_get_uint32(const cbor_item_t *item)</div><div class="ttdoc">Extracts the integer value. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00030">ints.c:30</a></div></div>
<div class="ttc" id="ints_8c_html_a6ef24d3e2636c02de092fdfc337276b1"><div class="ttname"><a href="ints_8c.html#a6ef24d3e2636c02de092fdfc337276b1">cbor_mark_negint</a></div><div class="ttdeci">void cbor_mark_negint(cbor_item_t *item)</div><div class="ttdoc">Marks the integer item as a negative integer. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00091">ints.c:91</a></div></div>
<div class="ttc" id="common_8h_html_a07a781e9212fad361b0f59f7fc921057"><div class="ttname"><a href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a></div><div class="ttdeci">#define _CBOR_MALLOC</div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00084">common.h:84</a></div></div>
<div class="ttc" id="data_8h_html_ae0fc9740f108f0f0078b93712b061e57aafaef7945451a7f4d12298f12f8acb2d"><div class="ttname"><a href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57aafaef7945451a7f4d12298f12f8acb2d">CBOR_INT_64</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00050">data.h:50</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a6bb24fe655f086c6aa9a66d427e09cca"><div class="ttname"><a href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">cbor_item_t::refcount</a></div><div class="ttdeci">size_t refcount</div><div class="ttdoc">Reference count - initialize to 0. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00153">data.h:153</a></div></div>
<div class="ttc" id="ints_8c_html_afcefa3190eeeff1e5ed0b5217761ad5a"><div class="ttname"><a href="ints_8c.html#afcefa3190eeeff1e5ed0b5217761ad5a">cbor_build_uint32</a></div><div class="ttdeci">cbor_item_t * cbor_build_uint32(uint32_t value)</div><div class="ttdoc">Constructs a new positive integer. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00161">ints.c:161</a></div></div>
<div class="ttc" id="ints_8c_html_a06a0997aed16fe6aa540f57bf40ce400"><div class="ttname"><a href="ints_8c.html#a06a0997aed16fe6aa540f57bf40ce400">cbor_get_uint16</a></div><div class="ttdeci">uint16_t cbor_get_uint16(const cbor_item_t *item)</div><div class="ttdoc">Extracts the integer value. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00023">ints.c:23</a></div></div>
<div class="ttc" id="data_8h_html_ae0fc9740f108f0f0078b93712b061e57"><div class="ttname"><a href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57">cbor_int_width</a></div><div class="ttdeci">cbor_int_width</div><div class="ttdoc">Possible widths of CBOR_TYPE_UINT items. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00046">data.h:46</a></div></div>
<div class="ttc" id="ints_8c_html_a2db697fb733dcbdbbef8714fd182a185"><div class="ttname"><a href="ints_8c.html#a2db697fb733dcbdbbef8714fd182a185">cbor_set_uint32</a></div><div class="ttdeci">void cbor_set_uint32(cbor_item_t *item, uint32_t value)</div><div class="ttdoc">Assigns the integer value. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00071">ints.c:71</a></div></div>
<div class="ttc" id="data_8h_html_a3a931b40fc31b51cccfd1bc3dc5fc5d6a2137d55d8028e37ff4319a633ef0634f"><div class="ttname"><a href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a2137d55d8028e37ff4319a633ef0634f">CBOR_TYPE_UINT</a></div><div class="ttdoc">0 - positive integers </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00025">data.h:25</a></div></div>
<div class="ttc" id="ints_8c_html_a88f05c625ad9fa182bc95c9c97f87dda"><div class="ttname"><a href="ints_8c.html#a88f05c625ad9fa182bc95c9c97f87dda">cbor_build_uint16</a></div><div class="ttdeci">cbor_item_t * cbor_build_uint16(uint16_t value)</div><div class="ttdoc">Constructs a new positive integer. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00153">ints.c:153</a></div></div>
<div class="ttc" id="ints_8c_html_a2379bf36318e8e4faa7434c74d8553fb"><div class="ttname"><a href="ints_8c.html#a2379bf36318e8e4faa7434c74d8553fb">cbor_get_uint8</a></div><div class="ttdeci">uint8_t cbor_get_uint8(const cbor_item_t *item)</div><div class="ttdoc">Extracts the integer value. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00016">ints.c:16</a></div></div>
<div class="ttc" id="ints_8c_html_a839ec2dc97dda1db54657cec50387a12"><div class="ttname"><a href="ints_8c.html#a839ec2dc97dda1db54657cec50387a12">cbor_get_uint64</a></div><div class="ttdeci">uint64_t cbor_get_uint64(const cbor_item_t *item)</div><div class="ttdoc">Extracts the integer value. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00037">ints.c:37</a></div></div>
<div class="ttc" id="ints_8c_html_aed6a5a44245b8447a768c95e351c2c0c"><div class="ttname"><a href="ints_8c.html#aed6a5a44245b8447a768c95e351c2c0c">cbor_mark_uint</a></div><div class="ttdeci">void cbor_mark_uint(cbor_item_t *item)</div><div class="ttdoc">Marks the integer item as a positive integer. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00085">ints.c:85</a></div></div>
<div class="ttc" id="ints_8c_html_adff4351ebc5bb6f69d8a2ea0c9439fc5"><div class="ttname"><a href="ints_8c.html#adff4351ebc5bb6f69d8a2ea0c9439fc5">cbor_build_uint64</a></div><div class="ttdeci">cbor_item_t * cbor_build_uint64(uint64_t value)</div><div class="ttdoc">Constructs a new positive integer. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00169">ints.c:169</a></div></div>
<div class="ttc" id="ints_8h_html"><div class="ttname"><a href="ints_8h.html">ints.h</a></div></div>
<div class="ttc" id="data_8h_html_ae0fc9740f108f0f0078b93712b061e57a3a9caf604c45ce423b332e91f7370822"><div class="ttname"><a href="data_8h.html#ae0fc9740f108f0f0078b93712b061e57a3a9caf604c45ce423b332e91f7370822">CBOR_INT_16</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00048">data.h:48</a></div></div>
<div class="ttc" id="unioncbor__item__metadata_html_a9dbedd1621e78d4817c359849ffd75a9"><div class="ttname"><a href="unioncbor__item__metadata.html#a9dbedd1621e78d4817c359849ffd75a9">cbor_item_metadata::int_metadata</a></div><div class="ttdeci">struct _cbor_int_metadata int_metadata</div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00139">data.h:139</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a5c6dde1dbef5aad748c49786352eef44"><div class="ttname"><a href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">cbor_item_t::data</a></div><div class="ttdeci">unsigned char * data</div><div class="ttdoc">Raw data block - interpretation depends on metadata. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00157">data.h:157</a></div></div>
<div class="ttc" id="ints_8c_html_a9cf9db24315a0e622746a546cc112467"><div class="ttname"><a href="ints_8c.html#a9cf9db24315a0e622746a546cc112467">cbor_new_int32</a></div><div class="ttdeci">cbor_item_t * cbor_new_int32()</div><div class="ttdoc">Allocates new integer with 4B width. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00121">ints.c:121</a></div></div>
<div class="ttc" id="ints_8c_html_a28553eb079f8778babebf869e33f27a2"><div class="ttname"><a href="ints_8c.html#a28553eb079f8778babebf869e33f27a2">cbor_build_negint8</a></div><div class="ttdeci">cbor_item_t * cbor_build_negint8(uint8_t value)</div><div class="ttdoc">Constructs a new negative integer. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00177">ints.c:177</a></div></div>
<div class="ttc" id="struct__cbor__int__metadata_html_a7a402d748e607c9942e5eefdb875582d"><div class="ttname"><a href="struct__cbor__int__metadata.html#a7a402d748e607c9942e5eefdb875582d">_cbor_int_metadata::width</a></div><div class="ttdeci">cbor_int_width width</div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00078">data.h:78</a></div></div>
<div class="ttc" id="structcbor__item__t_html"><div class="ttname"><a href="structcbor__item__t.html">cbor_item_t</a></div><div class="ttdoc">The item handle. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00149">data.h:149</a></div></div>
<div class="ttc" id="data_8h_html_a3a931b40fc31b51cccfd1bc3dc5fc5d6ae140516103af792c8f2af84390acfdcd"><div class="ttname"><a href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae140516103af792c8f2af84390acfdcd">CBOR_TYPE_NEGINT</a></div><div class="ttdoc">1 - negative integers </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00026">data.h:26</a></div></div>
<div class="ttc" id="ints_8c_html_af82a3961109f2a36324157e218680016"><div class="ttname"><a href="ints_8c.html#af82a3961109f2a36324157e218680016">cbor_set_uint64</a></div><div class="ttdeci">void cbor_set_uint64(cbor_item_t *item, uint64_t value)</div><div class="ttdoc">Assigns the integer value. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00078">ints.c:78</a></div></div>
<div class="ttc" id="ints_8c_html_a68f71f9574e0085f02a27bd0f58d4b55"><div class="ttname"><a href="ints_8c.html#a68f71f9574e0085f02a27bd0f58d4b55">cbor_new_int16</a></div><div class="ttdeci">cbor_item_t * cbor_new_int16()</div><div class="ttdoc">Allocates new integer with 2B width. </div><div class="ttdef"><b>Definition:</b> <a href="ints_8c_source.html#l00109">ints.c:109</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 6 2017 00:26:19 for libcbor by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>