Fri, 21 Apr 2023 18:38:18 +0200
simplify CxHashKey
universe@390 | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
universe@390 | 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
universe@390 | 3 | <head> |
universe@390 | 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
universe@390 | 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
universe@390 | 6 | <meta name="generator" content="Doxygen 1.8.13"/> |
universe@390 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
universe@390 | 8 | <title>ucx: /home/mike/workspace/c/ucx/src/ucx/properties.h File Reference</title> |
universe@390 | 9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
universe@390 | 10 | <script type="text/javascript" src="jquery.js"></script> |
universe@390 | 11 | <script type="text/javascript" src="dynsections.js"></script> |
universe@390 | 12 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
universe@390 | 13 | <script type="text/javascript" src="search/searchdata.js"></script> |
universe@390 | 14 | <script type="text/javascript" src="search/search.js"></script> |
universe@390 | 15 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
universe@390 | 16 | </head> |
universe@390 | 17 | <body> |
universe@390 | 18 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
universe@390 | 19 | <div id="titlearea"> |
universe@390 | 20 | <table cellspacing="0" cellpadding="0"> |
universe@390 | 21 | <tbody> |
universe@390 | 22 | <tr style="height: 56px;"> |
universe@390 | 23 | <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td> |
universe@390 | 24 | <td id="projectalign" style="padding-left: 0.5em;"> |
universe@390 | 25 | <div id="projectname">ucx |
universe@390 | 26 | </div> |
universe@390 | 27 | <div id="projectbrief">UAP Common Extensions</div> |
universe@390 | 28 | </td> |
universe@390 | 29 | </tr> |
universe@390 | 30 | </tbody> |
universe@390 | 31 | </table> |
universe@390 | 32 | </div> |
universe@390 | 33 | <!-- end header part --> |
universe@390 | 34 | <!-- Generated by Doxygen 1.8.13 --> |
universe@390 | 35 | <script type="text/javascript"> |
universe@390 | 36 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
universe@390 | 37 | </script> |
universe@390 | 38 | <script type="text/javascript" src="menudata.js"></script> |
universe@390 | 39 | <script type="text/javascript" src="menu.js"></script> |
universe@390 | 40 | <script type="text/javascript"> |
universe@390 | 41 | $(function() { |
universe@390 | 42 | initMenu('',true,false,'search.php','Search'); |
universe@390 | 43 | $(document).ready(function() { init_search(); }); |
universe@390 | 44 | }); |
universe@390 | 45 | </script> |
universe@390 | 46 | <div id="main-nav"></div> |
universe@390 | 47 | <!-- window showing the filter options --> |
universe@390 | 48 | <div id="MSearchSelectWindow" |
universe@390 | 49 | onmouseover="return searchBox.OnSearchSelectShow()" |
universe@390 | 50 | onmouseout="return searchBox.OnSearchSelectHide()" |
universe@390 | 51 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
universe@390 | 52 | </div> |
universe@390 | 53 | |
universe@390 | 54 | <!-- iframe showing the search results (closed by default) --> |
universe@390 | 55 | <div id="MSearchResultsWindow"> |
universe@390 | 56 | <iframe src="javascript:void(0)" frameborder="0" |
universe@390 | 57 | name="MSearchResults" id="MSearchResults"> |
universe@390 | 58 | </iframe> |
universe@390 | 59 | </div> |
universe@390 | 60 | |
universe@390 | 61 | <div id="nav-path" class="navpath"> |
universe@390 | 62 | <ul> |
universe@390 | 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> |
universe@390 | 64 | </div> |
universe@390 | 65 | </div><!-- top --> |
universe@390 | 66 | <div class="header"> |
universe@390 | 67 | <div class="summary"> |
universe@390 | 68 | <a href="#nested-classes">Data Structures</a> | |
universe@390 | 69 | <a href="#func-members">Functions</a> </div> |
universe@390 | 70 | <div class="headertitle"> |
universe@390 | 71 | <div class="title">properties.h File Reference</div> </div> |
universe@390 | 72 | </div><!--header--> |
universe@390 | 73 | <div class="contents"> |
universe@390 | 74 | |
universe@390 | 75 | <p>Load / store utilities for properties files. |
universe@390 | 76 | <a href="#details">More...</a></p> |
universe@390 | 77 | <div class="textblock"><code>#include "<a class="el" href="ucx_8h_source.html">ucx.h</a>"</code><br /> |
universe@390 | 78 | <code>#include "<a class="el" href="map_8h_source.html">map.h</a>"</code><br /> |
universe@390 | 79 | </div> |
universe@390 | 80 | <p><a href="properties_8h_source.html">Go to the source code of this file.</a></p> |
universe@390 | 81 | <table class="memberdecls"> |
universe@390 | 82 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> |
universe@390 | 83 | Data Structures</h2></td></tr> |
universe@390 | 84 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structUcxProperties.html">UcxProperties</a></td></tr> |
universe@390 | 85 | <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="structUcxProperties.html" title="UcxProperties object for parsing properties data. ">UcxProperties</a> object for parsing properties data. <a href="structUcxProperties.html#details">More...</a><br /></td></tr> |
universe@390 | 86 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 87 | </table><table class="memberdecls"> |
universe@390 | 88 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
universe@390 | 89 | Functions</h2></td></tr> |
universe@390 | 90 | <tr class="memitem:a44d9dd12cab3aaa0084f1c8b89405796"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxProperties.html">UcxProperties</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="properties_8h.html#a44d9dd12cab3aaa0084f1c8b89405796">ucx_properties_new</a> ()</td></tr> |
universe@390 | 91 | <tr class="memdesc:a44d9dd12cab3aaa0084f1c8b89405796"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new <a class="el" href="structUcxProperties.html" title="UcxProperties object for parsing properties data. ">UcxProperties</a> object. <a href="#a44d9dd12cab3aaa0084f1c8b89405796">More...</a><br /></td></tr> |
universe@390 | 92 | <tr class="separator:a44d9dd12cab3aaa0084f1c8b89405796"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 93 | <tr class="memitem:a38a2fe7bb2986bd87c7e69356ab05c05"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="properties_8h.html#a38a2fe7bb2986bd87c7e69356ab05c05">ucx_properties_free</a> (<a class="el" href="structUcxProperties.html">UcxProperties</a> *prop)</td></tr> |
universe@390 | 94 | <tr class="memdesc:a38a2fe7bb2986bd87c7e69356ab05c05"><td class="mdescLeft"> </td><td class="mdescRight">Destroys a <a class="el" href="structUcxProperties.html" title="UcxProperties object for parsing properties data. ">UcxProperties</a> object. <a href="#a38a2fe7bb2986bd87c7e69356ab05c05">More...</a><br /></td></tr> |
universe@390 | 95 | <tr class="separator:a38a2fe7bb2986bd87c7e69356ab05c05"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 96 | <tr class="memitem:aaf8de121764a4d22c763ff2ab41f3a4d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="properties_8h.html#aaf8de121764a4d22c763ff2ab41f3a4d">ucx_properties_fill</a> (<a class="el" href="structUcxProperties.html">UcxProperties</a> *prop, char *buf, size_t len)</td></tr> |
universe@390 | 97 | <tr class="memdesc:aaf8de121764a4d22c763ff2ab41f3a4d"><td class="mdescLeft"> </td><td class="mdescRight">Sets the input buffer for the properties parser. <a href="#aaf8de121764a4d22c763ff2ab41f3a4d">More...</a><br /></td></tr> |
universe@390 | 98 | <tr class="separator:aaf8de121764a4d22c763ff2ab41f3a4d"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 99 | <tr class="memitem:a7e03bc573d45d48c538cd721e810d33c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="properties_8h.html#a7e03bc573d45d48c538cd721e810d33c">ucx_properties_next</a> (<a class="el" href="structUcxProperties.html">UcxProperties</a> *prop, <a class="el" href="structsstr__t.html">sstr_t</a> *name, <a class="el" href="structsstr__t.html">sstr_t</a> *value)</td></tr> |
universe@390 | 100 | <tr class="memdesc:a7e03bc573d45d48c538cd721e810d33c"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the next key/value-pair. <a href="#a7e03bc573d45d48c538cd721e810d33c">More...</a><br /></td></tr> |
universe@390 | 101 | <tr class="separator:a7e03bc573d45d48c538cd721e810d33c"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 102 | <tr class="memitem:a5c7ff8bc3139960a3f3dc92072b742f3"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="properties_8h.html#a5c7ff8bc3139960a3f3dc92072b742f3">ucx_properties2map</a> (<a class="el" href="structUcxProperties.html">UcxProperties</a> *prop, <a class="el" href="structUcxMap.html">UcxMap</a> *map)</td></tr> |
universe@390 | 103 | <tr class="memdesc:a5c7ff8bc3139960a3f3dc92072b742f3"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves all available key/value-pairs and puts them into a <a class="el" href="structUcxMap.html" title="Structure for the UCX map. ">UcxMap</a>. <a href="#a5c7ff8bc3139960a3f3dc92072b742f3">More...</a><br /></td></tr> |
universe@390 | 104 | <tr class="separator:a5c7ff8bc3139960a3f3dc92072b742f3"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 105 | <tr class="memitem:ae1b600f839a6b2278b68fc314981a8a3"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="properties_8h.html#ae1b600f839a6b2278b68fc314981a8a3">ucx_properties_load</a> (<a class="el" href="structUcxMap.html">UcxMap</a> *map, FILE *file)</td></tr> |
universe@390 | 106 | <tr class="memdesc:ae1b600f839a6b2278b68fc314981a8a3"><td class="mdescLeft"> </td><td class="mdescRight">Loads a properties file to a <a class="el" href="structUcxMap.html" title="Structure for the UCX map. ">UcxMap</a>. <a href="#ae1b600f839a6b2278b68fc314981a8a3">More...</a><br /></td></tr> |
universe@390 | 107 | <tr class="separator:ae1b600f839a6b2278b68fc314981a8a3"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 108 | <tr class="memitem:a63c0c1b7648e675b21a1788917ff36fb"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="properties_8h.html#a63c0c1b7648e675b21a1788917ff36fb">ucx_properties_store</a> (<a class="el" href="structUcxMap.html">UcxMap</a> *map, FILE *file)</td></tr> |
universe@390 | 109 | <tr class="memdesc:a63c0c1b7648e675b21a1788917ff36fb"><td class="mdescLeft"> </td><td class="mdescRight">Stores a <a class="el" href="structUcxMap.html" title="Structure for the UCX map. ">UcxMap</a> to a file. <a href="#a63c0c1b7648e675b21a1788917ff36fb">More...</a><br /></td></tr> |
universe@390 | 110 | <tr class="separator:a63c0c1b7648e675b21a1788917ff36fb"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 111 | </table> |
universe@390 | 112 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
universe@390 | 113 | <div class="textblock"><p>Load / store utilities for properties files. </p> |
universe@390 | 114 | <dl class="section author"><dt>Author</dt><dd>Mike Becker </dd> |
universe@390 | 115 | <dd> |
universe@390 | 116 | Olaf Wintermann </dd></dl> |
universe@390 | 117 | </div><h2 class="groupheader">Function Documentation</h2> |
universe@390 | 118 | <a id="a5c7ff8bc3139960a3f3dc92072b742f3"></a> |
universe@390 | 119 | <h2 class="memtitle"><span class="permalink"><a href="#a5c7ff8bc3139960a3f3dc92072b742f3">◆ </a></span>ucx_properties2map()</h2> |
universe@390 | 120 | |
universe@390 | 121 | <div class="memitem"> |
universe@390 | 122 | <div class="memproto"> |
universe@390 | 123 | <table class="memname"> |
universe@390 | 124 | <tr> |
universe@390 | 125 | <td class="memname">int ucx_properties2map </td> |
universe@390 | 126 | <td>(</td> |
universe@390 | 127 | <td class="paramtype"><a class="el" href="structUcxProperties.html">UcxProperties</a> * </td> |
universe@390 | 128 | <td class="paramname"><em>prop</em>, </td> |
universe@390 | 129 | </tr> |
universe@390 | 130 | <tr> |
universe@390 | 131 | <td class="paramkey"></td> |
universe@390 | 132 | <td></td> |
universe@390 | 133 | <td class="paramtype"><a class="el" href="structUcxMap.html">UcxMap</a> * </td> |
universe@390 | 134 | <td class="paramname"><em>map</em> </td> |
universe@390 | 135 | </tr> |
universe@390 | 136 | <tr> |
universe@390 | 137 | <td></td> |
universe@390 | 138 | <td>)</td> |
universe@390 | 139 | <td></td><td></td> |
universe@390 | 140 | </tr> |
universe@390 | 141 | </table> |
universe@390 | 142 | </div><div class="memdoc"> |
universe@390 | 143 | |
universe@390 | 144 | <p>Retrieves all available key/value-pairs and puts them into a <a class="el" href="structUcxMap.html" title="Structure for the UCX map. ">UcxMap</a>. </p> |
universe@390 | 145 | <p>This is done by successive calls to <a class="el" href="properties_8h.html#a7e03bc573d45d48c538cd721e810d33c" title="Retrieves the next key/value-pair. ">ucx_properties_next()</a> until no more key/value-pairs can be retrieved.</p> |
universe@390 | 146 | <p>The memory for the map values is allocated by the map's own allocator.</p> |
universe@390 | 147 | <dl class="params"><dt>Parameters</dt><dd> |
universe@390 | 148 | <table class="params"> |
universe@390 | 149 | <tr><td class="paramname">prop</td><td>the <a class="el" href="structUcxProperties.html" title="UcxProperties object for parsing properties data. ">UcxProperties</a> object </td></tr> |
universe@390 | 150 | <tr><td class="paramname">map</td><td>the target map </td></tr> |
universe@390 | 151 | </table> |
universe@390 | 152 | </dd> |
universe@390 | 153 | </dl> |
universe@390 | 154 | <dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="structUcxProperties.html#a34f71a6ab6dcb6892e3b4eb802e75bff" title="Parser error code. ">UcxProperties.error</a> code (i.e. 0 on success). </dd></dl> |
universe@390 | 155 | <dl class="section see"><dt>See also</dt><dd><a class="el" href="properties_8h.html#aaf8de121764a4d22c763ff2ab41f3a4d" title="Sets the input buffer for the properties parser. ">ucx_properties_fill()</a> </dd> |
universe@390 | 156 | <dd> |
universe@390 | 157 | <a class="el" href="structUcxMap.html#a531f3e481c1c331cf037b916192e974d" title="An allocator that is used for the map elements. ">UcxMap.allocator</a> </dd></dl> |
universe@390 | 158 | |
universe@390 | 159 | </div> |
universe@390 | 160 | </div> |
universe@390 | 161 | <a id="aaf8de121764a4d22c763ff2ab41f3a4d"></a> |
universe@390 | 162 | <h2 class="memtitle"><span class="permalink"><a href="#aaf8de121764a4d22c763ff2ab41f3a4d">◆ </a></span>ucx_properties_fill()</h2> |
universe@390 | 163 | |
universe@390 | 164 | <div class="memitem"> |
universe@390 | 165 | <div class="memproto"> |
universe@390 | 166 | <table class="memname"> |
universe@390 | 167 | <tr> |
universe@390 | 168 | <td class="memname">void ucx_properties_fill </td> |
universe@390 | 169 | <td>(</td> |
universe@390 | 170 | <td class="paramtype"><a class="el" href="structUcxProperties.html">UcxProperties</a> * </td> |
universe@390 | 171 | <td class="paramname"><em>prop</em>, </td> |
universe@390 | 172 | </tr> |
universe@390 | 173 | <tr> |
universe@390 | 174 | <td class="paramkey"></td> |
universe@390 | 175 | <td></td> |
universe@390 | 176 | <td class="paramtype">char * </td> |
universe@390 | 177 | <td class="paramname"><em>buf</em>, </td> |
universe@390 | 178 | </tr> |
universe@390 | 179 | <tr> |
universe@390 | 180 | <td class="paramkey"></td> |
universe@390 | 181 | <td></td> |
universe@390 | 182 | <td class="paramtype">size_t </td> |
universe@390 | 183 | <td class="paramname"><em>len</em> </td> |
universe@390 | 184 | </tr> |
universe@390 | 185 | <tr> |
universe@390 | 186 | <td></td> |
universe@390 | 187 | <td>)</td> |
universe@390 | 188 | <td></td><td></td> |
universe@390 | 189 | </tr> |
universe@390 | 190 | </table> |
universe@390 | 191 | </div><div class="memdoc"> |
universe@390 | 192 | |
universe@390 | 193 | <p>Sets the input buffer for the properties parser. </p> |
universe@390 | 194 | <p>After calling this function, you may parse the data by calling <a class="el" href="properties_8h.html#a7e03bc573d45d48c538cd721e810d33c" title="Retrieves the next key/value-pair. ">ucx_properties_next()</a> until it returns 0. The function <a class="el" href="properties_8h.html#a5c7ff8bc3139960a3f3dc92072b742f3" title="Retrieves all available key/value-pairs and puts them into a UcxMap. ">ucx_properties2map()</a> is a convenience function that reads as much data as possible by using this function.</p> |
universe@390 | 195 | <dl class="params"><dt>Parameters</dt><dd> |
universe@390 | 196 | <table class="params"> |
universe@390 | 197 | <tr><td class="paramname">prop</td><td>the <a class="el" href="structUcxProperties.html" title="UcxProperties object for parsing properties data. ">UcxProperties</a> object </td></tr> |
universe@390 | 198 | <tr><td class="paramname">buf</td><td>a pointer to the new buffer </td></tr> |
universe@390 | 199 | <tr><td class="paramname">len</td><td>the payload length of the buffer </td></tr> |
universe@390 | 200 | </table> |
universe@390 | 201 | </dd> |
universe@390 | 202 | </dl> |
universe@390 | 203 | <dl class="section see"><dt>See also</dt><dd><a class="el" href="properties_8h.html#a7e03bc573d45d48c538cd721e810d33c" title="Retrieves the next key/value-pair. ">ucx_properties_next()</a> </dd> |
universe@390 | 204 | <dd> |
universe@390 | 205 | <a class="el" href="properties_8h.html#a5c7ff8bc3139960a3f3dc92072b742f3" title="Retrieves all available key/value-pairs and puts them into a UcxMap. ">ucx_properties2map()</a> </dd></dl> |
universe@390 | 206 | |
universe@390 | 207 | </div> |
universe@390 | 208 | </div> |
universe@390 | 209 | <a id="a38a2fe7bb2986bd87c7e69356ab05c05"></a> |
universe@390 | 210 | <h2 class="memtitle"><span class="permalink"><a href="#a38a2fe7bb2986bd87c7e69356ab05c05">◆ </a></span>ucx_properties_free()</h2> |
universe@390 | 211 | |
universe@390 | 212 | <div class="memitem"> |
universe@390 | 213 | <div class="memproto"> |
universe@390 | 214 | <table class="memname"> |
universe@390 | 215 | <tr> |
universe@390 | 216 | <td class="memname">void ucx_properties_free </td> |
universe@390 | 217 | <td>(</td> |
universe@390 | 218 | <td class="paramtype"><a class="el" href="structUcxProperties.html">UcxProperties</a> * </td> |
universe@390 | 219 | <td class="paramname"><em>prop</em></td><td>)</td> |
universe@390 | 220 | <td></td> |
universe@390 | 221 | </tr> |
universe@390 | 222 | </table> |
universe@390 | 223 | </div><div class="memdoc"> |
universe@390 | 224 | |
universe@390 | 225 | <p>Destroys a <a class="el" href="structUcxProperties.html" title="UcxProperties object for parsing properties data. ">UcxProperties</a> object. </p> |
universe@390 | 226 | <dl class="params"><dt>Parameters</dt><dd> |
universe@390 | 227 | <table class="params"> |
universe@390 | 228 | <tr><td class="paramname">prop</td><td>the <a class="el" href="structUcxProperties.html" title="UcxProperties object for parsing properties data. ">UcxProperties</a> object to destroy </td></tr> |
universe@390 | 229 | </table> |
universe@390 | 230 | </dd> |
universe@390 | 231 | </dl> |
universe@390 | 232 | |
universe@390 | 233 | </div> |
universe@390 | 234 | </div> |
universe@390 | 235 | <a id="ae1b600f839a6b2278b68fc314981a8a3"></a> |
universe@390 | 236 | <h2 class="memtitle"><span class="permalink"><a href="#ae1b600f839a6b2278b68fc314981a8a3">◆ </a></span>ucx_properties_load()</h2> |
universe@390 | 237 | |
universe@390 | 238 | <div class="memitem"> |
universe@390 | 239 | <div class="memproto"> |
universe@390 | 240 | <table class="memname"> |
universe@390 | 241 | <tr> |
universe@390 | 242 | <td class="memname">int ucx_properties_load </td> |
universe@390 | 243 | <td>(</td> |
universe@390 | 244 | <td class="paramtype"><a class="el" href="structUcxMap.html">UcxMap</a> * </td> |
universe@390 | 245 | <td class="paramname"><em>map</em>, </td> |
universe@390 | 246 | </tr> |
universe@390 | 247 | <tr> |
universe@390 | 248 | <td class="paramkey"></td> |
universe@390 | 249 | <td></td> |
universe@390 | 250 | <td class="paramtype">FILE * </td> |
universe@390 | 251 | <td class="paramname"><em>file</em> </td> |
universe@390 | 252 | </tr> |
universe@390 | 253 | <tr> |
universe@390 | 254 | <td></td> |
universe@390 | 255 | <td>)</td> |
universe@390 | 256 | <td></td><td></td> |
universe@390 | 257 | </tr> |
universe@390 | 258 | </table> |
universe@390 | 259 | </div><div class="memdoc"> |
universe@390 | 260 | |
universe@390 | 261 | <p>Loads a properties file to a <a class="el" href="structUcxMap.html" title="Structure for the UCX map. ">UcxMap</a>. </p> |
universe@390 | 262 | <p>This is a convenience function that reads data from an input stream until the end of the stream is reached.</p> |
universe@390 | 263 | <dl class="params"><dt>Parameters</dt><dd> |
universe@390 | 264 | <table class="params"> |
universe@390 | 265 | <tr><td class="paramname">map</td><td>the map object to write the key/value-pairs to </td></tr> |
universe@390 | 266 | <tr><td class="paramname">file</td><td>the <code>FILE*</code> stream to read from </td></tr> |
universe@390 | 267 | </table> |
universe@390 | 268 | </dd> |
universe@390 | 269 | </dl> |
universe@390 | 270 | <dl class="section return"><dt>Returns</dt><dd>0 on success, or a non-zero value on error</dd></dl> |
universe@390 | 271 | <dl class="section see"><dt>See also</dt><dd><a class="el" href="properties_8h.html#aaf8de121764a4d22c763ff2ab41f3a4d" title="Sets the input buffer for the properties parser. ">ucx_properties_fill()</a> </dd> |
universe@390 | 272 | <dd> |
universe@390 | 273 | <a class="el" href="properties_8h.html#a5c7ff8bc3139960a3f3dc92072b742f3" title="Retrieves all available key/value-pairs and puts them into a UcxMap. ">ucx_properties2map()</a> </dd></dl> |
universe@390 | 274 | |
universe@390 | 275 | </div> |
universe@390 | 276 | </div> |
universe@390 | 277 | <a id="a44d9dd12cab3aaa0084f1c8b89405796"></a> |
universe@390 | 278 | <h2 class="memtitle"><span class="permalink"><a href="#a44d9dd12cab3aaa0084f1c8b89405796">◆ </a></span>ucx_properties_new()</h2> |
universe@390 | 279 | |
universe@390 | 280 | <div class="memitem"> |
universe@390 | 281 | <div class="memproto"> |
universe@390 | 282 | <table class="memname"> |
universe@390 | 283 | <tr> |
universe@390 | 284 | <td class="memname"><a class="el" href="structUcxProperties.html">UcxProperties</a>* ucx_properties_new </td> |
universe@390 | 285 | <td>(</td> |
universe@390 | 286 | <td class="paramname"></td><td>)</td> |
universe@390 | 287 | <td></td> |
universe@390 | 288 | </tr> |
universe@390 | 289 | </table> |
universe@390 | 290 | </div><div class="memdoc"> |
universe@390 | 291 | |
universe@390 | 292 | <p>Constructs a new <a class="el" href="structUcxProperties.html" title="UcxProperties object for parsing properties data. ">UcxProperties</a> object. </p> |
universe@390 | 293 | <dl class="section return"><dt>Returns</dt><dd>a pointer to the new <a class="el" href="structUcxProperties.html" title="UcxProperties object for parsing properties data. ">UcxProperties</a> object </dd></dl> |
universe@390 | 294 | |
universe@390 | 295 | </div> |
universe@390 | 296 | </div> |
universe@390 | 297 | <a id="a7e03bc573d45d48c538cd721e810d33c"></a> |
universe@390 | 298 | <h2 class="memtitle"><span class="permalink"><a href="#a7e03bc573d45d48c538cd721e810d33c">◆ </a></span>ucx_properties_next()</h2> |
universe@390 | 299 | |
universe@390 | 300 | <div class="memitem"> |
universe@390 | 301 | <div class="memproto"> |
universe@390 | 302 | <table class="memname"> |
universe@390 | 303 | <tr> |
universe@390 | 304 | <td class="memname">int ucx_properties_next </td> |
universe@390 | 305 | <td>(</td> |
universe@390 | 306 | <td class="paramtype"><a class="el" href="structUcxProperties.html">UcxProperties</a> * </td> |
universe@390 | 307 | <td class="paramname"><em>prop</em>, </td> |
universe@390 | 308 | </tr> |
universe@390 | 309 | <tr> |
universe@390 | 310 | <td class="paramkey"></td> |
universe@390 | 311 | <td></td> |
universe@390 | 312 | <td class="paramtype"><a class="el" href="structsstr__t.html">sstr_t</a> * </td> |
universe@390 | 313 | <td class="paramname"><em>name</em>, </td> |
universe@390 | 314 | </tr> |
universe@390 | 315 | <tr> |
universe@390 | 316 | <td class="paramkey"></td> |
universe@390 | 317 | <td></td> |
universe@390 | 318 | <td class="paramtype"><a class="el" href="structsstr__t.html">sstr_t</a> * </td> |
universe@390 | 319 | <td class="paramname"><em>value</em> </td> |
universe@390 | 320 | </tr> |
universe@390 | 321 | <tr> |
universe@390 | 322 | <td></td> |
universe@390 | 323 | <td>)</td> |
universe@390 | 324 | <td></td><td></td> |
universe@390 | 325 | </tr> |
universe@390 | 326 | </table> |
universe@390 | 327 | </div><div class="memdoc"> |
universe@390 | 328 | |
universe@390 | 329 | <p>Retrieves the next key/value-pair. </p> |
universe@390 | 330 | <p>This function returns a nonzero value as long as there are key/value-pairs found. If no more key/value-pairs are found, you may refill the input buffer with <a class="el" href="properties_8h.html#aaf8de121764a4d22c763ff2ab41f3a4d" title="Sets the input buffer for the properties parser. ">ucx_properties_fill()</a>.</p> |
universe@390 | 331 | <p><b>Attention:</b> the <a class="el" href="structsstr__t.html#af8049914efc1e67f7de3ee55ec0611b0" title="A pointer to the string (not necessarily NULL-terminated) ">sstr_t.ptr</a> pointers of the output parameters point to memory within the input buffer of the parser and will get invalid some time. If you want long term copies of the key/value-pairs, use <a class="el" href="string_8h.html#accbfd2b459a028d7af9fb7df6f977d80" title="Creates a duplicate of the specified string. ">sstrdup()</a> after calling this function.</p> |
universe@390 | 332 | <dl class="params"><dt>Parameters</dt><dd> |
universe@390 | 333 | <table class="params"> |
universe@390 | 334 | <tr><td class="paramname">prop</td><td>the <a class="el" href="structUcxProperties.html" title="UcxProperties object for parsing properties data. ">UcxProperties</a> object </td></tr> |
universe@390 | 335 | <tr><td class="paramname">name</td><td>a pointer to the <a class="el" href="structsstr__t.html" title="The UCX string structure. ">sstr_t</a> that shall contain the property name </td></tr> |
universe@390 | 336 | <tr><td class="paramname">value</td><td>a pointer to the <a class="el" href="structsstr__t.html" title="The UCX string structure. ">sstr_t</a> that shall contain the property value </td></tr> |
universe@390 | 337 | </table> |
universe@390 | 338 | </dd> |
universe@390 | 339 | </dl> |
universe@390 | 340 | <dl class="section return"><dt>Returns</dt><dd>Nonzero, if a key/value-pair was successfully retrieved </dd></dl> |
universe@390 | 341 | <dl class="section see"><dt>See also</dt><dd><a class="el" href="properties_8h.html#aaf8de121764a4d22c763ff2ab41f3a4d" title="Sets the input buffer for the properties parser. ">ucx_properties_fill()</a> </dd></dl> |
universe@390 | 342 | |
universe@390 | 343 | </div> |
universe@390 | 344 | </div> |
universe@390 | 345 | <a id="a63c0c1b7648e675b21a1788917ff36fb"></a> |
universe@390 | 346 | <h2 class="memtitle"><span class="permalink"><a href="#a63c0c1b7648e675b21a1788917ff36fb">◆ </a></span>ucx_properties_store()</h2> |
universe@390 | 347 | |
universe@390 | 348 | <div class="memitem"> |
universe@390 | 349 | <div class="memproto"> |
universe@390 | 350 | <table class="memname"> |
universe@390 | 351 | <tr> |
universe@390 | 352 | <td class="memname">int ucx_properties_store </td> |
universe@390 | 353 | <td>(</td> |
universe@390 | 354 | <td class="paramtype"><a class="el" href="structUcxMap.html">UcxMap</a> * </td> |
universe@390 | 355 | <td class="paramname"><em>map</em>, </td> |
universe@390 | 356 | </tr> |
universe@390 | 357 | <tr> |
universe@390 | 358 | <td class="paramkey"></td> |
universe@390 | 359 | <td></td> |
universe@390 | 360 | <td class="paramtype">FILE * </td> |
universe@390 | 361 | <td class="paramname"><em>file</em> </td> |
universe@390 | 362 | </tr> |
universe@390 | 363 | <tr> |
universe@390 | 364 | <td></td> |
universe@390 | 365 | <td>)</td> |
universe@390 | 366 | <td></td><td></td> |
universe@390 | 367 | </tr> |
universe@390 | 368 | </table> |
universe@390 | 369 | </div><div class="memdoc"> |
universe@390 | 370 | |
universe@390 | 371 | <p>Stores a <a class="el" href="structUcxMap.html" title="Structure for the UCX map. ">UcxMap</a> to a file. </p> |
universe@390 | 372 | <p>The key/value-pairs are written by using the following format:</p> |
universe@390 | 373 | <p><code>[key] = [value]\n</code></p> |
universe@390 | 374 | <dl class="params"><dt>Parameters</dt><dd> |
universe@390 | 375 | <table class="params"> |
universe@390 | 376 | <tr><td class="paramname">map</td><td>the map to store </td></tr> |
universe@390 | 377 | <tr><td class="paramname">file</td><td>the <code>FILE*</code> stream to write to </td></tr> |
universe@390 | 378 | </table> |
universe@390 | 379 | </dd> |
universe@390 | 380 | </dl> |
universe@390 | 381 | <dl class="section return"><dt>Returns</dt><dd>0 on success, or a non-zero value on error </dd></dl> |
universe@390 | 382 | |
universe@390 | 383 | </div> |
universe@390 | 384 | </div> |
universe@390 | 385 | </div><!-- contents --> |
universe@390 | 386 | <!-- start footer part --> |
universe@390 | 387 | <hr class="footer"/><address class="footer"><small> |
universe@390 | 388 | Generated on Thu Dec 19 2019 19:58:24 for ucx by  <a href="http://www.doxygen.org/index.html"> |
universe@390 | 389 | <img class="footer" src="doxygen.png" alt="doxygen"/> |
universe@390 | 390 | </a> 1.8.13 |
universe@390 | 391 | </small></address> |
universe@390 | 392 | </body> |
universe@390 | 393 | </html> |