1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 3<title>Heimdalwindlibrary: Heimdal wind library</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5<link href="tabs.css" rel="stylesheet" type="text/css"> 6</head><body> 7<p> 8<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a> 9</p> 10<!-- end of header marker --> 11<!-- Generated by Doxygen 1.5.6 --> 12<div class="navigation" id="top"> 13 <div class="tabs"> 14 <ul> 15 <li><a href="index.html"><span>Main Page</span></a></li> 16 <li><a href="modules.html"><span>Modules</span></a></li> 17 </ul> 18 </div> 19</div> 20<div class="contents"> 21<h1>Heimdal wind library</h1><table border="0" cellpadding="0" cellspacing="0"> 22<tr><td></td></tr> 23<tr><td colspan="2"><br><h2>Functions</h2></td></tr> 24<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#gcd005d89adeb764c77c97f1c4d2e1d82">wind_punycode_label_toascii</a> (const uint32_t *in, size_t in_len, char *out, size_t *out_len)</td></tr> 25 26<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#gdc7260aad792625f5e4d59f5d645bfaa">wind_stringprep</a> (const uint32_t *in, size_t in_len, uint32_t *out, size_t *out_len, wind_profile_flags flags)</td></tr> 27 28<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#ga4d80a988cf7d0cc8c15c1652516ec72">wind_profile</a> (const char *name, wind_profile_flags *flags)</td></tr> 29 30<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g31f62f5e3ca885bd8afce415c9e83c4c">wind_utf8ucs4</a> (const char *in, uint32_t *out, size_t *out_len)</td></tr> 31 32<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#gbeccc02ed5f1f90684b10a6f892e89d3">wind_utf8ucs4_length</a> (const char *in, size_t *out_len)</td></tr> 33 34<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g502199d8981249373095da43bb5d256d">wind_ucs4utf8</a> (const uint32_t *in, size_t in_len, char *out, size_t *out_len)</td></tr> 35 36<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g44d8951aee3e12f1812ef193bad738ef">wind_ucs4utf8_length</a> (const uint32_t *in, size_t in_len, size_t *out_len)</td></tr> 37 38<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g15a41f929d8b1be8528e3ecbdf8264f0">wind_ucs2read</a> (const void *ptr, size_t len, unsigned int *flags, uint16_t *out, size_t *out_len)</td></tr> 39 40<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g20668242d9ab39011edbcae295ee9348">wind_ucs2write</a> (const uint16_t *in, size_t in_len, unsigned int *flags, void *ptr, size_t *out_len)</td></tr> 41 42<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g736f8b06adc2b70bd32ce2ed2397b5f5">wind_utf8ucs2</a> (const char *in, uint16_t *out, size_t *out_len)</td></tr> 43 44<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g4d94c57c6fc46b7af71d37d507bcdbf8">wind_utf8ucs2_length</a> (const char *in, size_t *out_len)</td></tr> 45 46<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g2e43e4a99781db965162b9a9c6333307">wind_ucs2utf8</a> (const uint16_t *in, size_t in_len, char *out, size_t *out_len)</td></tr> 47 48<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g53b8caa6437d7f903d819c76450be3c1">wind_ucs2utf8_length</a> (const uint16_t *in, size_t in_len, size_t *out_len)</td></tr> 49 50</table> 51<hr><a name="_details"></a><h2>Detailed Description</h2> 52<hr><h2>Function Documentation</h2> 53<a class="anchor" name="ga4d80a988cf7d0cc8c15c1652516ec72"></a><!-- doxytag: member="stringprep.c::wind_profile" ref="ga4d80a988cf7d0cc8c15c1652516ec72" args="(const char *name, wind_profile_flags *flags)" --> 54<div class="memitem"> 55<div class="memproto"> 56 <table class="memname"> 57 <tr> 58 <td class="memname">int wind_profile </td> 59 <td>(</td> 60 <td class="paramtype">const char * </td> 61 <td class="paramname"> <em>name</em>, </td> 62 </tr> 63 <tr> 64 <td class="paramkey"></td> 65 <td></td> 66 <td class="paramtype">wind_profile_flags * </td> 67 <td class="paramname"> <em>flags</em></td><td> </td> 68 </tr> 69 <tr> 70 <td></td> 71 <td>)</td> 72 <td></td><td></td><td></td> 73 </tr> 74 </table> 75</div> 76<div class="memdoc"> 77 78<p> 79Try to find the profile given a name.<p> 80<dl compact><dt><b>Parameters:</b></dt><dd> 81 <table border="0" cellspacing="2" cellpadding="0"> 82 <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>name of the profile. </td></tr> 83 <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>the resulting profile.</td></tr> 84 </table> 85</dl> 86<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 87 88</div> 89</div><p> 90<a class="anchor" name="gcd005d89adeb764c77c97f1c4d2e1d82"></a><!-- doxytag: member="punycode.c::wind_punycode_label_toascii" ref="gcd005d89adeb764c77c97f1c4d2e1d82" args="(const uint32_t *in, size_t in_len, char *out, size_t *out_len)" --> 91<div class="memitem"> 92<div class="memproto"> 93 <table class="memname"> 94 <tr> 95 <td class="memname">int wind_punycode_label_toascii </td> 96 <td>(</td> 97 <td class="paramtype">const uint32_t * </td> 98 <td class="paramname"> <em>in</em>, </td> 99 </tr> 100 <tr> 101 <td class="paramkey"></td> 102 <td></td> 103 <td class="paramtype">size_t </td> 104 <td class="paramname"> <em>in_len</em>, </td> 105 </tr> 106 <tr> 107 <td class="paramkey"></td> 108 <td></td> 109 <td class="paramtype">char * </td> 110 <td class="paramname"> <em>out</em>, </td> 111 </tr> 112 <tr> 113 <td class="paramkey"></td> 114 <td></td> 115 <td class="paramtype">size_t * </td> 116 <td class="paramname"> <em>out_len</em></td><td> </td> 117 </tr> 118 <tr> 119 <td></td> 120 <td>)</td> 121 <td></td><td></td><td></td> 122 </tr> 123 </table> 124</div> 125<div class="memdoc"> 126 127<p> 128Convert an UCS4 string to a puny-coded DNS label string suitable when combined with delimiters and other labels for DNS lookup.<p> 129<dl compact><dt><b>Parameters:</b></dt><dd> 130 <table border="0" cellspacing="2" cellpadding="0"> 131 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>an UCS4 string to convert </td></tr> 132 <tr><td valign="top"></td><td valign="top"><em>in_len</em> </td><td>the length of in. </td></tr> 133 <tr><td valign="top"></td><td valign="top"><em>out</em> </td><td>the resulting puny-coded string. The string is not NUL terminatied. </td></tr> 134 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>before processing out_len should be the length of the out variable, after processing it will be the length of the out string.</td></tr> 135 </table> 136</dl> 137<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 138 139</div> 140</div><p> 141<a class="anchor" name="gdc7260aad792625f5e4d59f5d645bfaa"></a><!-- doxytag: member="stringprep.c::wind_stringprep" ref="gdc7260aad792625f5e4d59f5d645bfaa" args="(const uint32_t *in, size_t in_len, uint32_t *out, size_t *out_len, wind_profile_flags flags)" --> 142<div class="memitem"> 143<div class="memproto"> 144 <table class="memname"> 145 <tr> 146 <td class="memname">int wind_stringprep </td> 147 <td>(</td> 148 <td class="paramtype">const uint32_t * </td> 149 <td class="paramname"> <em>in</em>, </td> 150 </tr> 151 <tr> 152 <td class="paramkey"></td> 153 <td></td> 154 <td class="paramtype">size_t </td> 155 <td class="paramname"> <em>in_len</em>, </td> 156 </tr> 157 <tr> 158 <td class="paramkey"></td> 159 <td></td> 160 <td class="paramtype">uint32_t * </td> 161 <td class="paramname"> <em>out</em>, </td> 162 </tr> 163 <tr> 164 <td class="paramkey"></td> 165 <td></td> 166 <td class="paramtype">size_t * </td> 167 <td class="paramname"> <em>out_len</em>, </td> 168 </tr> 169 <tr> 170 <td class="paramkey"></td> 171 <td></td> 172 <td class="paramtype">wind_profile_flags </td> 173 <td class="paramname"> <em>flags</em></td><td> </td> 174 </tr> 175 <tr> 176 <td></td> 177 <td>)</td> 178 <td></td><td></td><td></td> 179 </tr> 180 </table> 181</div> 182<div class="memdoc"> 183 184<p> 185Process a input UCS4 string according a string-prep profile.<p> 186<dl compact><dt><b>Parameters:</b></dt><dd> 187 <table border="0" cellspacing="2" cellpadding="0"> 188 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>input UCS4 string to process </td></tr> 189 <tr><td valign="top"></td><td valign="top"><em>in_len</em> </td><td>length of the input string </td></tr> 190 <tr><td valign="top"></td><td valign="top"><em>out</em> </td><td>output UCS4 string </td></tr> 191 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>length of the output string. </td></tr> 192 <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>stringprep profile.</td></tr> 193 </table> 194</dl> 195<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 196 197</div> 198</div><p> 199<a class="anchor" name="g15a41f929d8b1be8528e3ecbdf8264f0"></a><!-- doxytag: member="utf8.c::wind_ucs2read" ref="g15a41f929d8b1be8528e3ecbdf8264f0" args="(const void *ptr, size_t len, unsigned int *flags, uint16_t *out, size_t *out_len)" --> 200<div class="memitem"> 201<div class="memproto"> 202 <table class="memname"> 203 <tr> 204 <td class="memname">int wind_ucs2read </td> 205 <td>(</td> 206 <td class="paramtype">const void * </td> 207 <td class="paramname"> <em>ptr</em>, </td> 208 </tr> 209 <tr> 210 <td class="paramkey"></td> 211 <td></td> 212 <td class="paramtype">size_t </td> 213 <td class="paramname"> <em>len</em>, </td> 214 </tr> 215 <tr> 216 <td class="paramkey"></td> 217 <td></td> 218 <td class="paramtype">unsigned int * </td> 219 <td class="paramname"> <em>flags</em>, </td> 220 </tr> 221 <tr> 222 <td class="paramkey"></td> 223 <td></td> 224 <td class="paramtype">uint16_t * </td> 225 <td class="paramname"> <em>out</em>, </td> 226 </tr> 227 <tr> 228 <td class="paramkey"></td> 229 <td></td> 230 <td class="paramtype">size_t * </td> 231 <td class="paramname"> <em>out_len</em></td><td> </td> 232 </tr> 233 <tr> 234 <td></td> 235 <td>)</td> 236 <td></td><td></td><td></td> 237 </tr> 238 </table> 239</div> 240<div class="memdoc"> 241 242<p> 243Read in an UCS2 from a buffer.<p> 244<dl compact><dt><b>Parameters:</b></dt><dd> 245 <table border="0" cellspacing="2" cellpadding="0"> 246 <tr><td valign="top"></td><td valign="top"><em>ptr</em> </td><td>The input buffer to read from. </td></tr> 247 <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>the length of the input buffer. </td></tr> 248 <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>Flags to control the behavior of the function. </td></tr> 249 <tr><td valign="top"></td><td valign="top"><em>out</em> </td><td>the output UCS2, the array must be at least out/2 long. </td></tr> 250 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>the output length</td></tr> 251 </table> 252</dl> 253<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise. </dd></dl> 254 255<p> 256if len is zero, flags are unchanged<p> 257if len is odd, WIND_ERR_LENGTH_NOT_MOD2 is returned<p> 258If the flags WIND_RW_BOM is set, check for BOM. If not BOM is found, check is LE/BE flag is already and use that otherwise fail with WIND_ERR_NO_BOM. When done, clear WIND_RW_BOM and the LE/BE flag and set the resulting LE/BE flag. 259</div> 260</div><p> 261<a class="anchor" name="g2e43e4a99781db965162b9a9c6333307"></a><!-- doxytag: member="utf8.c::wind_ucs2utf8" ref="g2e43e4a99781db965162b9a9c6333307" args="(const uint16_t *in, size_t in_len, char *out, size_t *out_len)" --> 262<div class="memitem"> 263<div class="memproto"> 264 <table class="memname"> 265 <tr> 266 <td class="memname">int wind_ucs2utf8 </td> 267 <td>(</td> 268 <td class="paramtype">const uint16_t * </td> 269 <td class="paramname"> <em>in</em>, </td> 270 </tr> 271 <tr> 272 <td class="paramkey"></td> 273 <td></td> 274 <td class="paramtype">size_t </td> 275 <td class="paramname"> <em>in_len</em>, </td> 276 </tr> 277 <tr> 278 <td class="paramkey"></td> 279 <td></td> 280 <td class="paramtype">char * </td> 281 <td class="paramname"> <em>out</em>, </td> 282 </tr> 283 <tr> 284 <td class="paramkey"></td> 285 <td></td> 286 <td class="paramtype">size_t * </td> 287 <td class="paramname"> <em>out_len</em></td><td> </td> 288 </tr> 289 <tr> 290 <td></td> 291 <td>)</td> 292 <td></td><td></td><td></td> 293 </tr> 294 </table> 295</div> 296<div class="memdoc"> 297 298<p> 299Convert an UCS2 string to a UTF-8 string.<p> 300<dl compact><dt><b>Parameters:</b></dt><dd> 301 <table border="0" cellspacing="2" cellpadding="0"> 302 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>an UCS2 string to convert. </td></tr> 303 <tr><td valign="top"></td><td valign="top"><em>in_len</em> </td><td>the length of the in UCS2 string. </td></tr> 304 <tr><td valign="top"></td><td valign="top"><em>out</em> </td><td>the resulting UTF-8 strint, must be at least <a class="el" href="group__wind.html#g53b8caa6437d7f903d819c76450be3c1">wind_ucs2utf8_length()</a> long. If out is NULL, the function will calculate the needed space for the out variable (just like <a class="el" href="group__wind.html#g53b8caa6437d7f903d819c76450be3c1">wind_ucs2utf8_length()</a>). </td></tr> 305 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>before processing out_len should be the length of the out variable, after processing it will be the length of the out string.</td></tr> 306 </table> 307</dl> 308<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 309 310</div> 311</div><p> 312<a class="anchor" name="g53b8caa6437d7f903d819c76450be3c1"></a><!-- doxytag: member="utf8.c::wind_ucs2utf8_length" ref="g53b8caa6437d7f903d819c76450be3c1" args="(const uint16_t *in, size_t in_len, size_t *out_len)" --> 313<div class="memitem"> 314<div class="memproto"> 315 <table class="memname"> 316 <tr> 317 <td class="memname">int wind_ucs2utf8_length </td> 318 <td>(</td> 319 <td class="paramtype">const uint16_t * </td> 320 <td class="paramname"> <em>in</em>, </td> 321 </tr> 322 <tr> 323 <td class="paramkey"></td> 324 <td></td> 325 <td class="paramtype">size_t </td> 326 <td class="paramname"> <em>in_len</em>, </td> 327 </tr> 328 <tr> 329 <td class="paramkey"></td> 330 <td></td> 331 <td class="paramtype">size_t * </td> 332 <td class="paramname"> <em>out_len</em></td><td> </td> 333 </tr> 334 <tr> 335 <td></td> 336 <td>)</td> 337 <td></td><td></td><td></td> 338 </tr> 339 </table> 340</div> 341<div class="memdoc"> 342 343<p> 344Calculate the length of from converting a UCS2 string to an UTF-8 string.<p> 345<dl compact><dt><b>Parameters:</b></dt><dd> 346 <table border="0" cellspacing="2" cellpadding="0"> 347 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>an UCS2 string to convert. </td></tr> 348 <tr><td valign="top"></td><td valign="top"><em>in_len</em> </td><td>an UCS2 string length to convert. </td></tr> 349 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>the length of the resulting UTF-8 string.</td></tr> 350 </table> 351</dl> 352<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 353 354</div> 355</div><p> 356<a class="anchor" name="g20668242d9ab39011edbcae295ee9348"></a><!-- doxytag: member="utf8.c::wind_ucs2write" ref="g20668242d9ab39011edbcae295ee9348" args="(const uint16_t *in, size_t in_len, unsigned int *flags, void *ptr, size_t *out_len)" --> 357<div class="memitem"> 358<div class="memproto"> 359 <table class="memname"> 360 <tr> 361 <td class="memname">int wind_ucs2write </td> 362 <td>(</td> 363 <td class="paramtype">const uint16_t * </td> 364 <td class="paramname"> <em>in</em>, </td> 365 </tr> 366 <tr> 367 <td class="paramkey"></td> 368 <td></td> 369 <td class="paramtype">size_t </td> 370 <td class="paramname"> <em>in_len</em>, </td> 371 </tr> 372 <tr> 373 <td class="paramkey"></td> 374 <td></td> 375 <td class="paramtype">unsigned int * </td> 376 <td class="paramname"> <em>flags</em>, </td> 377 </tr> 378 <tr> 379 <td class="paramkey"></td> 380 <td></td> 381 <td class="paramtype">void * </td> 382 <td class="paramname"> <em>ptr</em>, </td> 383 </tr> 384 <tr> 385 <td class="paramkey"></td> 386 <td></td> 387 <td class="paramtype">size_t * </td> 388 <td class="paramname"> <em>out_len</em></td><td> </td> 389 </tr> 390 <tr> 391 <td></td> 392 <td>)</td> 393 <td></td><td></td><td></td> 394 </tr> 395 </table> 396</div> 397<div class="memdoc"> 398 399<p> 400Write an UCS2 string to a buffer.<p> 401<dl compact><dt><b>Parameters:</b></dt><dd> 402 <table border="0" cellspacing="2" cellpadding="0"> 403 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>The input UCS2 string. </td></tr> 404 <tr><td valign="top"></td><td valign="top"><em>in_len</em> </td><td>the length of the input buffer. </td></tr> 405 <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>Flags to control the behavior of the function. </td></tr> 406 <tr><td valign="top"></td><td valign="top"><em>ptr</em> </td><td>The input buffer to write to, the array must be at least (in + 1) * 2 bytes long. </td></tr> 407 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>the output length</td></tr> 408 </table> 409</dl> 410<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise. </dd></dl> 411 412<p> 413If in buffer is not of length be mod 2, WIND_ERR_LENGTH_NOT_MOD2 is returned<p> 414On zero input length, flags are preserved<p> 415If flags have WIND_RW_BOM set, the byte order mark is written first to the output data<p> 416If the output wont fit into out_len, WIND_ERR_OVERRUN is returned 417</div> 418</div><p> 419<a class="anchor" name="g502199d8981249373095da43bb5d256d"></a><!-- doxytag: member="utf8.c::wind_ucs4utf8" ref="g502199d8981249373095da43bb5d256d" args="(const uint32_t *in, size_t in_len, char *out, size_t *out_len)" --> 420<div class="memitem"> 421<div class="memproto"> 422 <table class="memname"> 423 <tr> 424 <td class="memname">int wind_ucs4utf8 </td> 425 <td>(</td> 426 <td class="paramtype">const uint32_t * </td> 427 <td class="paramname"> <em>in</em>, </td> 428 </tr> 429 <tr> 430 <td class="paramkey"></td> 431 <td></td> 432 <td class="paramtype">size_t </td> 433 <td class="paramname"> <em>in_len</em>, </td> 434 </tr> 435 <tr> 436 <td class="paramkey"></td> 437 <td></td> 438 <td class="paramtype">char * </td> 439 <td class="paramname"> <em>out</em>, </td> 440 </tr> 441 <tr> 442 <td class="paramkey"></td> 443 <td></td> 444 <td class="paramtype">size_t * </td> 445 <td class="paramname"> <em>out_len</em></td><td> </td> 446 </tr> 447 <tr> 448 <td></td> 449 <td>)</td> 450 <td></td><td></td><td></td> 451 </tr> 452 </table> 453</div> 454<div class="memdoc"> 455 456<p> 457Convert an UCS4 string to a UTF-8 string.<p> 458<dl compact><dt><b>Parameters:</b></dt><dd> 459 <table border="0" cellspacing="2" cellpadding="0"> 460 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>an UCS4 string to convert. </td></tr> 461 <tr><td valign="top"></td><td valign="top"><em>in_len</em> </td><td>the length input array.</td></tr> 462 <tr><td valign="top"></td><td valign="top"><em>out</em> </td><td>the resulting UTF-8 strint, must be at least <a class="el" href="group__wind.html#g44d8951aee3e12f1812ef193bad738ef">wind_ucs4utf8_length()</a> + 1 long (the extra char for the NUL). If out is NULL, the function will calculate the needed space for the out variable (just like <a class="el" href="group__wind.html#g44d8951aee3e12f1812ef193bad738ef">wind_ucs4utf8_length()</a>).</td></tr> 463 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>before processing out_len should be the length of the out variable, after processing it will be the length of the out string.</td></tr> 464 </table> 465</dl> 466<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 467 468</div> 469</div><p> 470<a class="anchor" name="g44d8951aee3e12f1812ef193bad738ef"></a><!-- doxytag: member="utf8.c::wind_ucs4utf8_length" ref="g44d8951aee3e12f1812ef193bad738ef" args="(const uint32_t *in, size_t in_len, size_t *out_len)" --> 471<div class="memitem"> 472<div class="memproto"> 473 <table class="memname"> 474 <tr> 475 <td class="memname">int wind_ucs4utf8_length </td> 476 <td>(</td> 477 <td class="paramtype">const uint32_t * </td> 478 <td class="paramname"> <em>in</em>, </td> 479 </tr> 480 <tr> 481 <td class="paramkey"></td> 482 <td></td> 483 <td class="paramtype">size_t </td> 484 <td class="paramname"> <em>in_len</em>, </td> 485 </tr> 486 <tr> 487 <td class="paramkey"></td> 488 <td></td> 489 <td class="paramtype">size_t * </td> 490 <td class="paramname"> <em>out_len</em></td><td> </td> 491 </tr> 492 <tr> 493 <td></td> 494 <td>)</td> 495 <td></td><td></td><td></td> 496 </tr> 497 </table> 498</div> 499<div class="memdoc"> 500 501<p> 502Calculate the length of from converting a UCS4 string to an UTF-8 string.<p> 503<dl compact><dt><b>Parameters:</b></dt><dd> 504 <table border="0" cellspacing="2" cellpadding="0"> 505 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>an UCS4 string to convert. </td></tr> 506 <tr><td valign="top"></td><td valign="top"><em>in_len</em> </td><td>the length of UCS4 string to convert. </td></tr> 507 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>the length of the resulting UTF-8 string.</td></tr> 508 </table> 509</dl> 510<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 511 512</div> 513</div><p> 514<a class="anchor" name="g736f8b06adc2b70bd32ce2ed2397b5f5"></a><!-- doxytag: member="utf8.c::wind_utf8ucs2" ref="g736f8b06adc2b70bd32ce2ed2397b5f5" args="(const char *in, uint16_t *out, size_t *out_len)" --> 515<div class="memitem"> 516<div class="memproto"> 517 <table class="memname"> 518 <tr> 519 <td class="memname">int wind_utf8ucs2 </td> 520 <td>(</td> 521 <td class="paramtype">const char * </td> 522 <td class="paramname"> <em>in</em>, </td> 523 </tr> 524 <tr> 525 <td class="paramkey"></td> 526 <td></td> 527 <td class="paramtype">uint16_t * </td> 528 <td class="paramname"> <em>out</em>, </td> 529 </tr> 530 <tr> 531 <td class="paramkey"></td> 532 <td></td> 533 <td class="paramtype">size_t * </td> 534 <td class="paramname"> <em>out_len</em></td><td> </td> 535 </tr> 536 <tr> 537 <td></td> 538 <td>)</td> 539 <td></td><td></td><td></td> 540 </tr> 541 </table> 542</div> 543<div class="memdoc"> 544 545<p> 546Convert an UTF-8 string to an UCS2 string.<p> 547<dl compact><dt><b>Parameters:</b></dt><dd> 548 <table border="0" cellspacing="2" cellpadding="0"> 549 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>an UTF-8 string to convert. </td></tr> 550 <tr><td valign="top"></td><td valign="top"><em>out</em> </td><td>the resulting UCS2 strint, must be at least <a class="el" href="group__wind.html#g4d94c57c6fc46b7af71d37d507bcdbf8">wind_utf8ucs2_length()</a> long. If out is NULL, the function will calculate the needed space for the out variable (just like <a class="el" href="group__wind.html#g4d94c57c6fc46b7af71d37d507bcdbf8">wind_utf8ucs2_length()</a>). </td></tr> 551 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>before processing out_len should be the length of the out variable, after processing it will be the length of the out string.</td></tr> 552 </table> 553</dl> 554<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 555 556</div> 557</div><p> 558<a class="anchor" name="g4d94c57c6fc46b7af71d37d507bcdbf8"></a><!-- doxytag: member="utf8.c::wind_utf8ucs2_length" ref="g4d94c57c6fc46b7af71d37d507bcdbf8" args="(const char *in, size_t *out_len)" --> 559<div class="memitem"> 560<div class="memproto"> 561 <table class="memname"> 562 <tr> 563 <td class="memname">int wind_utf8ucs2_length </td> 564 <td>(</td> 565 <td class="paramtype">const char * </td> 566 <td class="paramname"> <em>in</em>, </td> 567 </tr> 568 <tr> 569 <td class="paramkey"></td> 570 <td></td> 571 <td class="paramtype">size_t * </td> 572 <td class="paramname"> <em>out_len</em></td><td> </td> 573 </tr> 574 <tr> 575 <td></td> 576 <td>)</td> 577 <td></td><td></td><td></td> 578 </tr> 579 </table> 580</div> 581<div class="memdoc"> 582 583<p> 584Calculate the length of from converting a UTF-8 string to a UCS2 string.<p> 585<dl compact><dt><b>Parameters:</b></dt><dd> 586 <table border="0" cellspacing="2" cellpadding="0"> 587 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>an UTF-8 string to convert. </td></tr> 588 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>the length of the resulting UCS4 string.</td></tr> 589 </table> 590</dl> 591<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 592 593</div> 594</div><p> 595<a class="anchor" name="g31f62f5e3ca885bd8afce415c9e83c4c"></a><!-- doxytag: member="utf8.c::wind_utf8ucs4" ref="g31f62f5e3ca885bd8afce415c9e83c4c" args="(const char *in, uint32_t *out, size_t *out_len)" --> 596<div class="memitem"> 597<div class="memproto"> 598 <table class="memname"> 599 <tr> 600 <td class="memname">int wind_utf8ucs4 </td> 601 <td>(</td> 602 <td class="paramtype">const char * </td> 603 <td class="paramname"> <em>in</em>, </td> 604 </tr> 605 <tr> 606 <td class="paramkey"></td> 607 <td></td> 608 <td class="paramtype">uint32_t * </td> 609 <td class="paramname"> <em>out</em>, </td> 610 </tr> 611 <tr> 612 <td class="paramkey"></td> 613 <td></td> 614 <td class="paramtype">size_t * </td> 615 <td class="paramname"> <em>out_len</em></td><td> </td> 616 </tr> 617 <tr> 618 <td></td> 619 <td>)</td> 620 <td></td><td></td><td></td> 621 </tr> 622 </table> 623</div> 624<div class="memdoc"> 625 626<p> 627Convert an UTF-8 string to an UCS4 string.<p> 628<dl compact><dt><b>Parameters:</b></dt><dd> 629 <table border="0" cellspacing="2" cellpadding="0"> 630 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>an UTF-8 string to convert. </td></tr> 631 <tr><td valign="top"></td><td valign="top"><em>out</em> </td><td>the resulting UCS4 strint, must be at least <a class="el" href="group__wind.html#gbeccc02ed5f1f90684b10a6f892e89d3">wind_utf8ucs4_length()</a> long. If out is NULL, the function will calculate the needed space for the out variable (just like <a class="el" href="group__wind.html#gbeccc02ed5f1f90684b10a6f892e89d3">wind_utf8ucs4_length()</a>). </td></tr> 632 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>before processing out_len should be the length of the out variable, after processing it will be the length of the out string.</td></tr> 633 </table> 634</dl> 635<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 636 637</div> 638</div><p> 639<a class="anchor" name="gbeccc02ed5f1f90684b10a6f892e89d3"></a><!-- doxytag: member="utf8.c::wind_utf8ucs4_length" ref="gbeccc02ed5f1f90684b10a6f892e89d3" args="(const char *in, size_t *out_len)" --> 640<div class="memitem"> 641<div class="memproto"> 642 <table class="memname"> 643 <tr> 644 <td class="memname">int wind_utf8ucs4_length </td> 645 <td>(</td> 646 <td class="paramtype">const char * </td> 647 <td class="paramname"> <em>in</em>, </td> 648 </tr> 649 <tr> 650 <td class="paramkey"></td> 651 <td></td> 652 <td class="paramtype">size_t * </td> 653 <td class="paramname"> <em>out_len</em></td><td> </td> 654 </tr> 655 <tr> 656 <td></td> 657 <td>)</td> 658 <td></td><td></td><td></td> 659 </tr> 660 </table> 661</div> 662<div class="memdoc"> 663 664<p> 665Calculate the length of from converting a UTF-8 string to a UCS4 string.<p> 666<dl compact><dt><b>Parameters:</b></dt><dd> 667 <table border="0" cellspacing="2" cellpadding="0"> 668 <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>an UTF-8 string to convert. </td></tr> 669 <tr><td valign="top"></td><td valign="top"><em>out_len</em> </td><td>the length of the resulting UCS4 string.</td></tr> 670 </table> 671</dl> 672<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl> 673 674</div> 675</div><p> 676</div> 677<hr size="1"><address style="text-align: right;"><small> 678Generated on Wed Jan 11 14:07:51 2012 for Heimdalwindlibrary by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address> 679</body> 680</html> 681