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